5759 Commits

Author SHA1 Message Date
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
Massimiliano Pippi
af9eb8d7da import time when properties are slices of time.Time (#3973) 2019-10-01 21:22:43 +08:00
Bruno Coelho
9ae49db670 [swift4] update Alamofire from 4.7.0 to 4.9.0 (#3999)
* [swift4] update Alamofire from 4.7.0 to 4.9.0

* [swift4] update Petstore samples

* [swift4] update Alamofire from 4.5.0 to 4.9.0 in Cartfile

* [swift4] update Petstore samples
2019-10-01 16:03:58 +08:00
Jérémie Bresson
d2b299860d [jaxrs-spec] add Eclipse MicroProfile file based approach (#3901)
* [jaxrs-spec] add quarkus application server

* [jaxrs-spec] add thorntail

* [jaxrs-spec] add openliberty

* [quarkus] update to 0.20.0

* Add helidon

* Update quarkus version

* Update quarkus to 0.22.0

* Update documentation

* Force "useSwaggerAnnotations" to be false when quarkus, thorntail,
openliberty or helidon are used
2019-10-01 15:15:51 +08:00
Michael Walser
243589ec80 [java] Don't import oltu when not necessary (#3950) 2019-10-01 13:50:21 +08:00
Andrew Emery
44f482f21a Fixes invalid Kotlin client variable names for reserved words (#3993)
The Kotlin Multiplatform client introduced an bug that rendered variable
names that were also Kotlin reserved words incorrectly. This change reverts
the template to use the previous mechanism for rendering variable names.

https://github.com/OpenAPITools/openapi-generator/issues/3992
2019-10-01 13:48:09 +08:00
Nándor István Krácser
c8ac41c051 go: add os import in case of File return type (#3996) 2019-10-01 11:31:55 +08:00
Bruno Coelho
775d96c8e6 [kotlin] parcelize is now stable (#4003) 2019-10-01 11:30:44 +08:00
William Cheng
7dbda049f0
Better tests for string (number) (#3953)
* beter test for string (number)

* fix mapping

* fix mapping in csharp generators
2019-09-30 15:22:44 +08:00
sunn
c8d5701089
Add missing enum processing in C++ codegen, already present for Qt5 (#3986) 2019-09-29 20:15:49 +02:00
sunn
b5fb92d5a8
[C++] [Pistache] Removed deprecated warnings (#3985)
* Removed deprecated warnings

* Fix typo
2019-09-29 20:12:59 +02:00
Mateusz Szychowski (Muttley)
8212e80d0e [C++][Pistache] Simplified model template (#3417)
* [C++][Pistache] Simplified model template

* [C++][Pistache] Fix for addExternalLibs option

CMake would fail with addExternalLibs set to false
since it'd try to add depenency to not-existing targets

* [C++][Pistache] Update cpp-pistache-server-petstore.sh

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

* [C++][Pistache] Update documentation
2019-09-29 11:48:39 +02:00
Artem
0bf9926066 Fix wrong variable name in LessThan and LessThanOrEqual asserts (#3971)
* Fix wrong variable name in LessThan and LessThanOrEqual asserts

* After run ./bin/php-symfony-petstore.sh
2019-09-28 17:42:02 +08:00
Sergey Terentyev
e901132ea9 #3957 - Removed hardcoded baseUrl (#3964) 2019-09-28 17:41:16 +08:00
Benjamin Gill
eb793ae279
[rust] Make it easier to test rust client generator (#3543)
As we discovered in #3463, there are various bits of the rust client generator that are currently untested. This PR adds tests for various generator-specific types, and also files.

Follows the example of the rust-server generator for making it easy to add new test specs. This should make it easier for future contributors to make sure that their contributions are tested
2019-09-27 16:27:28 +01:00
Davide Maestroni
5f6e53fc60 Fix issue3635 (#3948)
* fixed Feign template

* regenerated Feign example

* update java feign petstore sample
2019-09-27 16:36:04 +08:00
Jérémie Bresson
078d7a38c0 [java] allow to use setArtifactVersion() programmatically (#3907)
* [java] allow to use setArtifactVersion() programmatically

* Fix default value in the docs and cli help
2019-09-27 11:39:08 +08:00
William Cheng
bd992a4218
fix generateAliasAsModels in default generator (#3951) 2019-09-26 11:31:25 +08:00
keith siilats
e20af77944 Implement BigDecimal to Decimal in swift4 for currency data as type=string format=number (#3910) 2019-09-25 22:43:51 +08:00
Nick Fisher
8408232d1a Add F# Functions server generator (#3933)
* cherry pick F# Functions generator

test fix

fix template paths

replace giraffe sample

* update doc
2019-09-24 18:53:54 +08:00
Justin Black
252c3e58be [python-experimental] generate model if type != object if enums/validations exist (#2757)
* Python-experimental adds model_utils module, refactors python api class

* Fixes python-experimental so the sample sare generated in the petstore_api folder

* FIxes python samples tests

* Updates python and python-experimental tests

* Fixes python-experimental tests

* Adds newlines back to python templates + samples

* Reverts files with newline tweaks back to master branch versions

* Fixes indentation errors in python-experimental api_client

* Removes unused files

* Python files now generated in correct folders

* Adds logging when the user tries to set generateAliasAsModel in python-experimental

* Fixes typo
2019-09-24 18:44:28 +08:00
sullis
002da8d9f9 [scala] add [date-time] field to codegen unit test (#3939) 2019-09-24 18:24:52 +08:00
William Cheng
81fdc2abbd
Fix jackson-databind security issue (#3945)
* fix jackson security issue

* update groovy petstore sample
2019-09-24 13:56:59 +08:00
Jan Jongboom
6f1b8ef658 typescript-node: Fix cookie auth, fix multiple API key auth (#3927)
* typescript-node: Fix cookie auth, fix multiple API key auth

* Re-generate samples

* Re-generate samples
2019-09-23 15:20:32 +02:00
tkrtmy
1a55020194 typescript-fetch: Add application/x-www-form-urlencoded content support (#3934)
* typescript-fetch: to be able to handle application/x-www-form-urlencoded content

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

* typescript-fetch: add test's dist dir

* typescript-fetch: delete Specified Content-Type header
2019-09-23 12:17:04 +02:00
William Cheng
5eb67d471b Merge remote-tracking branch 'origin/4.2.x' into 5.0.x 2019-09-22 21:00:38 +08:00
William Cheng
3019b5a5e1 Merge remote-tracking branch 'origin/master' into 4.2.x 2019-09-22 14:18:07 +08:00
sullis
ee2e4395a9 maven-compiler-plugin 3.8.1 (#3932) 2019-09-22 11:03:37 +08:00
William Cheng
91a610ec0e
[Kotlin][multiplatform] minor improvements (#3931)
* minor enhancement to kotlin multi platform client

* better code format

* fix kotlin test

* use build

* update kotlin openapi3 sample
2019-09-22 10:00:26 +08:00
Andrew Emery
21e0e0d5d5 Kotlin multiplatform client (#3900)
* Includes Kotlin multiplatform client

Kotlin multiplatform allows Kotlin code to be shared across various target platforms.
This implementation generates Swagger clients for JVM and iOS platforms.

* Includes Kotlin Multiplatform sample scripts

* Updates existing Kotlin samples

* Includes Kotlin Multiplatform samples

* Fixes incorrect Windows sample resource location

* Updates Kotlin client documentation

* Removes unnecessary workaround to remove duplicate entries

* Includes additional multiplatform type and import mappings

* Fixes Kotlin client definitions with multiple enums

https://github.com/OpenAPITools/openapi-generator/issues/3917

* Updates Kotlin samples
2019-09-21 21:48:41 +08:00
dan-drl
0ea1ead59e Fix 3886 ishttpcontent not set (#3888)
* Fix issue deserializing to nullptr

* Update codegen files

* Fix error matching on DataType's value

* Fix return type. Should be shared pointer
2019-09-20 20:13:33 +02:00
Vladimir Jimenez
b793a95765 [typescript][fetch] Fix null typing errors (#3919)
* [typescript][fetch] fix null typing errors

* [typescript][fetch] update sample generations

* re-generate samples
2019-09-20 09:41:53 +02:00
sunn
1dfa61231c
[C++] [cpprest] Fixed wstring on linux (#3892)
* Fixed wstring on linux

* Removed whitespace
2019-09-19 16:11:38 +02:00
Jérémie Bresson
3fe0281d3b Fix javadoc error (#3906) 2019-09-19 14:28:56 +08:00
sunn
ba7fc2396b [C++] [Qt5] Add initial version of File upload and download for Qt5 client (#3853)
* Add initial version of File upload and download for Qt5 client

* Update after reviews

* Remove unused header
2019-09-18 00:07:55 +08:00
sullis
3f9d1b1fec ScalaAkkaClientCodegenTest: refactor assertions (#3893) 2019-09-17 01:05:44 +08:00
William Cheng
a8826816fb
test kotlin vertx in pom.xml (#3890) 2019-09-16 22:47:28 +08:00
Jim Schubert
667a6097b5 [spring] Resolve regression on RequestParam for non-objects (#3855)
* [spring] Resolve regression on RequestParam for non-objects

* Regenerate Go client samples

* Include testcase for issue 3248

* Set isModel appropriately for referenced schemas
2019-09-16 22:46:47 +08:00
Richard Whitehouse
4538db92a2
[Rust Server] Support parameters correctly in response headers (#3669)
[Rust Server] Compile responses with headers

* Add test for response with headers

* Update samples
2019-09-15 15:54:38 +01:00