11973 Commits

Author SHA1 Message Date
Tino Fuhrmann
0dcae66e0c
Revert "[typescript] Generate documentation and examples (#9413)" (#9758)
This reverts commit 624b6a7a85a22579f26be47698c99e583f582c64.
2021-06-14 08:12:41 +02: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
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
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
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
Blackclaws
439a1a9ba2
Do not validate enum parameters (#9594) 2021-06-03 09:55:47 +08:00
Mikael Lixenstrand
cdc00769aa
[Erlang] return empty body for 204 (#9512)
* fix handle_request_json spec res

* fix client spec

* make it possible to answer with 0 size binary for 204

* only generate empty bin for 204

* only generate empty bin for 204
2021-06-03 09:49:32 +08:00
Shyla Srinivas
3c866fb4a3
Fix python generation when custom files and templates are specified (#9572)
* fix python generation when custom files and templates are specified

* add test for processUserDefinedTemplates
2021-06-02 09:13:10 -07:00
Troy P
7bb7c72cc5
Adding usePythonSrcRootInImports logic to AbstractPythonConnexionServerCodegen. (#9558) (#9559) 2021-06-02 09:03:45 -07:00
Michael Janssen
b9e75951e7
Add nullable annotation support to AspNetCoreServer (#9620)
* Add nullable annotation support to AspNetCoreServer

* Adjust naming for compatability with PR #9235 by @dehl-labs
2021-06-02 11:54:16 +08:00
Bruno Coelho
0f51662650
[kotlin][client] small improvements (#9640)
* [kotlin][client] standardize adapter type names

* [kotlin][client] remove unused class

* [kotlin][client] fix IDE warning

* [kotlin][client] improve import layout

* [kotlin][client] update sample projects
2021-06-02 11:07:26 +08:00
Ayman Bagabas
9bce71656c
Swift5 namespace changes (#9624)
* [swift5] Rename the API class to {{projectName}}

Instead of {{projectName}}API. This removes some unnecessary naming
complexity.

* [swift5] Define models and Configuration classes under namespace

When swiftUseApiNamespace is set, API classes get defined under the
projectName namespace. This does the same for models and the
Configuration class. Plus adding a deprecation warning when using the
un-namespaced variants.

* [swift5] Use CodingKeys in model decoder

Fixes: 0f5e7d1e3cb9 ("Swift5 models improvements (#9205)")

* [swift5] Add swiftUseApiNamespace to urlsessionLibrary config

* Update samples

* Try to reduce model changes

Co-authored-by: Bruno Coelho <4brunu@gmail.com>
2021-06-02 00:45:01 +08:00
William Cheng
ae0cce0481
add sponsor message to python fastapi (#9637) 2021-06-01 11:26:15 +08:00
Bruno Coelho
463ae10c4a
[kotlin][client] update dependencies (#9629)
* [kotlin][client] update dependencies

* [kotlin][client] update sample projects

* [kotlin][client] fix update dependencies
2021-06-01 10:09:48 +08:00
Bruno Coelho
6cf4843249
[swift5][client] update dependencies (#9633)
* [swift5][client] update dependencies

* [swift5][client] update sample projects

* [swift5][client] update dependencies in Carthage
2021-06-01 10:09:22 +08:00
Sascha Peilicke
173a349e04
Kotlin: Fix kotlinx_serialization code generation (#9576)
And update to Kotlin 1.5.0 and kotlinx.serialization 1.2.1. Fix nested
enum annotation '@Serializable' instead of '@KSerializable' when
'kotlinx_serialization' is used. Fix missing JsonMediaType in
ApiClient.kt (#9242). Add 'kotlinx_serialization' serialization library
to documentation. Use explicity type in RequestConfig to keep type
information for JSON serialization.

Resolves #9242
2021-05-31 21:48:39 +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
Ayman Bagabas
c4df343052
[Swift5] Add useClasses cli option (#9608)
* [swift5] Add useClasses cliOption

* Update swift docs
2021-05-31 10:37:14 +08:00
Peter Leibiger
afd65b3cb0
Update query parameter sample to include pipe delimiter (#9590) 2021-05-30 17:45:38 +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
Bruno Coelho
dee2840b20
[swift5][client] improve docs for Data (#9605) 2021-05-30 17:40:09 +08:00
Peter Leibiger
f7b93ebdf2
Update fake API to contain sample with binary body (#9610) 2021-05-29 10:26:01 +08:00
Stefan Hanselmann
1b6fd2dd7a
[Kotlin][retrofit2] replace okhttpclient with callfactory (#9451)
* [Kotlin][Retrofit][#9448] Replace OkHttpClient parameter with Call.Factory.

* [Kotlin][Retrofit][#9448] Update sample project.
2021-05-28 21:50:28 +08:00
William Cheng
763f65f293
[Wsdl] minor improvements, bug fixes (#9613)
* minor improvements to wsdl-schema gen

* better code format

* update readme
2021-05-28 21:38:36 +08:00