8767 Commits

Author SHA1 Message Date
Antoine Reilles
7b794f0139 [cxf-cdi] use @FormParam for form parameters when it is not Multipart (#4125)
Use the standard jax-rs @ForParam instead of @Multipart for
application/x-www-form-urlencoded parameters
2019-10-13 18:35:53 +08:00
Arun
e2eea606fd [python] Add missing keywords python (#4134)
* Add missing keywords python

* Correct shell script names

* Revert "Correct shell script names"

This reverts commit 37f8fe5af14f00eb464d48f17b8db4d3935a6f9c.
2019-10-13 18:04:02 +08:00
William Cheng
594446b8d5
Rename property name from propertyRawName to propertyBaseName (#4124)
* rename property in codegen discriminator

* better code format
2019-10-11 00:51:20 +08:00
Colin Arnott
3274592e29 [Go] Fix go.mod and go.sum for 1.13 (#4084)
The openapi-generator-cli currently creates an invalid go.mod file,
according to the go1.13 compiler. This change uses the correct pseudo
version without upgrading or modifying either dependency. It also adds
several missing go.sum dependencies that will break when the toolchain
is run in -mod=readonly mode.
2019-10-10 21:59:53 +08:00
Bruno Coelho
3cd74f4a8d [kotlin] add option for non public api (#4089)
* [kotlin] add option for non public api

* [kotlin] update petstores

* [kotlin] add missing script to kotlin-client-all.sh

* [kotlin] update pet projects

* [kotlin] remove public modifier

* [kotlin-client] inline visibility modifier
2019-10-10 21:56:40 +08:00
gurumeditator
60a3746bb7 Added new discriminator RawName property to preserve declared discriminator for @JsonTypeInfo annotations (#3320) 2019-10-10 21:34:40 +08:00
Alexander Lehmann
4d32e65c24 [JAVA][JAXRS] Fix parameters validation (#3862)
* [JAVA][JAXRS] Improved formatting of *Params.mustache files

Signed-off-by: Alexander Lehmann <alexander.lehmann@tracetronic.de>

* [JAVA][JAXRS] Added validation to path/query-Params

Fixes #3861

Signed-off-by: Alexander Lehmann <alexander.lehmann@tracetronic.de>

* [JAVA][JAXRS] Regenerate examples

Signed-off-by: Alexander Lehmann <alexander.lehmann@tracetronic.de>
2019-10-10 21:21:17 +08:00
Thomas Joeissient
a13543e859 Make Resttemplate thread safe by using the withHttpInfo pattern used by many other generated clients (#4049) 2019-10-10 21:18:29 +08:00
Anders Fogh Eriksen
9f82755696 Disabling linting for typescript-fetch (#4110)
* Disabling linting for typescript fetch

* Update petstore

* Update samples

* Fix typescript-fetch samples
2019-10-10 14:43:08 +02:00
William Cheng
b69b8cdd31
[Kotlin][Client] fix missing curly bracket when the model contains enum property (#4118)
* fix kotlin okhttp3, add CI test

* update kotlin server sample
2019-10-10 18:21:50 +08:00
William Cheng
3141e483ef
Fix NPE in Elm path parameter (#4116)
* fix NPE in elm path parameter

* replace paramName with baseName

* install elm format in circleci

* switch to /usr/bin/env
2019-10-10 18:20:46 +08:00
Jim Schubert
54d7e8c488
[CLI] Initial implementation for batch generation (#3789)
* [CLI] Initial implementation for batch generation

Allows for generating multiple outputs via config. Just specify multiple
config files on command line.

Intent for this is to reduce CI times to generate outputs as well as to
reduce time for users to run ensure-up-to-date to meet PR standards.

Example command:

  openapi-generator batch --includes-base-dir `pwd` --fail-fast  -- bin/ci/*

---

As part of this implementation, the batch command support a customized
JSON key, `!include`. If this key's value refers to an existing file,
that file's contents are "unwrapped" into the config during
deserialization. This allows us to easily point to the same configs used
by our sample scripts without modifying the CLI generate task's switches
or assumptions.

* Allow for path-relative outputs
* Add batch JSON objects
* Include INFO log about threads used and includes/root
* Ensure GlobalSettings.reset()
* Improved thread-safety of ModelUtils
2019-10-09 12:51:52 -04:00
Martin Weber
081383c886 update api and model path when packagename is updated (#4108) 2019-10-10 00:24:59 +08:00
Martin Weber
e24030be52 fix nullable for arrays and complex types (#4106)
change csharp folder parameter from "SwaggerClient" to "OpenAPIClient"
2019-10-10 00:23:19 +08:00
Erik Timmers
8cc708011b [elm] Add toString for all types (#3983) 2019-10-09 23:34:51 +08:00
William Cheng
e9a0a51b50
Fix file type in avro template (#4105)
* fix file type in avro template

* update doc
2019-10-09 20:22:57 +08:00
Akira Tanimura
08613691e8 fix enum which is not string of Go (#4077) 2019-10-09 18:35:56 +08:00
Bruno Coelho
7a369d3b02 [kotlin-client] Add support okhttp3 and Android 4.x (#4008)
* [kotlin] support okhttp3

* [kotlin] create okhttp3 sample

* [kotlin-client] rename HttpClient to HttpLibrary

* [kotlin] move okhttp 3 to library model

* [kotlin] fix okhttp3 version

* [kotlin] fix kotlin client jvm okhttp3

* [kotlin] fix wrong spacing in okhttp3 code

* [kotlin] update okhttp3 sample to use parcelize models

* [kotlin] readd jvm tag
2019-10-09 16:38:07 +08:00
Perennes
87c77076ef [AVRO] Fix the package handling for the avro generator (#3987) (#4078)
* [AVRO] Fix the package handling for the avro generator (#3987)

Also fix an issue with the outputFolder that wasn't overridable through opts

* Update sample files through avro-petstore.sh

There's an issue with inlined object but it's already present with the previous commit

* Revert the fix on outputFolder (not a bug)
2019-10-09 15:46:29 +08:00
tkrtmy
4e47426224 typescript-fetch: fix empty URLSearchParams request body (#4103)
* typescript-fetch: correct handling body as URLSearchParams

* typescript-fetch: run typescript-fetch-petstore-all.sh

* typescript-fetch: add URLSearchParams to globals
2019-10-09 09:43:54 +02:00
sdoeringNew
d8c3b4d342 [CSharp] add optional flag "optionalEmitDefaultValues" and update template (#4010)
This commit addresses issue #3274 and adds the proposed optionalEmitDefaultValues flag.
2019-10-09 15:27:57 +08:00
Jan
bbfcd3bf64 [kotlin-client][kotlin-server] Feature/kotlin data class serial version uid (#4021)
* feat: add companion object to data classes if the implement the interface java.io.Serializable

* style: format template file

* style: adapt to project's original code style

* fix: add missing imports

* style: reverted mustache template to original styling

* test: generate additional samples for kotlin-springboot-reactive and kotlin-springboot

* docs: name full qualified classname of interface java.io.Serializable to prevent confusion with kotlinx.serialization
2019-10-09 15:17:53 +08:00
William Cheng
cf38c56aa6
Fix readonly with isReadOnly (#4102)
* fix readonly

* update samples
2019-10-09 15:16:22 +08:00
Pete Savage
25596cf8f0 Fixed Readonly Docs for python (#4085) 2019-10-09 11:16:34 +08:00
oharaandrew314
682af7c4f3 Add DELETE with body to kotlin client (#4047)
* delete with body

* update petstore sample

* update kotlin-threetenbp sample

* update sample for kotlin-client-string
2019-10-09 00:10:57 +08:00
William Cheng
8f86f0f04a Merge remote-tracking branch 'origin/4.2.x' into 5.0.x 2019-10-08 21:21:04 +08:00
Mateusz Szychowski (Muttley)
991e0bf821 [C++][Pistache] Use optional when required (#4082)
* [C++][Pistache] Include pistache/optional only when required

* [C++][Pistache] Update Petstore sample
2019-10-07 12:27:45 +02:00
Jérémie Bresson
0526ccef3a [jaxrs-spec][quarkus] update to 0.23.2 and fixes for Dockerfile (#4053) 2019-10-07 18:11:33 +08:00
Thibault Duperron
c5e0ecf57b Remove unused property (#4081)
Fix #4066
2019-10-07 18:07:11 +08:00
Slavek Kabrda
5234139814 [java][client] Fix regression in Java XML serialization. Fixes #4014 (#4023)
* Fix regression in Java XML serialization. Fixes #4014

* Also move JSON_PROPERTY_* declaration
2019-10-07 17:50:55 +08:00
deviantlycan
6082dd217d fix for issue 4061 (#4064)
improved the Confluence wiki output to fix issues with tables, added information and improved readability within confluence
2019-10-07 11:35:39 +09:00
Gabriel Féron
f96ed69c26 Add rust discriminator (#3895)
* Add support for the `discriminator` feature of OpenAPI 3, and implement it with `enum` in Rust
* Add all missing explicit `dyn` to trait types to remove warnings
* Add missing re-export for properties that are enum (was missing from #2244).
2019-10-06 17:35:14 +01:00
Akshay Mankar
25e1f5e1c3 [haskell-http-client] Bump deps to LTS 14.7 (#4068) 2019-10-05 13:24:38 -05:00
William Cheng
61abe6332b Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2019-10-04 16:52:36 +08:00
Jade Montagu
e0c389fa83 [typescript-axios] Fix api generating incorrect seralization type check (#4051)
Seralization check should be ensuring the param type is not a string, which matches that of the flow generator logic.
2019-10-04 10:08:41 +02:00
William Cheng
d4500b307f Merge remote-tracking branch 'origin/master' into 4.2.x 2019-10-04 15:02:58 +08:00
William Cheng
f955966b09
prepare 4.1.3 release (#4052) 2019-10-04 13:46:07 +08:00
clemens-smartparking
711a210423 typescript-node: form data file (#3967)
* [typescript][node]: Add options to specify a from data file

Be able to specify file options as described on
https://github.com/request/request in the 'multipart/form-data
(Multipart Form Uploads)' section).

Related to #3944

Fix file return type

* [typescript][node]: Fix use of applyLocalTypeMapping

Previous call to applyLocalTypeMapping didn't had any effect.

* [typescript][node]: Update samples
2019-10-04 06:48:55 +02:00
William Cheng
08a5e81797
better wording for apiNameSuffix option description (#4045) 2019-10-04 10:00:39 +08:00
William Cheng
83d64b7e38
[Ruby] fix ruby test, update error message (#4041)
* fix ruby test, update error message

* use block

* update template for api client spec

* update test files
2019-10-04 01:42:28 +08:00
Hinrik Örn Sigurðsson
60567bddd6 [PHP] Correctly format JSON in headers (#4024)
* [PHP] Correctly format JSON in headers

`ObjectSerializer::toHeaderValue()` in the generated PHP code calls
`toString()` on the values, which formats JSON with the `JSON_PRETTY_PRINT`
option. This will result in a multi-line header which cannot be parsed
since linebreaks aren't allowed by RFC 7230.

In my case I have a header schema called `UpdateUser` which I had hoped
would be serialized as `{"type":"staff","id":123}`.

Every single `__toString()` in the generator does the same thing, so I
figured it's safe to change `toHeaderValue()` to convert to JSON directly,
without `JSON_PRETTY_PRINT`. This fix works for me.

* More sensible approach to providing a header value

* Just strip the newlines

* Go back to previous solution
2019-10-03 20:38:15 +09:00
Jon Schoning
cc1bfe5fef
[haskell-http-client] add dateTimeParseFormat cli option - overrides the format string used to parse a datetime (#4037)
This allows specifying a different formatString for parsing than for rendering, which is useful because padding widths are not supported in `parseTimeMSource`
2019-10-02 23:30:34 -05:00
bgong-mdsol
ebc9e291c3 Feature/api name suffix (#3918)
* added apiNameSuffix parameter to control the suffixes of API class/file/doc names

* added --api-name-suffix in readme
2019-10-03 09:51:06 +08:00
William Cheng
7c7fa68737
[F#] minor improvements to the generators (#3968)
* add license, minor code format

* mark fsharp generator as beta

* update doc
2019-10-03 09:24:40 +08:00
sullis
2b72df2135 mockito 3.1.0 (#4035) 2019-10-03 08:29:21 +08:00
Mathias Lykkegaard Lorenzen
88ed52fa88 typescript-fetch: fix return type of primitive value (#4028)
* Update apis.mustache

Fixes #3709 and #2870.

* Update apis.mustache

* added new petstore code.
2019-10-02 17:26:54 +02:00
clemens-smartparking
c136b83bdb [typescript][node]: Add accept header if produces is not empty (#3966)
* [typescript][node]: Add accept header if produces is not empty

Uses the correct Accept media types as specified in the OpenApi
specifications.

Related to #3944

* Update samples files

* [typescript][node]: Give presedence to 'application/json'

The endpoint may support multiple formats, e.g. 'application/xml',
'application/json'. However, we don't really support xml. In this case
only accept 'application/json'.
2019-10-02 07:53:17 +02:00
Jon Schoning
2272743c1d
[haskell-http-client] disable unused import warning in Core.hs (#4020) 2019-10-01 22:49:16 -05:00
Fernando Rincon Martin
cb38de9afa [haskell-http-client] Fix trailing comma wrong in template (#4013) 2019-10-01 12:13:29 -05:00
Jan
baa53cbf57 [kotlin-client][kotlin-server] feature: allow creation of kotlin data classes that implement java.io.Serializable (#3997)
* feat: allow creation of kotlin data classes that implement java.io.Serializable, by adding the config option serializableModel=(true|false)

* docs: add markdown docu for new configOption serializableModel

* fix: do not use parcelize in script

* update kotlin samples

* add the option, update the doc
2019-10-02 00:13:00 +08:00