11973 Commits

Author SHA1 Message Date
Yasuhiro ABE
d4748a7a20
Dockerfile for the Ruby-Sinatra generator (#9299)
* add the Dockerfile and updated the README and others.

Signed-off-by: Yasuhiro ABE <yasu-abe@u-aizu.ac.jp>

* fixed the indent to follow the coding style guide.

Signed-off-by: Yasuhiro ABE <yasu-abe@u-aizu.ac.jp>

* revised.

Signed-off-by: Yasuhiro ABE <yasu-abe@u-aizu.ac.jp>
2021-04-21 15:46:56 +08:00
William Cheng
ebc98ec848
[PowerShell] improve return type documentation (#9295)
* revise return type doc

* revise return type doc
2021-04-21 10:01:41 +08:00
Sean Kelly
ef2299ad65
Qt5 support date format enum (#9283)
* initial commit

* Update sample and make sure it builds

* PR feedback

* Limit scope of struct to within the class and fix whitespace
2021-04-21 09:55:30 +08:00
Josh Wittner
28e0d9b22e
Support FGuid with helpers (#9291) 2021-04-20 21:23:36 +08:00
William Cheng
51028f0c1b
prevent NPE in constructing oneOf example (#9231) 2021-04-20 15:05:34 +08:00
William Cheng
da37e980d3
[Kotlin]] add support for binary response (#9284)
* Support File responses for Kotlin client

* Regen samples

* Reset version

* Fix file class check

* Add imports

* use Files.createTempFile instead

* better tmp file naming

Co-authored-by: Mischa Spiegelmock <me@mish.dev>
2021-04-17 18:25:32 +08:00
William Cheng
77dfd40681
[Enhancement] added support for custom type & format mapping (#9285)
* resolve merge conflicts

* use + in type mapping, add tests

* add new test spec
2021-04-17 18:24:59 +08:00
Themi Tsiotas von Pfaler
a9c7644c32
[typescript-axios] add missing baseName when using set or append on FormData (#9273) 2021-04-17 09:14:55 +02:00
Emmanuel Roux
032911990d
typescript-angular: Fix Cannot read property 'apiKey' of undefined (#9260)
* fix #9259

* avoid optional chaining operator
2021-04-16 16:54:58 +02:00
Cody Mikol
b5dac42959
feat(adapter): add BigDecimal kotlin support (#8880)
* feat(adapter): add BigDecimal kotlin support

this allows the kotlin client generator to support
BigDecimal values

Fixes #7196

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-04-16 22:24:10 +08:00
Luca Mazzanti
3929afff7d
[csharp][netcore-httpclient] Refactor of constructors (#9145)
* Refactor on constructors

Updated samples

Fixed a bug of previous commit

Refactor on constructors

* Fixed indentation in source code

* Updated samples

* Marked constructors with obsolete

* Updated obsolete constructors messages

* Updated samples
2021-04-16 22:03:07 +08:00
William Cheng
515d4a0153
[Java][JavaJaxRS] Respect readOnly/writeOnly attribute markers (#9276)
* [Java] [JavaJaxRS] Respect readOnly/writeOnly attribute markers

Generate jackson JsonProperty like following:
- `readOnly` is present in Spec: `@JsonProperty(value = "[name]", access = JsonProperty.Access.READ_ONLY)`
- `writeOnly` is present in Spec: `@JsonProperty(value = "[name]", access = JsonProperty.Access.WRITE_ONLY)`

Edge case: both are present -> Spec is invalid and generator cancels anyway with:
> org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
> | Error count: 1, Warning count: 1
> Errors: 
>	-attribute components.schemas.Example. writeOnly and readOnly are both present

* update samples

Co-authored-by: Michael Kroll <9883575+mickroll@users.noreply.github.com>
2021-04-16 18:07:41 +08:00
Christopher Schramm
4a63aae746
[Kotlin] Fix (de)serialization of enum classes (#7917)
While inner enum classes from dataClass.mustache work fine, standalone enum classes lack `@JsonProperty` annotations so that Jackson uses names instead of values.
2021-04-16 12:01:05 +08:00
Moshe Elisha
af992e4b29
[Java] [Native] Add response body to exception message (#9169)
* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 56e2b1fb

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 335c304d

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* [Java] [Native] Add response body to exception message

* [Java] [Native] Use default base URI if baseUri param is null

* [Java] [Native] Use default base URI if baseUri param is null
2021-04-16 11:02:56 +08:00
Stieglitz
6dce8179de
[Kotlin] Fix (de)serialization of enum classes (kotlinx serialization) (#9143)
* fix kotlin enum serialization

* fix kotlin serialization compiler warning

* change samples
2021-04-16 10:46:51 +08:00
jenswet-el
786458e928
Add missing ResponseBody import (#9239) 2021-04-16 10:11:04 +08:00
Thomas Hervé
60dcf8613f
Don't include read-only properties in Python examples. (#9252)
* Don't include read-only properties in Python examples.

When using a schema with read-only fields as API inputs, Python
generates examples for those: this excludes them.

* Fix tests
2021-04-14 11:43:28 -07:00
Vincent Galloy
9edf70e980
@Input and @Internal should not be apply on the same property (#9059)
Motivation:

In Gradle 7.0 apply @Input and @Internal on property is forbidden.
Before Gradle 7.0 applying both on the same property is confusing. According to the documentation:

* @Input: Attached to a task property to indicate that the property specifies some input value for the task.
* @Internal: Attached to a task property to indicate that the property is not to be taken into account for up-to-date checking
2021-04-14 17:02:48 +08:00
William Cheng
19b68f75de
[Docker] support multi-arch build (#9246)
* multi arch build

* fix buildx

* use openjdk

* fix bash install

* remove armv7

* remove arm64

* use jre 11

* add v8

* skip bash install

* add back tests

* remove v8

* minor change

* fix tag and push

* fix tag

* skip pull request for dockerhub push
2021-04-14 11:15:12 +08:00
William Cheng
1b63822501
camelize name in nim (#9255) 2021-04-14 10:14:59 +08:00
Peter Leibiger
b4ea00ed42
[dart][dart-dio] Add built_value date support w/o timemachine (#9180)
* [dart][dart-dio] Add built_value date support w/o timemachine

* Test improvements

* Fix lists of dates not working
2021-04-13 16:52:27 +08:00
Eike Starkmann
7a1f7b2270
Update model_variables.mustache (#7074)
Recursive validate non primitive objects
2021-04-13 14:57:50 +08:00
Peter Leibiger
29c1688860
[dart][dart-dio] Update pubspec/readme templates (#9201)
* Add homepage option to pubspec.yaml

package validation fails when trying to publish to pub.dev

See: https://dart.dev/tools/pub/pubspec
Blocking https://github.com/bigpanther/trober/pull/108

cc: @kuhnroyal

* Add missing fields

* Update templates and generate samples

Co-authored-by: Harsimran Singh Maan <maan.harry@gmail.com>
2021-04-13 14:37:15 +08:00
William Cheng
13c0b2c3c7
Use warning instead of throwing exceptions (#9188)
* use warning instead of throwing exceptions

* comment out tests
2021-04-13 14:09:19 +08:00
William Cheng
1f227061c6
add sponsor message in F# giraffe generator (#9247) 2021-04-13 13:50:41 +08:00
Aliaksei Zhuk
53e5986800
[Go] Parse int arrays and respect the 'required' property (#9120)
* Added int arrays parsing in parameters. Respect the 'required' property.

* Replaced spaces with tabs

* Generate samples with new spacing

* Removed unused import

* Merged with latest master
2021-04-11 23:43:53 +08:00
johannes karoff
63fdd3eaf0
support uuid parameter (#9215) 2021-04-11 18:42:00 +08:00
gbmarc1
8e0955fd3c
Bug - python client deserialization when attribute named self (#9006)
* fix by mapping outside of class

* tests

* regeneration and tests

* server

* INDENT

* a

* enable mapping

* Revert "server"

This reverts commit 6fc9712fb550d258d0332df243ea5080565c6770.

* Samples regenerated

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2021-04-10 19:00:32 -07:00
William Cheng
14c7f39c2b
[C#][netcore] Add multiple frameworks support (#9196)
* add multiple frameworks support

* test in appveyor

* update samples
2021-04-09 21:25:56 +08:00
Guy King
23c9627b98
Resolve response type name conflict in angular typescript lib (#9216)
* fix: rename var

* fix: run pr checklist scripts

* fix: correct response type var name for http client

* chore: run build scripts

* test: ci and correct name?
2021-04-08 21:57:23 +02:00
Esteban Gehring
fa4462ef11
Revert "Resolve responseType name conflict in Angular Typescript lib (#9202)" (#9214)
This reverts commit 9dda4aa2e8a48bf5237ec51705039493a0822614.
2021-04-08 18:52:54 +02:00
mazrean
01ff635139
[Go] Fix golang comment typos (#9207)
* fix go comment typo insensitive

* fix go comment typo response

* update samples
2021-04-08 09:59:31 +08:00
Guy King
9dda4aa2e8
Resolve responseType name conflict in Angular Typescript lib (#9202)
* fix: rename var

* fix: run pr checklist scripts
2021-04-07 19:35:20 +02:00
Peter Leibiger
065c0281fa
[dart] Improve types & imports (#9167)
* [dart] Improve types & imports

* don't use importMapping as it is intended for something different that is not possible in dart
* introduce imports map for dart specific features
* always import `dart:core`
* get rid of additionalReservedWords
* fix `--type-mappings` not working
* use required type mappings in samples
* no longer define additional reserved words  as it is impossible to list all anyways, they can now be configured via type-mapping parameter
* simplify dio imports

* Don't use guava for map instantiation

* Update docs
2021-04-07 00:33:35 +08:00
HexagonSun
acedd1cfba
[typescript-angular] Provide return value for all code paths (#9174) (#9176)
In order to avoid a compiler error when using `noImplicitReturns `, we
change the mustache template to use provide a return value for the if-
and else branch.

Fixes #9174.
2021-04-06 07:21:11 +02:00
Makoto Aoyama
c3b7ecff21
Add Hashable for Struct (#9166)
* Add hashable for struct

* Remove x-swift-hashable

* Run the shell script ./bin/generate-samples.sh
2021-04-06 10:50:23 +08:00
Peter Leibiger
29c131e781
[dart][dart-dio] Update dependencies (#9178)
* finally use released versions for http mocking
2021-04-05 23:39:18 +08:00
Thibault Duperron
4462d35195
Link filehash with execution id (#7848)
Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-04-05 21:11:27 +08:00
Yuri Orlov
659b00a4f9
use standard constant for UTF8 charset in generated java api clients (#7828) 2021-04-05 20:02:28 +08:00
William Cheng
5dae270c3e
[Go][server] parse bool in query parameter (#9171)
* Add bool query in example

* Add parseBoolParameter

* test with boolean parameter

* add endpiont for testing boolean

* remove bool parameter test

Co-authored-by: Stéphane Guillemot <gmtstephane@gmail.com>
2021-04-05 16:45:38 +08:00
William Cheng
c79d056935
Allow to specify response headers (needed for redirecting clients) (#9170)
* Allow to specify response headers (needed for redirecting clients) (#8148)

Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>

* add addResponseHeaders option

* enable addResponseHeaders

* fix comma

Co-authored-by: randomswdev <randomswdev@users.noreply.github.com>
Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>
2021-04-05 16:27:41 +08:00
Hippolyte HENRY
f8202df9aa
[go] Add constructor and IsValid method to enum types (#8224)
* Add constructor and IsValid method to enum types

* Add samples
2021-04-04 17:32:17 +08:00
lerminou
7cf6ee1957
[php-symfony] fix double quoting string defaults values (#9126)
quoting for default values is already done in:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java#L533
2021-04-04 10:40:16 +08:00
Martin Delille
c9716fcebb
Include QVariant helpers header (#9161) 2021-04-04 10:06:57 +08:00
Justin Black
fc58adee31
Fixes serialization of array items in model_to_dict [python] (#9153)
* Adds tests of endpoint with inline and refed model

* Regen samples

* Samples regenerated
2021-04-01 13:34:19 -07:00
sforst
7bf792a348
[typescript-axios] handle uniqueItems in query and header parameters (#8965)
* [typescript-axios] handle uniqueItems in query and header parameters

add endpoint /fake/test-unique-paramters to petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml for demonstration

* update samples

* [typescript-axios] update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-04-01 16:57:36 +08:00
cal
57e44e173f
[cleanup] erefactor/EclipseJdt - Evaluate without null check (#9134)
EclipseJdt cleanup 'EvaluateNullable' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-04-01 11:32:10 +08:00
de1mos
b335ba834f
fix #7325 kotlin-spring fix reactive delegate pattern combination (#8867)
* #7325 kotlin-spring remove exchange field from reactive delegate pattern

* #7325 remove examples from kotlin-spring reactive delegate and add missing import

* #7325 add test assertions

* fix swagger spec in test
2021-04-01 09:47:11 +08:00
William Cheng
917b358e27 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-04-01 09:25:19 +08:00
Noor Dawod
26ca6ab27e
[Dart2] Add initial support to use an isolate to offload JSON serialization/deserialization (#9100)
* Change signature of deserialize() to be a Future.

* Grammar tlc for a couple of sentences.

* Make serialize() use a Future also.

* Add useCompute as a parameter to ApiClient, adjust to use compute when serializing/deserializing.

* Updated Pet Store client code.

* Ordered imports.

* Remove Flutter-specific implementation.

* Rename global functions to serialize/deserialize JSON.

* Fix return type for apiClientSerialize.

* Updated pet store client code.

* Remove remark for _deserialize.

* Make _decodeBodyBytes a Future function.

* Updated pet store client code.

* Use await when calling serialize().

* Fix a grammatical error.

* Adjust doc.

* Centralize deserialization code in one function.

* Updated pet store client code.

* Add await to serialize() in few more tests.

* Make output look better for linting and humans.

* Updated pet store code.

* Add an empty line.

* Updated pet store code.

* Call the right serializer.

* Reuse same variable.

* Updated pet store code.

* Fix a logical error when deserializing.

* Calculate growable once.

* Ignore reassignment.

* Adjust a test.

* Regenerate petstore code.

* Revert back previous test.

* Use serialize() for testing.

* Revert using serialize() for testing.

* Add removal deprecation for serialize/deserialize.

* Updated petstore code.

* Updated deprecation note.

* Adjust tests to wait for futures.
2021-03-31 23:53:22 +08:00