7409 Commits

Author SHA1 Message Date
Jon Schoning
a979fd8e13
[haskell-http-client] update samples (#4073) 2019-10-05 13:28:52 -05: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
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
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
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
Nick Meinhold
41acae19e4 Dart fix template tests (#4015)
* Clean up samples directory before fixing tests

- removed from samples/client/petstore/dart2 :
  - purge_test.sh (doesn't seem to be used and not helpful)
  - openapi folder (is to be re-generated with more meaningful name)
- updated dart2-petstore.sh to generate client library with new name
- used updated shell script to re-generate client library
- updated CI/.drone.yml to use the new client library for tests

* Update petstore tests to use faked http client

- skipped all of the tests that hit a live endpoint
- made a fake http client that can be set to check for expected values
   and/or return a provided response
- added some files with test data recorded from live api calls
- updated the README to reflect changes to tests

* Update .drone.yml so CI will run the tests
2019-10-02 11:16:05 +08: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
William Cheng
31827f5f35
update swift4 samples, update test scripts (#4009) 2019-10-01 21:59:49 +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
Michael Walser
243589ec80 [java] Don't import oltu when not necessary (#3950) 2019-10-01 13:50:21 +08:00
sunn
7a95c9e20d
Regenerate after rebase (#4000) 2019-09-30 21:23:55 +02:00
sunn
600a81f76e
[golang] Regenerate all go samples (#3988)
* Regenerate all go samples

* Update API Key usage

* Add go-experimental script
2019-09-30 18:38:51 +02: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
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
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
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
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
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
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
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
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
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
William Cheng
3ebefccfa9
Prepare v4.1.2 release (#3873)
* update samples

* update date
2019-09-11 18:33:27 +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
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
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