20229 Commits

Author SHA1 Message Date
Christian Schuster
5bbdc62ada
create explicit copy of system properties (#7601) (#9653) 2021-06-15 21:27:13 +08:00
William Cheng
ef3186f4a6 comment out python fastapi test due to failure in ci 2021-06-15 15:26:30 +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
randomswdev
3edeaeea07
Fix single inheritance code generation for goserver (#8356)
Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>
2021-06-14 18:56:02 +08:00
William Cheng
795c25d273 update go gin server samples 2021-06-14 18:50:21 +08:00
parpa
376e4192e1
Update routers.mustache (#9662)
Add PATCH suppord.
2021-06-14 18:48:55 +08:00
William Cheng
d14a82f7a7
update readme with travis-ci.com (#9762) 2021-06-14 18:22:57 +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
874d7d4f97
skip oauth files in java feign (#9760) 2021-06-14 18:04:34 +08:00
William Cheng
45175f018b update haskell-servant samples 2021-06-14 17:01:26 +08:00
Profpatsch
cdb92086db
[haskell][server]: Set "AnyType" to Aeson.Value (#9733)
* [haskell][server]: Set "AnyType" to `Aeson.Value`

`AnyType` would not be translated to the json value type.
This fixes that.

* [haskell][server] Fix haddock error in `API.hs`

Haddock (the Haskell documentation generator) would choke on the
misplaced docstring. The heading has to appear inside the list.
2021-06-14 17:00:11 +08:00
Ivan
856eca4ee6
Hide buildOauthRequestInterceptor under isOAuth section (#9147) (#9736) 2021-06-14 15:39:55 +08:00
Daiki Ojima
5c1270aa37
fix(readme): update brew cask usage (#9757) 2021-06-14 15:08:21 +08:00
Tino Fuhrmann
0dcae66e0c
Revert "[typescript] Generate documentation and examples (#9413)" (#9758)
This reverts commit 624b6a7a85a22579f26be47698c99e583f582c64.
2021-06-14 08:12:41 +02:00
Yuriy Belenko
150dfa2ddd
Add ybelenko as php-slim4 template creator (#9754)
Thanks to Julian(jfastnacht) who started Slim3 generator and maintained it
until Nov 27, 2017(latest PR). Since Slim4 codegen is based on deprecated
Slim3 I greatly appreciate your commitment.
2021-06-13 01:24:56 +08:00
NouemanKHAL
624b6a7a85
[typescript] Generate documentation and examples (#9413)
* generate docs for typescript

* commit changed files
2021-06-12 09:31:40 +02:00
Payal Gadura
98ae4ab614
Filter out problem+json mime type from JSON mime types (#9680) 2021-06-11 00:59:22 +08:00
Ygal Blum
bd18ba6b41
operationId: Allow getting only the method name (#9719) (#9724)
Add new configuration flags: REMOVE_OPERATION_ID_PREFIX_DELIMITER and REMOVE_OPERATION_ID_PREFIX_COUNT
Add the corresponding fields in the DefaultCodegen
Sanitize the operationId according to the new fields
Add delimiter to list of nonNameElementPattern
Add unit test
2021-06-11 00:02:03 +08:00
FallenRiteMonk
6611ae64bb
[dart] fix Date.toDateTime utc (#9717) 2021-06-10 11:11:08 +08:00
dependabot[bot]
99994945c7
Bump actions/cache from 2.1.5 to 2.1.6 (#9614)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-10 11:10:15 +08:00
Peter Leibiger
46bf3e8e46
[ci] Only run samples when they actually changed (#9636)
* [ci] Only run samples when they actually changed

* in pull requests only run the samples that matter
* if a sample is outdated it will still fail in the build pipeline

* Test Kotlin sample changes

* Revert Kotlin sample change
2021-06-10 11:08:23 +08:00
Fabian Sellmann
32c1e925dc
[typescript-fetch] runtime: pass init and url as returned by the premiddleware to the postmiddleware (#9716)
* pass init and url as returned by the premiddleware to the postmiddleware

Current implementation will always pass the initial url and init object. However if a pre middleware changes returns an object whose `init` or `url` property refer to a different url string or object, any following post middleware wont have access to it. Effectively providing the post middleware with a completely different request information then what was actually used to make the fetch call.

* update samples and docs
2021-06-09 18:23:50 +02:00
devhl-labs
46f8a6733a
[csharp] Move nullable reference types switch to abstract (#9661)
* moved switch to abstract

* build samples

* added nullable option to csproj

* removed unused method

* added switch back to aspnetcore

* build samples
2021-06-09 16:09:39 +08:00
Samuel Kahn
f1ee1cbe2e
[cpp-ue4] Updated generator to return the http request so that it can be canceled or further manipulated. (#9693) 2021-06-09 15:45:45 +08:00
William Cheng
cce0d0a222
update resteasy dependencies (#9729) 2021-06-09 15:43:55 +08:00
William Cheng
0e93e79cd6
Fix Appveyor CI issues (#9731)
* sleep for 15 seconds after starting the server

* fix sleep

* set clone depth to 1
2021-06-09 14:53:44 +08:00
William Cheng
d33660453a
Add a link to flutter blog post (#9730) 2021-06-09 14:12:08 +08:00
William Cheng
85e77e77fc
[Android] update httpclient version, fix compilation issue in the sample (#9728)
* update httpclient version, fix compilation issue in the sample

* add new file
2021-06-09 13:21:10 +08:00
dependabot[bot]
8d2d4ac154
Bump actions/download-artifact from 2.0.8 to 2.0.9 (#9458)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2.0.8 to 2.0.9.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2.0.8...v2.0.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 10:06:49 +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
Bruno Coelho
e600f7d149
[kotlin][client] silence deprecation warning (#9656)
* [kotlin][client] silence deprecated warning when used internally

* [kotlin][client] update sample projects
2021-06-08 23:17:20 +08:00
William Cheng
c379f5bcc4
encode URL parameters (#9688) 2021-06-08 10:02:33 +08:00
William Cheng
37b7c80c4f
null check on $ContentTypes (#9687) 2021-06-08 09:09:21 +08:00
Mike Marchetti
7125ef43f5
Typescript: fix: add paramPropertyNaming (#9546)
Model naming conforms to the property: modelPropertyNaming, however the
parameter naming scheme is currently hardcoded to camelcase. Since the
parameter names are closely tied to the model properties names, is maybe
desirable to use a similar naming approach.

The toParamName cannot directly use the paramPropertyNaming since that
will cause issues with current generated code, since the
modelPropertyNaming currently defaults to "original"

A new property has been created to override this behavior, named
"paramPropertyNaming", and its default is set to "camelcase".
2021-06-07 22:17:25 +02:00
Georgy Ushakov
64ee3fe207
Added support for async accessToken in typescript-fetch (#9659) 2021-06-07 22:15:01 +02:00
cal
3cbc5a8f93
[cleanup] erefactor/AutoRefactor - Log parameters rather than log message (#9133)
AutoRefactor cleanup 'LogParametersRatherThanLogMessage' applied by erefactor:

Replaces a string concatenation as parameter of a logger method by a
string template followed by objects.

For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor
For erefactor see https://github.com/cal101/erefactor
2021-06-07 14:26:56 +08:00
cal
19f5718477
[cleanup] erefactor/AutoRefactor - Log parameters rather than log message (#9664)
AutoRefactor cleanup 'LogParametersRatherThanLogMessage' applied by erefactor:

Replaces a string concatenation as parameter of a logger method by a
string template followed by objects.

For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor
For erefactor see https://github.com/cal101/erefactor
2021-06-07 14:25:30 +08:00
cal
2d5199f80f
[cleanup] erefactor/AutoRefactor - Log parameters rather than log message (#9665)
AutoRefactor cleanup 'LogParametersRatherThanLogMessage' applied by erefactor:

Replaces a string concatenation as parameter of a logger method by a
string template followed by objects.

For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor
For erefactor see https://github.com/cal101/erefactor
2021-06-07 14:24:18 +08:00
Gabriel Castro
9099b43cd8
bump swagger-parser-version to v2.0.26 to close #9086 (#9631)
* bump swagger-parser-version to v2.0.26

* add tests for #9086
2021-06-07 12:44:49 +08:00
William Cheng
c2cc7a02aa
Fix kotlin client issue in maven plugin tests (#9690)
* fix kotlin client issue in maven plugin tests

* set version to v1.5.10

* update doc
2021-06-07 12:44:23 +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
Bruno Coelho
8c268c9578
[swift][client] make swift 5 generator stable (#9666) 2021-06-07 10:46:52 +08:00
Peter Leibiger
fdbf02764d
[dart][dart-dio] Add support for query collection parameter format (#9635)
* [dart][dart-dio] Add support for query collection parameter format

* add support for collectionFormat in query parameters and www-url-encoded content
* add tests
* remove empty query parameter maps from generated code
* closes #6681
* closes #9522
* closes #8271 (the last remaining parts)

* Fix formatting
2021-06-07 09:49:59 +08:00
Ayman Bagabas
f923a0ef15
Swift5 Vapor 4 client library (#9625)
* [swift5] Add Vapor client library

* Try to improve overall spacing (#17)

* [swift5] try to remove changes in model and api

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* Update samples

* [swift5] vapor: return clientResponse when no default case

* Update samples

Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com>
2021-06-06 22:08:14 +08:00
Mike Nelson
c5fefa938a
(#8000) Insure toImportMap only returns needToImport (#9275)
`toModelImportMap` only accounts for union types and not intersection types, so I've combined those cases into `splitComposedType`. For `splitComposedType` I combined `replace(" ","").split("\\|")` and `split("( [|&] )|[<>]")` into `replace(" ","").split("[|&<>]")`.

I've added the `needToImport` check to `toModelImportMap`. This is the same check that happens in `addImport`.
2021-06-04 08:03:32 +02:00
Armel Soro
a8c4cbd14d
fix(#9328): Gradle Plugin ValidateTask does not work under Gradle 7.0 (#9453)
* Allow to run ValidateTask tests against Gradle 7.0 as well

* Drop setters for ValidateTask properties of mutable types

This is applicable to the following properties:
- inputSpec
- recommend

Otherwise, Gradle 7.0 now returns an error when attempting
to configure this task.

See https://docs.gradle.org/7.0/userguide/validation_problems.html#mutable_type_with_setter

* Be more specific about the versions of Gradle tested in ValidateTaskDslTest

Test against the latests Gradle 5.x and 6.x versions
2021-06-03 23:07:34 +08:00
Dheeraj Nalluri
972ad566fe
[typescript-angular] Fix undefined query param (#9657) 2021-06-03 07:58:53 +02: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
ricou13770
2b495fc7a3
Fix module "go-server" - template "controller-api.mustache" : query.Get() must use {{baseName}} instead of {{paramName}} on boolean and default query parameters (#9580) 2021-06-03 10:02:00 +08:00