5759 Commits

Author SHA1 Message Date
Richard Whitehouse
9647416032
[Rust Server] Support types with additional properties (#3666)
[Rust Server] Support additional property types

* Add support for types which only contain additional properties

* Update samples
2019-09-15 14:27:40 +01:00
Nicholas Muesch
334d0dcb48 Support Multiple API Keys (#3450)
* Support Multiple API Keys

* Use maps

* Fix readme template

* Update readme

* Address readme review
2019-09-14 21:28:31 +08:00
Wooyme
87dce1bfe1 [Kotlin][server] Add kotlin-vertx-server (#3031)
* add kotlin-vertx

* add kotlin-vertx

* update kotlin server

* update

* move Fsharp... in Config

* replace java model to kotlin model. delete useless code

* add kotlin-vertx readme.md

* add kotlin-vertx

* add model null safety

* change to vert.x offical web api

* fix date and datetime missing

* fix fileupload
2019-09-14 20:57:53 +08:00
William Cheng
e0b56502a3
Minor improvement to asciidoc doc generator (#3889)
* minor improvement to asciidoc geneator

* remove empty line
2019-09-14 20:30:34 +08:00
Man
8055231400 asciidoc markup generator (#3845)
* basic asciidoc markup generation

* asciidoc markup include processing with mustache filter

* asciidoc tests, separate include filters

* asciidoc petstore sample

* add asciidoc generator to readme

* test asciidoc generator for all include files with own json spec.

* link fillter to link generated test data into asciidoc markup

* fix and cleanup names asciidoc tests.

* fix travis build error, removed windows line endings from mustache asciiidoc templates.

* asciidoc generator: comment and reduce visibility of helper method (fix dron build)

* asciidoc: windows linefeed again (fix travis ci)

* asciidoc generator: remove \t and format again.

* fix ascidoc generator ci builds ... ongoing..

* asciidoc: add generator .md files, unix line ending.
2019-09-14 18:39:58 +08:00
Jaumard
ec5df2e1c0 Change Uint8list by List<int> because it cause trouble with last versions of jaguar (#3871) 2019-09-14 18:32:16 +08:00
William Cheng
95c4a05b70
various minor improvements to nim generator (#3883) 2019-09-13 16:48:18 +08:00
Hideki Okamoto
f15f814d9b Add Nim client code generator (#3879)
* First version of Nim Client

* Add some codes

* Add some codes

* Add some codes

* Add some codes

* Add some codes

* First version of Nim Client

* Add some codes

* Add some codes

* [Dart] Fix README template and update testing doco (#3809)

* [Dart] Fix README template and update testing doco

- deleted redundant shell script
- fixed and updated README template
- updated test package and moved to a dev_dependency
- removed old unused dev_dependency packages
- updated testing documentation in petstore sample

* Remove references to dart-flutter-petstore.sh

* Fix typos

* Fix typo

* Support custom git repository (#3757)

* add gitHost param to GeneratorSettings and related

* parameterize gitHost in READMEs

* parameterize gitHost in go.mod

* parameterize gitHost in git_push

* update petstore samples

* run ./bin/utils/export_docs_generators.sh

* run meta-codehen.sh

* Revert "run meta-codehen.sh"

This reverts commit d6d579f6159186531257cdfdd73b9caf9e9ffeba.

* Revert "run ./bin/utils/export_docs_generators.sh"

This reverts commit 1b81538198d4319fd1b4e97447303e3cc0e8dc99.

* Revert "update petstore samples"

This reverts commit f513add88396707f6991ae2e4920359583ec88f1.

* run ensure-up-to-date

* Add links to article and video (#3820)

* Better Go code format (#3819)

* better varible naming

* better comments

* better code format for go experimental client

* better comment, update samples

* Add some codes

* Add some codes

* Add some codes

* Add gRPC Protobuf schema generator (#3818)

* add grpc protobuf generator

* update doc

* add new doc

* add windows batch, comment out root proto

* 1792 fix remote spec handling and hash calculation (#3440)

* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam} (#3821)

* Revert "1792 fix remote spec handling and hash calculation (#3440)"

This reverts commit 2a2eefe93d81b8d253745b8adb002ab2cb9eee04.

* Add  nickmeinhold to Dart technical committee (#3830)

* Bug #2845 typescript angular inheritance (#3812)

* issue #2845: enable 'supportsMultipleInheritance' on typescript angular client codegen

- note I reran ./bin/openapi3/typescript-angular-petstore-all.sh and no changes occurred.
  this suggests to me that the petstore.yaml sample should be improved to make use of the
  anyOf / allOf / oneOf keywords, in order to better show the effects of changes on generated code.

* issue #2845: run ./bin/openapi3/typescript-angular-petstore-all.sh

* run `mvn clean package && ./bin/typescript-angular-petstore-all.sh`

* revert extranous files

* fix warnings in csharp-netcore client (#3831)

* Add missing files to the form request (#3834)

* [client][go] avoid duplicated reflect imports (#3847)

* Following up for #3440 (1792 fix remote spec handling and hash calculation) (#3826)

* This patch fixes the bug that we cannot access to remote files when checking file updates.
Following up #3440, supporting auth.

* 1792 fix remote spec handling and hash calculation (#3440)

(cherry picked from commit 2a2eefe93d81b8d253745b8adb002ab2cb9eee04)

* fix detecting remote file / local file logic while finding the hash file, taking care of IllegalArgumentException for local files.

* add testcase

* Add a link (#3850)

* Add Element AI to the list (#3856)

* maven-plugin-plugin 3.6.0 (#3854)

*  [Java][okhttp-gson] fix failure to deserialize floats (#3846)

* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam}

* fix to bug #3157

* update samples

* Adds Http Info To Dart Api (#3851)

* [C++][Pistache] Add missing setter for arrays (#3837)

* [C++][Pistache] Add missing setter for arrays

Fixes #3769

* [C++][Pistache] Update Petstore sample

* typescript-inversify: improve check for required parameters, support multiple media types (#3849)

* [typescript-inversify] Allow falsy parameters

A required parameter to an api method must not be `null` or `undefined`.
It can be any other falsy value, e.g. `""`, `0` or `false` though. This
change makes sure an error is only thrown in the former case and not in
the latter.

* [typescript-inversify] Handle multiple media types

The Accept and Content-Type HTTP headers can contain a list of media
types. Previously all but the first media type in the api definition
were ignored. Now the headers are properly generated.

* [typescript-inversify] Fix http client interface

The api service methods allow the `body` parameter to be optional. The
parameter is then passed to an `IHttpClient`. So it needs to be optional
there as well.
Also fixed the sample implementation `HttpClient`.

Fixes #3618.

* [typescript-inversify] Regenerate Petstore sample

* [typescript-inversify] Use more explicit null check

This does not change the semantic of the generated code, but makes it more explicit.

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>

* [typescript-angular] allow empty string basePath (#3489)

* [typescript-angular] Fixing #2731 - empty string basePath

* typescript-angular: refactor base path configuration

* typescript-angular: refactor base path configuration

* Fix/r/serialization fix and minor 3xx resp fix (#3817)

* fix(qlik): fix for minor serialization bug

* fix(r): add petsore generated classes

* fix(r): indendation fixes

* typescript-axios: Fix baseoptions (#3866)

* Fixed missing baseOptions of typescript-axios.

The typescript-axios template was missing the baseOptions setting when building an API Configuration. Set it.

* update sample.

* re-generate typescript axios samples

* Rename gRPC generator to "protobuf-schema" (#3864)

* rename grpc generator to protobuf-schema

* update doc

* Prepare v4.1.2 release (#3873)

* update samples

* update date

* fix version in readme

* BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3860)

Adds the format annotation so that Spring is able to serialize OpenApi date/date-time format into LocalDate/OffsetDateTime.

* update doc, samples (#3875)

* update stable release

* Update the batch for Windows

* Add a test snippet

* Update ensure-up-to-date

* Add Nim to README.md

* Ran ensure-up-to-date to pass CircleCI tests
2019-09-13 15:56:54 +08:00
Benjamin Simpson
f27ff79e93 updated google-api-client version from 1.23.0 to 1.30.2. Bugfix #3625 (#3882) 2019-09-13 15:52:28 +08:00
Rémi Carton
763e7a0c14 typescript-fetch: fix missing comma in multiple imports (#3881) 2019-09-13 06:43:53 +02:00
sullis
e56bfe4af3 [scala][client] add Scala code generation test (#3859)
* [scala][client] add Scala reserved words test

* fix filesystem path in [ScalaAkkaClientCodegenTest]

* add additional reserved words in scala_reserved_words.yaml

* ScalaAkkaClientCodegenTest: set mainPackage

* scala_reserved_words.yaml: declare 'required' fields

* rename test method

* tweak test description
2019-09-12 21:50:20 +08:00
aeb-sia
dc2907aced typescript-node: Use HttpError class when rejecting promises (#3876)
* Use HttpError class when rejecting promises

Fixes #3872

* Update samples

* Test the new code in client.ts
2019-09-12 14:44:56 +02:00
William Cheng
ea029b4029
update doc, samples (#3875) 2019-09-11 21:17:11 +08:00
peyerroger
68967b8705 BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3860)
Adds the format annotation so that Spring is able to serialize OpenApi date/date-time format into LocalDate/OffsetDateTime.
2019-09-11 14:52:24 +02:00
William Cheng
3ebefccfa9
Prepare v4.1.2 release (#3873)
* update samples

* update date
2019-09-11 18:33:27 +08:00
William Cheng
e73bf9be1d
Rename gRPC generator to "protobuf-schema" (#3864)
* rename grpc generator to protobuf-schema

* update doc
2019-09-10 17:32:25 +08:00
koudenpa
d46bff9e78 typescript-axios: Fix baseoptions (#3866)
* Fixed missing baseOptions of typescript-axios.

The typescript-axios template was missing the baseOptions setting when building an API Configuration. Set it.

* update sample.

* re-generate typescript axios samples
2019-09-10 10:05:46 +02:00
Ramanth Addala
e18f361534 Fix/r/serialization fix and minor 3xx resp fix (#3817)
* fix(qlik): fix for minor serialization bug

* fix(r): add petsore generated classes

* fix(r): indendation fixes
2019-09-10 15:46:55 +08:00
Martin Novák
8d67acc3ed [typescript-angular] allow empty string basePath (#3489)
* [typescript-angular] Fixing #2731 - empty string basePath

* typescript-angular: refactor base path configuration

* typescript-angular: refactor base path configuration
2019-09-09 12:55:21 +02:00
Bodo Graumann
9ca4bac881 typescript-inversify: improve check for required parameters, support multiple media types (#3849)
* [typescript-inversify] Allow falsy parameters

A required parameter to an api method must not be `null` or `undefined`.
It can be any other falsy value, e.g. `""`, `0` or `false` though. This
change makes sure an error is only thrown in the former case and not in
the latter.

* [typescript-inversify] Handle multiple media types

The Accept and Content-Type HTTP headers can contain a list of media
types. Previously all but the first media type in the api definition
were ignored. Now the headers are properly generated.

* [typescript-inversify] Fix http client interface

The api service methods allow the `body` parameter to be optional. The
parameter is then passed to an `IHttpClient`. So it needs to be optional
there as well.
Also fixed the sample implementation `HttpClient`.

Fixes #3618.

* [typescript-inversify] Regenerate Petstore sample

* [typescript-inversify] Use more explicit null check

This does not change the semantic of the generated code, but makes it more explicit.

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>
2019-09-09 09:39:22 +02:00
Mateusz Szychowski (Muttley)
f2fe4fc200 [C++][Pistache] Add missing setter for arrays (#3837)
* [C++][Pistache] Add missing setter for arrays

Fixes #3769

* [C++][Pistache] Update Petstore sample
2019-09-07 12:20:04 +02:00
Austin Adams
096f2d0fc8 Adds Http Info To Dart Api (#3851) 2019-09-07 16:31:52 +08:00
Benjamin Simpson
239d68df36 [Java][okhttp-gson] fix failure to deserialize floats (#3846)
* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam}

* fix to bug #3157

* update samples
2019-09-07 12:36:19 +08:00
Quim Muntal
c7d4a965c7 [client][go] avoid duplicated reflect imports (#3847) 2019-09-06 15:00:57 +08:00
sunn
458d47b4ae Add missing files to the form request (#3834) 2019-09-05 23:16:25 +08:00
William Cheng
9cc7bd15f2
fix warnings in csharp-netcore client (#3831) 2019-09-05 14:56:37 +08:00
Michael Nahkies
c63cf7e5f3 Bug #2845 typescript angular inheritance (#3812)
* issue #2845: enable 'supportsMultipleInheritance' on typescript angular client codegen

- note I reran ./bin/openapi3/typescript-angular-petstore-all.sh and no changes occurred.
  this suggests to me that the petstore.yaml sample should be improved to make use of the
  anyOf / allOf / oneOf keywords, in order to better show the effects of changes on generated code.

* issue #2845: run ./bin/openapi3/typescript-angular-petstore-all.sh

* run `mvn clean package && ./bin/typescript-angular-petstore-all.sh`

* revert extranous files
2019-09-05 13:07:44 +08:00
Benjamin Simpson
ec7f2a0450 fixed bug where nullApi.java would be generated. Instead, generated DefaultApi.java to match the default path /{pathParam} (#3821) 2019-09-04 17:15:04 +08:00
William Cheng
cec2818e1f
Add gRPC Protobuf schema generator (#3818)
* add grpc protobuf generator

* update doc

* add new doc

* add windows batch, comment out root proto
2019-09-04 14:22:23 +08:00
William Cheng
91daca36ef
Better Go code format (#3819)
* better varible naming

* better comments

* better code format for go experimental client

* better comment, update samples
2019-09-04 14:22:06 +08:00
Quim Muntal
8f13b88ed9 Support custom git repository (#3757)
* add gitHost param to GeneratorSettings and related

* parameterize gitHost in READMEs

* parameterize gitHost in go.mod

* parameterize gitHost in git_push

* update petstore samples

* run ./bin/utils/export_docs_generators.sh

* run meta-codehen.sh

* Revert "run meta-codehen.sh"

This reverts commit d6d579f6159186531257cdfdd73b9caf9e9ffeba.

* Revert "run ./bin/utils/export_docs_generators.sh"

This reverts commit 1b81538198d4319fd1b4e97447303e3cc0e8dc99.

* Revert "update petstore samples"

This reverts commit f513add88396707f6991ae2e4920359583ec88f1.

* run ensure-up-to-date
2019-09-03 21:35:49 +08:00
Nick Meinhold
3be1196264 [Dart] Fix README template and update testing doco (#3809)
* [Dart] Fix README template and update testing doco

- deleted redundant shell script
- fixed and updated README template
- updated test package and moved to a dev_dependency
- removed old unused dev_dependency packages
- updated testing documentation in petstore sample

* Remove references to dart-flutter-petstore.sh

* Fix typos

* Fix typo
2019-09-03 08:51:43 +08:00
Prateek Malhotra
1b12b89fd8 typescript-fetch: add option for TypeScript 3.6+ compatible generation (#3801) 2019-08-30 21:59:54 +02:00
Jérémie Bresson
d21b3390fe [java] add jackson-databind-nullable dependency to the gradle.build file (#3793)
* Add jackson-databind-nullable

* Update samples
2019-08-30 13:51:50 +08:00
Marcin A. Nowak
e39b420fa8 no need to use regex for this replacement - regexp fails on windows becuase of backslashes in the path (#3802) 2019-08-30 12:26:53 +08:00
Jérémie Bresson
b0549fe6da
[java-client][rest-assured] add jackson support in addition to gson (#3795) 2019-08-29 17:34:37 +02:00
Jérémie Bresson
87727de079
[java-client][java-jaxrs-server][jackson] Add @JsonPropertyOrder to models (#3778) 2019-08-29 10:40:34 +02:00
William Cheng
8236424aff
Fix Dart2 default template (#3790)
* fix dart2 default template

* update dart samples
2019-08-29 15:10:19 +08:00
William Cheng
a8fe5d355c Merge remote-tracking branch 'origin/4.2.x' into 5.0.x 2019-08-29 14:48:00 +08:00
Jérémie Bresson
026612fed7 [core] do not always cast to ArraySchema (#3780)
* [core] do not always cast to ArraySchema

* Change ModelUtil.isArraySchema()
2019-08-29 11:40:44 +08:00
prisoneroftech
8f7e43b500 [Kotlin][client] Support gson and moshi as serialization libraries (#3734) 2019-08-29 05:37:13 +02:00
Alexander Navratil
1443f01709 Fix dart2 custom templates (#3656)
* don't overwrite a custom set templateDir when using dart 2.x

* remove old dartson code which lead to compile time errors

* * fix decoding JSON to dart enums
* fix decoding a map with a list of some objects as value since the complexType is a List and List.mapFromJson doesn't exist.

* * add explanation for mapListFromJson
* fix file permissions
2019-08-29 11:12:21 +08:00
Jaumard
c2f786b8ad add flutter web support on jaguar dart (#3786) 2019-08-29 10:30:09 +08:00
Jaumard
f4d3df762a manage enum properly on jaguar generator (#3654) 2019-08-28 23:41:34 +08:00
Michael Nahkies
34ec98d17b [core] [regression] set parentName when a single possible parent exists (#3771)
Whilst the spec states that the 'allOf' relationship does not imply a hierarchy:

> While composition offers model extensibility, it does not imply a hierarchy between the models.
> To support polymorphism, the OpenAPI Specification adds the discriminator field.

Unfortunately this does not make sense for many existing use cases, that were supported by older
versions of the generator. Therefore, I've restored the older behavior, specifically
in the case that only a single possible parent schema is present.

I think a more complete solution would generate interfaces for the composed schemas,
and mark the generated class as implementing these.

fixes issue 2845, and fixes issue #3523
2019-08-28 20:31:38 +08:00
Eirik André Eidså
2016bc086f Set Content-Type to application/json when multipart param isModel typescript-angular (#3776) (#3779) 2019-08-28 13:11:22 +02:00
stephanpelikan
28cf0b279d [typescript-fetch] fix serialization/deserialization with inheritance (#3767)
* #3646 - fix inheritence

* #3646: Fix imports

* Update modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>

* generate typeescript-fetch samples
2019-08-28 13:10:45 +02:00
Jérémie Bresson
5a54aa5726 Add test with 'type' and '$_type' properties (#3774) 2019-08-28 15:06:59 +08:00
William Cheng
9182784955 Merge remote-tracking branch 'origin/master' into 4.2.x 2019-08-28 14:01:20 +08:00
Jérémie Bresson
60e4c923dd [java][client] Add a "serializationLibrary" option (#3759)
* [java][client] Add a "serializationLibrary" option

* Update docs
2019-08-28 09:54:24 +08:00