17 Commits

Author SHA1 Message Date
Mateusz Szychowski (Muttley)
e342513391
[C++][Pistache] Add support for validating arrays, use full namespace type with custom types (#12221)
fixes #11246
2022-05-01 23:53:48 +08:00
sheabot
f2fcff2945
[cpp-pistache-server]: Fix build with pistache master branch (#10829)
* fix(cpp-pistache-server): meson/cmake build

* fix(cpp-pistache-server): Upgrade to C++17 and use std::optional

* feat(cpp-pistache-server): Disable running tests during build of nlohmann/json

* feat(samples): Update server/petstore/cpp-pistache
2021-11-14 10:15:42 +08:00
shayan-eftekhari
8569ff8203
[cpp-pistache-server] Fix missing semicolon in template and missing code to set default values of model schema (#10136)
* BUG FIX: A missing semicolon in cpp-pistache-server generated code.

* BUG FIX: Provide default values of schema in cpp-pistache-server generated code.

* BUG FIX: Provide default values of schema in cpp-pistache-server generated code.
2021-08-15 00:32:14 +08:00
Julian G
3fcbf17536
[C++][Pistache] Fix compile break, error handling (#9742)
* fix compilation break with validate function

* fix error handling in handleParsingException
bug caused all errors to be regarded as an internal server error

* generate samples
2021-06-15 14:42:29 +08:00
Julian G
8f5639554e
[C++] [Pistache] Model validation, general overhaul (#9251)
* overhaul pistache templates

* fix function signature in model-source
return type now aligns with definition in model-header

* use default keyword for destructors

* generate pistache samples

* move bin/configs/other/cpp-pistache-server-cpp-pistache.yaml to bin/configs/cpp-pistache-server-cpp-pistache.yaml

* Only generate validation body if necessary

* generate pistache samples
2021-05-05 16:52:47 +08:00
Mateusz Szychowski (Muttley)
c102ced044
[C++][Pistache] Catch HttpError from user-provided handler (#6520)
* [C++][Pistache] Catch HttpError when user-provided handler has thrown

This allows for returning valid http code through exception

* [C++][Pistache] Update Petstore sample
2020-06-05 17:08:40 +02:00
Mateusz Szychowski (Muttley)
6af27d52ca [C++][Pistache] Rename value holder to lower chance of collision with parameter name (#4948)
* [C++][Pistache] Rename value holder to lower chance of collision with parameter name

* [C++][Pistache] Update Petstore sample
2020-01-21 00:47:26 +01:00
Mateusz Szychowski (Muttley)
731b162942 [C++][Pistache] Fix warnings (#3238)
* [C++][Pistache] Fix warnings

Remove unecessary semicolon (Wpedantic)
Remove unused parameter name (Wunused-parameter)

* [C++][Pistache] Update Petstore sample
2019-06-28 19:21:01 +02:00
Mateusz Szychowski (Muttley)
68a5fa4c8b [C++][Pistache] Catch exception instead of runtime_error (#3225)
* [C++][Pistache] Replace runtime_error with std::exception

* [C++][Pistache] Update Petstore sample

* [C++][Pistache] Fix catch-value warning
2019-06-26 19:13:54 +02:00
sunn
e85e1f112a
Separate exception types (#2930) 2019-05-18 11:57:23 +02:00
SalDiAngelus
89eb603c17 [C++][Pistache] Fixed #2643 (#2653)
* Fixed #2643

Refactored to/from json functions to use universal object serialization method.

* Code review found incorrect indenting and I forgot to remove unused mustache files.

* Removed helpers class because it is not needed anymore.

* Removed helpers package from docs.

* Reverted helper class removal.
2019-04-19 14:00:12 +02:00
sunn
f8f3a08282
[cpp-pistache]Add support for map (#1359)
* Add support for map
* Add support for nested maps
* Simplify Array and Map Helper
* Use const reference wherever possible
2018-11-03 14:09:31 +01:00
sunn
e32b70d579
Allow all apis under a single endpoint to be hosted in one server (#1230) 2018-10-20 13:50:09 +02:00
sunn
3d4c3c545b
[c++ pistache server] Support basic query handling (#943)
Support basic query handling

Add  helpers for primitive de-serialization
Remove warnings due to unneeded commas
Deserialize basic types in queries
Add dependencies chain for external libraries
Fixes wrong parameter passed to API
2018-09-12 09:53:01 +02:00
sunn
97d6b71460 [cpp-pistache] Fix compilation of petstore for Pistache (#497)
* Fix compilation of petstore for Pistache
Add Map support

* Add support for ByteArray

* Add Support for ByteArray in cpprest

* Implement TODOs
2018-07-20 22:04:25 +08:00
stkrwork
23ab5177b3 [C++][Pistache] Fix optional error and wrong function signatures (#264)
* Added missing includes for optional

* Removed shared pointer from pistache generator

* Changed Net namespace to Pistache Namespace

* Clean up code and removed unnecessary lines in mustache files

* Removed remaining shared pointer syntax

* Code review fixes + updated samples

* Added const to all model setter functions, and reference to all params in setters that are not primitives

* Refactored modelbase

* Removed const

* Updated samples
2018-06-22 09:12:35 +08:00
Akihito Nakano
2392a09eeb [C++ server] Adjust the names (script, sample folder, generator) to lang option (#250)
* Renamce C++ server scripts

* Change output folder

* Rename sample folder: pistache-server -> cpp-pistache

* Rename sample folder: restbed -> cpp-restbed
2018-06-10 22:48:30 +08:00