* Bug #5813 :
As "deserialize_date" and "deserialize_datetime" are used outside of "deserialize_model", we should check 'None' value before parsing string.
* Bugfix 5813 :
Update samples and docs
* 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.
* [go] More idiomatic godoc comments
* [go] Mark deprecated fields and functions
* [go] Minor mustache readability/consistency fixes
* [go] Mark deprecated operation parameters
* [go] Deprecate a petstore component property for testing
* [go] Apply deprecated godoc in Go servers also
* Add backslash to load namespace from global namespace
* Update example
* Remove hardcoded slash
* Add backslash from java side
* Update samples
* Fix first sample
* Fix other snapshot
* Update version file
Refs #3358
Ensure `deprecated` operations are annotated/documented as such on the
generated methods. Libraries updated:
* [feign]
* [google-api-client]
* [microprofile]
* [okhttp-gson]
* [resttemplate]
* [retrofit]
* [retrofit/play*]
* [webclient]
* [vertx]
Ensure `deprecated` schemas are annotated/documented as such on the
generated classes/fields. Libraries updated:
* [feign]
* [google-api-client]
* [jersey2]
* [microprofile]
* [native]
* [okhttp-gson]
* [rest-assured]
* [resteasy]
* [resttemplate]
* [retrofit*]
* [webclient]
* [vertx]
Also fix two minor bugs to get the java sample tests working:
* Fix an invalid jackson-datatype-threetenbp version number in vertx/pom.mustache
* Fix a bad return type in webclient/api_test.mustache when uniqueItems=true
Since this commit updates petstore-with-fake-endpoints-models-for-testing.yaml,
several other samples were updated, but it's just new files to reflect the
deprecated schemas, so there should be no consequential differences.
Relevant bits of the spec:
* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-operationdeprecated
* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-schemadeprecated
According to the [documentation](https://openapi-generator.tech/docs/generators/go-server) the go-server generator should support an `addResponseHeaders` option but a template uses an `addResponseHeader` option in some places which this PR fixes.
Closes#9795
Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
* Continuing from #1317 and its PRs for pistache server string enum code generation;
* A class that has an `anyOf` specification, in cpp side will have no members: in stead it should have a member having the type `classname_anyOf`
* Thus, Its `==` operator is not present or wrongly filled
* An string enum, should have a better usage, hence the `setEnumValue`
* this PR, is a brigde between `stringenumclassname_anyOf` and `stringenumclassname`
* `anyOf` specification is not just about `Enums`, so a better handling is needed from mustache templates, hence new template model parameter `isStringEnumContainer`
* PR fix: muttleyxd: `double semicolon`
* PR fix: wing328: `I think std::string is C++ only. What about adding x-is-string-enum-container instead in the postProcessModel operation in the C++ pistache server generator?`
* PR fix: wing328: `I think std::string is C++ only...` after fix get latest codes and then generate samples
Co-authored-by: Mehmet Fatih <mfyuce@netas.com.tr>
Use Gradle 6.9 and Kotlin 1.4.32. Generate Paths for other HTTP verbs
(#828) and fix imports (#5640). Use 'object' when no parameters are
used. Introduce 'featureMetrics' to control metrics plugin usage. Remove
HOCON configuration parsing. This is provided by
`Application.environment.config already` and removes a dependency.
Resolves#9087, resolves#828, resolves#5640
Relates-To #5346
* [python-fastapi] Fixed integration tests
Currently, it is required to use python 3.7 to make
python-fastapi generator work. This version is already
set in the generated Dockerfile. Thus, it makes sense to
build this image. Spotify's docker maven plugin can be
used to build the docker image.
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* fixup! [python-fastapi] Fixed integration tests
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* 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
* map free-form objects to Dict[str, Any]
* support Forward Type References
Forward type references will be supported by default from Python 3.10 on only. Until then (and starting with Python 3.7), we can opt in by a __future__ import, cf. https://docs.python.org/3.9/whatsnew/3.7.html?highlight=forward#pep-563-postponed-evaluation-of-annotations
* re-created pet-store sample
* bump required Python version to 3.7 for generated FastAPI projects
* make pydantic modell classes process forward type references
* [python-fastapi] Apply constraints to models
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Use pydantic types to validate models fields
Some data formats can be validated by annotating fields with some
special pydantic data types (EmailStr, forr example).
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Updated samples
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>