12694 Commits

Author SHA1 Message Date
Bruno Coelho
6bf5741fd1 [swift] Introduce result type (#4511)
* [swift] introduce result type as response library

* iOS - run petstore samples

* [swift4] add result sample to testing pipeline

* [swift] update docs with result type

* [swift] update result visibility

* [swift] update docs
2019-11-26 17:01:26 +08:00
seijin
2f26812982 [Swift] Add option parameter to select response queue (#4591)
* Add queue parameter to API

* Apply queue to response function argument

* Update petstore sample

* Update all sample projects

Run ./bin/swift4-all.sh then remove unrelated diff.

* Refactor variable name

Rename queue to apiResponseQueue, because apiResponseQueue is more clear for explaining the context.
2019-11-26 11:56:17 +08:00
Marcel Ramos
2d22ae90fc [BUG][R] Fix documentation in R package (#4580)
* wip: fix documentation tags

* update model.mustache

* update template for documentation

* update mustache templates

* update mustache templates

* run ./bin/r-petstore and update R pkg docs
2019-11-26 10:38:56 +08:00
Toby Murray
006ec182ef [JAVA] Update Gradle in generated Java projects from 2.14.1 to 6.0.1 (#4536)
* Update Gradle in generated Java projects from 2.14.1 to 6.0.1

* Upgrade Java 11 native Gradle from 5.5 to 6.0.1

When Java 11 native client library was introduced it was introduced with an overridden version of the Gradle wrapper (5.5 instead of 2.14.1). From looking at that PR, there doesn't appear to be any specific reason for the versions to differ. This removes the only override of the Gradle wrapper so all the Java projects are up to date and shares the same version.
2019-11-25 22:34:31 +08:00
Bruno Coelho
d5c7c9c9b7 [swift] add option for non public api (#4556)
* [swift] implement non public api

* [swift] add petstore for non public api

* [swift] fix error in extension that cannot be internal

* [swift] update docs
2019-11-25 17:19:50 +08:00
Jason Culverhouse
d0e838ee02 Maintains state of hasMore when security is filtered (#4585) 2019-11-25 16:08:18 +08:00
Jason Lee
40799937fb add go.mod as supporting files to go-server (#4592) 2019-11-25 15:58:51 +08:00
Tasuku Tozawa
eff94da9c9 [Swift] Convert default value of enum with not string type to string (#4481)
* Convert not string enum default value to string by toString.

* Add some test cases for enum's default value.

* Convert string default value to enum var name format.

* sync master, update samples
2019-11-25 15:42:11 +08:00
sullis
dc4296819a kotlin 1.3.60 (#4598) 2019-11-25 15:32:15 +08:00
William Cheng
7aeab0219c Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2019-11-23 11:37:54 +08:00
William Cheng
275d1db2e5 Merge remote-tracking branch 'origin/master' into 4.3.x 2019-11-22 23:15:12 +08:00
Pete Johanson
70954cabde New generator: typescript-redux-query (#3824)
* Initial work on a redux-query client generator.

* Update to match the required redux-query version w/ fixed TS defs.

* Fixes for query parameters, add samples.

* Add windows versions of redux-query scripts.

* Fix for form data handling.

* Initial work on multiple inheritance support.

* Tweaks for discriminator usage + from/to JSON.

* Fix initialization of queryParameters if needed.

* Copy over more QueryConfig values into the final generated QueryConfig.

* Fix for imports that are combined types.
2019-11-22 09:19:25 +01:00
William Cheng
5c275bccd2
Throw exception when config file missing (#4557)
* throw exception when config file missing

* fix bash config location
2019-11-22 14:01:57 +08:00
Jim Schubert
c89d21a903 [cli][doc] Document batch command (#4572)
* [cli][batch] Better glob support

If invoked as `openapi-generator batch *.yaml`, the command might
previously fail in some shells where `*.yaml` expands to file name only.

This supports globs without path-part in the filename to prevent
possible NPE.

* [cli] Document batch command
2019-11-22 11:09:08 +08:00
nekkiy
f434b5fa13 [imp-AddKotlinDynamicCompiler] add kotlin compiler (#4544) 2019-11-21 21:59:16 +08:00
Martin Delille
b0d6110686 cpp-qt5-client: fix warning reordering member initialization (#4526) 2019-11-21 21:49:35 +08:00
William Cheng
52384badd2
Add an option to prefix Go struct with the classname (#4564)
* add option to prefix struct with classname

* update usage

* fix test

* update doc
2019-11-21 21:31:35 +08:00
EFanZh
1de71a9e16 Fix #4551 (#4554) 2019-11-21 21:12:06 +08:00
sreichi
47473401ec [TS] replace line comment with block comment (#4540)
* FIXES #4539 replace line comment with block comment

eslint requires you to use a block comment for ignoring whole files.

* changed comment style in other templates

* generated samples

* generated openapi3 samples

* Revert "generated openapi3 samples"

This reverts commit 98af3dfc

* generated missing samples
2019-11-21 11:28:50 +01:00
William Cheng
facabd4472 Merge branch '4.3.x' into 5.0.x 2019-11-21 15:19:31 +08:00
Man
3adfdfafea [asciidoc] add form params and authorization headers (#4467) (#4505)
* [asciidoc] add form params and authorization headers (#4467)

* [asciidoc] differentiate between basic and bearer auth
2019-11-21 10:49:03 +08:00
Hippolyte HENRY
db77e070d1 [Java][Go] Unalias schema in getTypeDeclaration when not generating model for alias (#4527)
* [Java][Go] Unalias schema in getTypeDeclaration when not generating model for alias

* Add tests

* Don't use isGenerateAliasAsModel
2019-11-21 10:30:11 +08:00
Hinrik Örn Sigurðsson
eebad5c9aa [PHP] Include microseconds in serialized date-time (#4542)
* [PHP] Include milliseconds in serialized date-time

* Add setDateTimeFormat()
2019-11-21 10:21:27 +08:00
William Cheng
60f4de0f22 Merge remote-tracking branch 'origin/master' into 4.3.x 2019-11-20 18:15:22 +08:00
Mikle
2838db2052 Add HEAD method to ApiClient of dart codegen (#4504)
* add HEAD method to ApiClient of dart codegen

* update samples
2019-11-20 11:52:57 +08:00
Fjolnir-Dvorak
23479b30e4 [FIX][Haskell-servant] missing indent on the new feature pull request. (#4490)
* missing indent on the new feature pull request.

* One indentation to much

* Import for application was still missing

* some middleware got in the runServer name
2019-11-20 11:40:19 +08:00
dukov
1ccf4b9cb3 [Go] Bypass object decode in case of empty body (#4546)
Fixes #4545

Change-Id: Ic724843713f60f996ed72326ad6ef6762ec2e713
2019-11-20 11:20:15 +08:00
Jason Lee
8ff1aca4f8 fix when unhandledException=false does not take effect (#4543) 2019-11-20 10:11:02 +08:00
Emanuel Borsboom
6e2e542f83 [Rust] Derive more traits (#4142)
* Simple enums: add: Clone, Copy, Eq, Ord, PartialOrd, Hash
* Structs and complex enums: add `Clone`
2019-11-19 16:15:23 +08:00
Matt Traynham
518c33a209 4171 - Correct parent variables being duplicated in child (#4253) 2019-11-19 15:35:24 +08:00
Massimo Siani
964260101b [kotlin-spring] add support for the delegate pattern (#3925)
* #2526 support the delegate pattern for kotlin-spring

* fix the diamond

* update the doc

* fix ci

* use Resource? instead of MultipartFile when dealing with files

* bump after rebase on master
2019-11-19 15:22:29 +08:00
William Cheng
2daa89a326
Better else clause with warnings (#4507)
* better else clause to catch exception

* use warning instead
2019-11-18 21:49:15 +08:00
Jim Schubert
8766531c56 [java] Fix java version defaulting (#4520)
* [java] Improve assumptions about artifactVersion

The logic to apply a default artifactVersion was faulty, resulting in
generation without an explicit version specified either on the OpenAPI
Document or at the CLI/plugin level would result in poms generated with

    <version></version>

As an example, in any commit made up to 5 weeks before this commit, run:

    ./bin/java-pkmst-petstore-server.sh

The solution is to ensure that artifactVersion isn't overwritten by an
"in-process" additonalProperties map, and also to ensure that
additionalProperties is synced with the artifactVersion property once it
has been modified.

As a future task, we'll want to move any modification of
additionalProperties outside of preprocessOpenAPI (to processOpts).
We're hiding manipulation of the "Opts" at a point where we should
really only be applying logic on top of the OpenAPI doc.

* [sample] Regenerate java-pkmst sample
2019-11-18 11:32:54 +08:00
Jim Schubert
10f17877f1
Fixes issues with Scalaz outputs (#4508)
Scalaz is not re-generated by users or CI (only verified), so some
compilation issues have been introduced into the generator.
Specifically, the generator previously didn't handle defaults well (or
even correctly, maybe?). This broke when array models were added to the
openapi document used to generate samples. The inclusion of Date-related
mappings being mapped to joda time in DefaultCodegen also caused some
issues with new DateTime properties on models.

Over the course of what appears to be Nov 10-17 2019, CircleCI seems to
be having intermittent issues with Scalaz verification. I found that
green builds were picking up SBT 0.13.x and failed builds were SBT
1.1.0. It's not clear where the system level SBT is being defined, but a
simple fix has been to enforce the sbt version in the generator.

For those unfamiliar with SBT; the SBT command acts as a launcher script
which may switch to older/newer versions of SBT. A Scala project invoked
with SBT 1.1.0 will look for an sbt.version override and happily attempt
compilation with the available SBT 1.1.0. The problem is that SBT 1.1.0
uses Scala 2.12 and this is not binary compatible with Scala 2.11. This
can cause issues with builds due to plugins or incompatible Java version.
2019-11-17 09:18:57 -05:00
William Cheng
2f428e7763 minor fix to CI failure 2019-11-17 10:43:38 +08:00
amond
78d7ffbce7 feat(dart-dio): correctly handle Map<String, Object>, List<Object> using JsonObject (#4401)
* feat(dart-dio): correctly handle Map<String, Object>, List<Object> using JsonObject

Signed-off-by: Minsu Lee <amond@amond.net>

* feat(dart-dio): correctly handle Map<String, Object>, List<Object> using JsonObject

Signed-off-by: Minsu Lee <amond@amond.net>
2019-11-17 09:39:55 +08:00
Justin Black
d175673077 [OCAML] Fixes cloud.drone.io ocaml-test (#4501)
* Fixes ocaml-test

* Ocaml readme update
2019-11-17 09:23:15 +08:00
Erik Timmers
3cd0e13a46 [elm] Add support for oneOf (#4434)
And add additional test for composable types.
2019-11-17 09:18:26 +08:00
Jorge Rodriguez
60958b78d9 [BUG] [Java] Client resttemplate and webclient. Form Params are badly added when they are lists (#4461)
* 4383: Client resttemplate and webclient. Form Params are badly added when they are lists

* 4383: Force redeploy

* 4383: Fix test

* 4383: Fix map

* 4383: revert change

* 4383: Fix test resttemplate-withXml
2019-11-17 09:01:40 +08:00
Jan
5181ddcbb0 fix: prevent ClassCastException when handling options of (issue #4468) (#4495)
* issue 4468 fix: prevent ClassCastException when handling options of type boolean

*  #4468 fix: remove duplicate code
2019-11-17 08:59:25 +08:00
Justin Black
a1a9e70fe4 Fixes Python client Configuration class so each instance uses its own dicts (#4485) 2019-11-17 08:49:19 +08:00
William Cheng
f07b3e0521
Prepare 4.2.2-SNAPSHOT (#4497)
* update to 4.2.2-SNAPSHOT

* update doc

* update samples

* skip ocaml test

* update version

* fix version
2019-11-15 21:34:25 +08:00
William Cheng
2683dd4510
Prepare 4.2.1 release (#4494)
* prepare 4.2.1 release

* use stable version in test/example
2019-11-15 16:07:03 +08:00
Rob Oxspring
b43785a25c DartClientCodegen reads dart-keywords.txt as resource, not file (#4484) 2019-11-14 23:59:53 +08:00
Erik Timmers
6c714ddca9 [typescript-fetch] Add (de)serializers for oneOfs (#4387) 2019-11-14 12:21:06 +01:00
djairhogeuens
d9e93ce6ca feature: Typescript-angular support single request param (#4479)
* adds support for useSingleRequestParameter for typescript angular generator

* updates samples

* removes tab

* updates documentation

* removes tabs

* Revert "updates samples"

This reverts commit 8c5bfd94bdbd52187c1f38c43292dbba2cc483ef.

* updates samples

* adds configuration for sample generation

* fixes script

* sets executable flag

* fix docs
2019-11-14 10:51:37 +01:00
Bruno Coelho
fe0b3ce24d [kotlin][client] improve nonpublic api (#4478) 2019-11-14 16:19:08 +08:00
Min Kim
287af4aba3 recursive equal on reflection (#4475) 2019-11-14 13:09:23 +08:00
Rob Deutsch
64c1547c5d typescript-fetch: Only generate npm package if npmName specified (#4472)
* Only generate npm package if npmName specified

* additionalProperties not available in constructor
2019-11-13 07:37:21 +01:00
William Cheng
fa1e003a3b
minor enhancement to c client generaotr (#4457) 2019-11-13 13:34:31 +08:00