1764 Commits

Author SHA1 Message Date
William Cheng
90c7f53a1b
Allow retrieving the underlying configuration for APIClient (#4195) 2019-10-21 16:14:00 +08:00
atetzner
ba04939c7a Fix generation of query parameters for optional/nullable function arguments (#3903)
* OpenAPITools/openapi-generator#3880 Fix generation of query parameters for optional/nullable function arguments

* OpenAPITools/openapi-generator#3880 Updated generated samples
2019-10-21 14:18:42 +08:00
Arvind Thirunarayanan
893f16ad3c [Golang] Allow retrieving the underlying configuration for APIClient (#3976)
* Allow retrieving the underlying configuration for APIClient

  - Needed for dynamically changing the underlying implementations and
    for testing
  - Fixes #1321 and #3412

* Added go-petstore-withXml changes suggested by circleci

* Add caution note about modifying configuration while live
2019-10-21 13:20:56 +08:00
William Cheng
f43c720b08
replace 4-space with tab (#4188) 2019-10-20 00:46:25 +08:00
Jesse Michael
0abb910dbc [go-server] Enhance Go API server with interfaces router binding and services (#4038)
* Enhance go api server with interfaces router binding and services

Enhance the default go api server generation to define interfaces for an API's routes and services. Handle an endpoint's http binding in the generated router and the skeleton for the service logic in an API service.

* Include interface documentation in Go Server generation.
2019-10-19 23:32:52 +08:00
atsharp
d75d089bc9 [Java] Support cookie-based security schemas in Java clients (#4155)
* Adding cookie support and cookie-based AuthKeys to Java clients

* Fix indentation

* Revert accidental change

* Updating samples

* Fixing tests and regenerating samples
2019-10-19 18:05:02 +08:00
Jochen Schalanda
ab0b3d9795 Update to jackson-datatype-threetenbp 2.9.10 (#4176)
* Update to jackson-datatype-threetenbp 2.9.10

* Update to ThreeTen BP 1.4.0

* Fix import and usage of org.threeten.bp.DateTimeUtils

* Refresh samples
2019-10-19 15:08:56 +08:00
Jérémie Bresson
be0fc7e49f [jaxrs-spec][quarkus] update to 0.25.0 (#4185) 2019-10-19 14:49:11 +08:00
Bruno Coelho
c2ad14ea02 [swift4] Add swift package manager and update dependencies (#4141)
* [swift4] add Swift Package Manager

* [swift] update petstore projects

* [swift4] try to run CI again
2019-10-18 10:38:31 +08:00
Akihito Nakano
3f3559020a Add style and explode (#4042)
* Add parameter

* Set default value as Parameter.explode could be null

* Fix typo

* Add a link to the spec

* Add tests

* Delete unused import

* Rename: shouldExplode -> isExplode

* Include the new property
2019-10-17 23:58:38 +08:00
Colin Arnott
080991823a [Go] Upgrade dependencies (#4126)
antihax/optional#1 added module support, and was tagged as a stable
release. This change consumes that tag, and updates the psuedo-version
for golang.org/x/oauth2.
2019-10-17 20:09:02 +08:00
siada
6af234f79a [typescript-inversify] Fix multipart form uploads (#4131)
* Fix multipart form uploads

* Update modules/openapi-generator/src/main/resources/typescript-inversify/HttpClient.mustache

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>

* re-generate samples
2019-10-17 13:50:10 +02:00
William Cheng
60d601ee26
[Python] Minor fix to code format (#4172)
* test python e501 fix

* 2 spaces

* fix format with noqa: E501

* fix format, update samples
2019-10-17 02:34:04 +08:00
Arun
d71b1cf49e [python] Add option to skip client validations (#4137)
* Adds options to skip client side validations

* Runs petstore.sh

* Correct typo in variable name

* Consistent code styling

* Rerun petstore.sh

* Change position of local_vars_configuration

* Make code pep8 compliant
2019-10-16 15:44:04 +08:00
Arun
095fa719b3 [python] Remove post_params and body from OPTIONS request (#4163)
* Remove post_params and body from OPTIONS

* Empty commit to retrigger build
2019-10-16 15:34:22 +08:00
Arun
1786e75490 Skip adding None value in query parameters (#4161) 2019-10-16 15:15:14 +08:00
Esteban Gehring
f195f8ff7a
typescript-rxjs: fix query parameters type (#4160)
* #4159: fix typescript-rxjs query parameter type

* re-generate typescript-rxjs samples
2019-10-16 08:44:38 +02:00
sunn
83fdc6e752
[C++] [Qt5] Add generation of cmake files to qt5 client (#4133)
* Add generation of cmake files to qt5 client

* Update after review
2019-10-15 15:59:45 +02:00
Josh Burton
755a6f4445 Adds Dart Dio generator (#4018)
* Adds initial implemenation of dart-dio generator

* Adds remaining boilerplate for dart-dio generator
2019-10-15 21:05:38 +08:00
Massimiliano Pippi
756984adc9 fix boolean operators precedence (#4158) 2019-10-15 21:03:34 +08:00
Benoît Courtine
dd08ea7a6b [Rust] [Fix #3052] Handle optional and nullable parameters (#4016)
This PR includes theses changes:

- Handling "optional" parameters is not optional anymore. Handling an additional parameter for it makes templates more complicated, and IMO, it is not worth it (as discussed in issue, it is an "acceptable" breaking change).
- Optional parameters are handled everywhere: path params, query params, form params... Generated sample code compiles (both hyper and reqwest libraries).
2019-10-15 13:59:37 +01:00
Hippolyte HENRY
3693d60840 Add newline between function signature of operation and summary of operation (#4112)
* Add newline after function signature

* update Petstore

* [go] Add newline after function signature

* update petstore
2019-10-15 14:46:45 +08:00
sunn
450153d4e0 Add missing supporting files when prefix is provided (#4132) 2019-10-15 14:45:08 +08:00
snebjorn
5de0f01150 sanitizes model names so they're valid class/interface names fixes #4097 (#4127) 2019-10-15 14:35:58 +08:00
Kevin Mahoney
fead3eef76 [elm] fix code generation for nullable types (#4136) 2019-10-15 14:33:48 +08:00
Arun
dfabb1503a Add missing keywords in swift (#4153) 2019-10-15 13:33:13 +08:00
Thiago Arrais
cb2bf4d2bf Do not check status code for default response (#3322)
* Do not check status code for default response

* Updated generated code/docs

Because Circle CI said

> Please run 'bin/utils/ensure-up-to-date' locally and commit
> changes (UNCOMMITTED CHANGES ERROR)
2019-10-15 01:29:46 +08:00
Zbigniew Mandziejewicz
2cab048d41 [go-experimental] export required fields without pointer (#3989)
* [go-experimental] export required fields without pointer, only omitempty if type is not required and not nullable

* fix: go-experimental sample code

* fix: export nullable field as pointer

* update samples

* feat: nullable types

* add getter/setter for required fields, improve docstring
2019-10-15 01:19:47 +08:00
Dec12 | Fujigon
c231675a05 don't forget to copy the object mapper for serialization, in order to avoid setting affects other serialization (#4093) 2019-10-14 22:55:30 +08:00
gurumeditator
ec4ac07dfe [Java] fix jackson-databind-nullable version variable due to Gradle Incompatibility (Template Update) (#4148)
* Replaced dashes with underscores in build.gradle files.

* Updated mustache template files
2019-10-14 22:25:50 +08:00
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