8767 Commits

Author SHA1 Message Date
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
sullis
5fd15b8b18 maven-plugin-plugin 3.6.0 (#3854) 2019-09-07 11:58:12 +08:00
Dec12 | Fujigon
dd152eefcc 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
2019-09-06 16:48:42 +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
William Cheng
03edb64030 Revert "1792 fix remote spec handling and hash calculation (#3440)"
This reverts commit 2a2eefe93d81b8d253745b8adb002ab2cb9eee04.
2019-09-04 19:01:47 +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
Тумилович Павел
2a2eefe93d 1792 fix remote spec handling and hash calculation (#3440) 2019-09-04 16:24:08 +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
Martin Hátaš
d36dd47b12 [maven-plugin] Allow to set User-Agent (#3777) 2019-08-28 10:17:41 +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
Jérémie Bresson
dc7bcbdb85 [java] fix ClassCastException in toDefaultValue() (#3765)
Fixes #3761
2019-08-28 09:52:58 +08:00
Jon Schoning
45d70e1bf3 [haskell-http-client] bump deps to LTS 14.3 (#3762) 2019-08-28 01:37:04 +08:00
Jérémie Bresson
e1116814c4
[core] change JSON serialisation to be deterministic (#3763) 2019-08-27 15:25:06 +02:00
Bernd Hacker
5bd63074c4 [typescript-rxjs] support HEAD method, improve formatting (#3766)
* feat(typescript-rxjs): add support for HEAD method

* feat(typescript-rxjs): improve formatting

* feat(typescript-rxjs): regenerate samples

* feat(typescript-rxjs): generate samples

* feat(typescript-rxjs): use better white space, regnerate samples
2019-08-27 11:17:41 +02:00
William Cheng
d0d545bbdd
Prepare 4.1.2 snapshot (#3758)
* update pom

* update samples

* update ts axios samples
2019-08-26 22:13:12 +08:00