2070 Commits

Author SHA1 Message Date
Mikael Lixenstrand
2e030c0c47
[Erlang] decrease memory usage (#9946)
* do not keep generator_state in cowboy match structure

* update generated example
2021-07-16 11:34:18 +08:00
William Cheng
79866e90cf update haskell servant samples 2021-07-13 21:03:07 +08:00
William Cheng
05e4c3cf64 update samples 2021-07-12 17:15:22 +08:00
William Cheng
35f933b27f Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-12 17:11:35 +08:00
William Cheng
39fbf53150 create v5.3.0 2021-07-10 00:12:23 +08:00
William Cheng
02835b35bc
Prepare v5.2.1 (#9922)
* bump verions to 5.2.1-SNAPSHOT

* update samples

* update readme

* fix gradle properties
2021-07-09 22:42:31 +08:00
William Cheng
90f7bcd909
Prepare v5.2.0 release (#9920)
* 5.2.0 release

* update samples

* update meta codegen
2021-07-09 17:06:55 +08:00
William Cheng
046780657c
fix regex in erlang, update samples (#9892) 2021-07-06 11:10:08 +08:00
William Cheng
919945b65b
ensure haskell, erlang server samles up-to-date (#9851) 2021-06-26 18:53:07 +08:00
Max Goltzsche
2e85ccdec8
[go-server] fix addResponseHeaders tpl option typo (#9814)
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>
2021-06-21 11:46:51 +08:00
Mehmet YUCE
ccd031a3da
Continuing from #1317 and its PRs for pistache server string enum code generation (#9786)
* 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>
2021-06-20 22:13:38 +08:00
Sascha Peilicke
463d905664
Kotlin-Server: Optional metrics and upgrade to Ktor 1.5.4 (#9358)
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
2021-06-20 22:03:44 +08:00
William Cheng
70fb429c98 update erlang server samples 2021-06-19 10:50:52 +08:00
Ween Jiann
77e1ca56cf
[go-server] Add go-chi generator to go-server via a router property (#9748)
* Add go-chi generator to go-server

* Add go-chi configs

* Add go-chi generated output

* Updated docs

* Add some javadocs

* Fix import issue

* Regen files
2021-06-16 16:53:20 +08:00
Nikita Vakula
d3b2089e89
[python-fastapi] Fixed integration tests (#9771)
* [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>
2021-06-16 15:49:02 +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
William Cheng
795c25d273 update go gin server samples 2021-06-14 18:50:21 +08:00
Christoph Ludwig
f3e3a724fb
Fix python-fastapi free-form objects mapping and forward ref type hints (#9723)
* 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
2021-06-14 18:05:36 +08:00
William Cheng
45175f018b update haskell-servant samples 2021-06-14 17:01:26 +08:00
William Cheng
cd2ef91dc3
Update logback to 1.2.0 (#9722)
* update logback to 2.1.0

* udpate jax-rs samples
2021-06-09 10:03:17 +08:00
Nikita Vakula
599a2ca477
Add validators to models fields (#9668)
* [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>
2021-06-07 12:00:04 +08:00
William Cheng
088bca1580
[python][fastapi] various minor improvements (#9672)
* fix python fastapi tests, update readme, add CI test

* update FILES

* use virtualenv

* fix pom.xml

* skip flake8
2021-06-07 11:55:26 +08:00
Nikita Vakula
93880a486e
python-fastapi improvements (#9649)
* [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>
2021-06-03 10:13:24 +08:00
William Cheng
f0bbeb75ff update erlang-server samples 2021-06-03 09:52:05 +08:00
William Cheng
32a045060e
[ python-fastapi] minor improvements (#9622)
* minor python-fastapi improvements

* update doc

* fix refreshUrl
2021-05-31 17:00:23 +08:00
Nikita Vakula
0da4099868
New python-fastapi generator (#9611)
* [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>
2021-05-30 17:43:31 +08:00
Peter Leibiger
f7b93ebdf2
Update fake API to contain sample with binary body (#9610) 2021-05-29 10:26:01 +08:00
William Cheng
28c3e1d544 update samples, docs 2021-05-28 10:26:48 +08:00
adessoDpd
12c34d4658
New generator: WSDL (#9545)
* init port

* add outputDir

* fill out current .md

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-05-28 10:22:28 +08:00
William Cheng
670c5884b6 update samples 2021-05-27 11:23:00 +08:00
Elan Thangamani
62a52bf1e8
Upgrade Virtualan version with 2.2.1 -> Open API Mock service (#9598)
* 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
2021-05-27 10:46:22 +08:00
William Cheng
32d5900611 update samples, docs 2021-05-27 10:40:32 +08:00
desmese
4f1d8f4699
- added localVar prefix to the contentType variable defined in the api.mustache template in the java resttemplate library (#9568)
- rerun generate-samples.sh and export_docs_generators.sh
2021-05-27 10:24:38 +08:00
Justin Black
6e6b8472d4
Adds isShort + isUnboundedInteger to IJsonSchemaValidationProperties implementers (#9519)
* 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
2021-05-26 11:59:28 -07:00
agilob
b1cba96627
Revert "[Java][Spring] Fix for #8659 - Different in-parameter types generated for api and delegate for files (#9331)" (#9555)
This reverts commit b9a1c8f016711307b9c718dbbdf60a137372c7af.
2021-05-23 22:59:51 +08:00
Arthur Mogliev
ab6d66147b
[php-mezzio-ph] PHP 8 support (#9445)
* 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
2021-05-21 14:40:38 +08:00
William Cheng
9e4afb0fc3
[C++] Rename Qt5 to Qt (#9490)
* rename qt5 to qt

* rename, update

* rename qt5 to qt in the templates

* update doc
2021-05-18 23:09:59 +08:00
Peter Leibiger
55b95bc9c5
Fix CircleCI failures (#9503)
* 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
2021-05-18 23:09:29 +08:00
William Cheng
702e274659 update samples 2021-05-13 18:51:38 +08:00
William Cheng
5e29d61639 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-05-13 18:44:58 +08:00
Yusuke Hosonuma
44efb7a3f6
[python][flask] specify flask version 1.1.2 (#9471) 2021-05-13 17:28:47 +08:00
William Cheng
456023b77c
Update erlang-server dependencies (#9414)
* update erlang-server dependencies

* reenable erlang-server test

* test with 2.7.0

* use only cowboy

* comment out erlang server test
2021-05-12 17:08:59 +08:00
William Cheng
be214dc349 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-05-07 10:15:12 +08:00
William Cheng
560bf7e080
v5.1.1 release (#9421) 2021-05-07 09:57:19 +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
William Cheng
1c1c6b465f
[kotlin-server-deprecated] minor improvements (#9367)
* minor wording change

* remove samples

* remove yaml
2021-04-29 11:50:05 +08:00
Rustam
ccbb78e1b2
Keep old Ktor server generator for backward compatibility (#9365) 2021-04-29 08:26:57 +08:00
Rustam
53398a0850
Ktor server upgrade (#9088)
* Update to new ktor version #9087

* Update doc #9087

* Cleanup #9087
2021-04-28 21:57:15 +08:00
William Cheng
b63d735312 update samples 2021-04-28 21:14:23 +08:00
William Cheng
3e58b0908c Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-04-28 18:08:24 +08:00