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>
* [python-fastapi] Ignore some flake8 warnings
1. Some of the "imported but not used" warnings are there because
it is not easy to express what should be imported in mustache template
language. These warnings are silenced in order to keep the templates
morre readable.
2. Single quotes -> Double quotes (for consistency).
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Added flake8 config
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Set extra constraints on values
It is important to set all constraints (pattern, greater than, etc.)
on values of all arguments, because FastAPI can handle them automatically.
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Updated samples
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Added new generator
See https://fastapi.tiangolo.com/ for more details about FastAPI
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Added samples
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* changed correct values
* Updated virtualan version
* updated the correct version
* Updated with latest version
* Update pom.xml
* Updated with 2.5.0
* Updated with db 2.5.0 version
* Adds getter + setter methods for isShortInteger in IJsonSchemaValidationProperties
* Adds isShortInteger to CodegenModel
* Adds isShortInteger to CodegenProperty
* Adds isShortInteger to CodegenParameter
* Adds isShortInteger to CodegenResponse
* Ensures that samples are up to date
* Changes interface to isShort
* Removes typescript file
* Adds isShort to CodegenModel and CodegenProperty instances
* Samples updated, shows too many changes across generators
* Adds isUnboundedInteger and implements it in CodegenModel
* Adds isUnboundedInteger to COdegenProperty
* Adds isUnboundedInteger to CodegenParameter
* Adds isUnboundedInteger to CodegenResponse
* Regenerates samples and docs
* Adds testBooleansSetForIntSchemas
* Fixes integer tests
* Huge update for php-mezzio-ph generator:
- proper container support for data types
- support for query parameter references and query parameter schema references
- dependency update (PHP 7.3+, PathHandler 0.7+, DataTransfer 0.5+)
* Sample regeneration after rebasing for php-mezzio-ph
* - added custom CLI option for php-mezzio-ph to generate code using modern PHP syntax
- removed obsolete php-mezzio-ph samples in samples/openapi3/server/petstore/php-mezzio-ph
* - fixes for JavaDoc declarations that seems to break CI
* - fix for outdated sample file
* Fix go-echo-server sample not running in CircleCI
* remove wrong argument
* [dart] Fix petstore sample tests & Multipart not working
* follow up to #9392
* `MultipartRequest(null, null)` is no longer valid after `http` package upgrade
* fix petstore sample project not compiling
* disable live petstore tests
* use template to strip out unused code blocks
* 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