8767 Commits

Author SHA1 Message Date
William Cheng
d5b09cff2a
[Bash] Minor improvements (#4274)
* minor improvements to bash generator

* test bash

* fix path

* test bash in travis

* fix pom
2019-10-26 11:30:08 +08:00
LoveIsGrief
2969f0764a Place PathHandlerProvider.java of java-undertow-server in the apiPackage dir (#4255)
* Fix copy-pasted string

* Generate the PathHandlerProvider.java in the apiPackage

This is a toss-up between apiPackage and invokerPackage since I don't
 know which one was intended, I'm assuming it's the apiPackage.
It'd make sense to put the handler there since it is providing the API
 and handling calls to it...
2019-10-25 15:14:09 +08:00
wiruzman
d15a4c3e8e Remove support for old .net core project type (#3937) 2019-10-24 23:06:48 +08:00
amond
bf5db10837 fix(dart-dio): generate enum using built_value (#4235)
Signed-off-by: Minsu Lee <amond@amond.net>
2019-10-24 23:00:21 +08:00
Fabio Kung
c3666e9350 okhttp-gson: fix SSL settings with okhttp3 (#4226)
The old code used to work with older okhttp (< 3), but will throw
NullPointerExceptions with okhttp3.
2019-10-24 18:15:10 +08:00
Arun
652b0f5bf6 [python] Add ability to get allowed values (#4138)
* Add function to get list of allowed values

* [python] Add function to get list of allowed values

* Remove temporary variable

* Remove static method and use a variable

* Remove classname
2019-10-24 17:28:29 +08:00
mrmeku
e85f6c577e typescript-angular: Allow for custom naming of ApiModule (#4209)
In cases where a user wants to generate multiple module's,
it is convenient to have these modules have different names.
2019-10-24 10:13:48 +02:00
William Cheng
2bf708d938
deprecated netstandard, uwp support in csharp (#4214) 2019-10-24 01:10:57 +08:00
Hassan Paknia
5766fca98b Renaming foreach variable to avoid name conflict with the possible input parameter named value (#4232) 2019-10-24 00:51:52 +08:00
Andrew Emery
b56a9d907c Fixes Kotlin client property names that include a dollar sign (#4229)
Property names that include a dollar sign are being interpreted
by Kotlin as a string template. This fix escapes such instances.

https://github.com/OpenAPITools/openapi-generator/issues/4228
2019-10-24 00:50:41 +08:00
Bruno Coelho
620aa4fd5e [kotlin][client] only use authentication tokens when they are not null (#4238)
* [kotlin-client] only use authentication tokens when they are not null

* [kotlin-client] only use authentication tokens when they are not null
2019-10-24 00:46:46 +08:00
Slavek Kabrda
cf58a427b6 [java][client] Don't include nullable attributes twice in serialized JSON (#3923)
* [java][client] Don't include nullable attributes twice in serialized JSON

* Get rid of the extra added whitespace

* Regenerate samples
2019-10-22 16:17:27 +08:00
Jesse Michael
00c6e0a64b Return Router interface from controller constructor. (#4196)
Update the go server api controller template to return the Router interface instead of the api specific router.
The Router interface type has the Routes function, which is what the generated `NewRouter` function needs. (not the api specific interface).
2019-10-22 15:27:08 +08:00
William Cheng
9fe2f4d3ef
[Kotlin][client] Add nullable query parameter support (#4197)
* add nullable query parameter support

* remove redundant bracket
2019-10-22 15:14:14 +08:00
Guillaume SMAHA
5d7bb17cc6 Python: Flask: Fix: Update setup.py to match requirements.txt (#4205)
* Python: Flask: Fix: Update setup.py to match requirements.txt

* Regenerate samples python-flask & python-flask-python2
2019-10-22 08:57:54 +08:00
Yuriy Belenko
8e78b14e28 New PHP Slim4 Server Generator (#3658)
* [Slim4] Copy Slim3 generator as starting point

* [Slim4] Add psr7Implementation generator option

Slim supports PSR-7 interfaces for its Request and Response objects.
Slim provides its own PSR-7 implementation so that it works out of the
box.
However, you are free to replace Slim’s default PSR-7 objects with
a third-party implementation.
[Ref] https://www.slimframework.com/docs/v4/concepts/value-objects.html

* [Slim4] Handle psr7Implementation generator option

It somehow ended up with composerPackages and composerDevPackages
codegen variables and two additional functions. Hope, it's not too much.

* [Slim4] Extend from Slim3 generator

* [Slim4] Bump PHP Slim Framework version to 4.0.0

* [Slim4] Bump required PHP version to 7.1

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Remove app settings

Slim’s App settings used to be a part of the container and  they have
now been decoupled from it.

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Set container argument optional

Slim uses an optional dependency container to prepare, manage,
and inject application dependencies.
Slim supports containers that implement PSR-11
like [PHP-DI](http://php-di.org/doc/frameworks/slim.html).

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Change response body write

You can't write to response instance directly anymore,
need to retrieve body object first.

[Doc](https://www.slimframework.com/docs/v4/objects/response.html#the-response-body)

* [Slim4] Change Slim\App constructor

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Refactor token authentication options

User can provide array or Container as constructor argument from now.
Small refactoring required to retrieve authentication options from
that argument.

* [Slim4] Add PSR-7 implementation codegen flags

This approach seems more flexible to me.
User can customize templates in favor of chosen PSR7 implementation.
It's easier to change Composer packages and their versions.

* [Slim4] Add JsonBodyParserMiddleware

Slim4 doesn't parse JSON body, need to add suggested middleware.
Ref: https://www.slimframework.com/docs/v4/objects/request.html#the-request-body

* [Slim4] Remove request's deprecated methods usage

Since Slim 4.0.0 ServerRequest implementation doesn't have
getQueryParam and getParsedBodyParam methods anymore.

* [Slim4] Use getUploadedFiles for multipart request

isMultipart codegen property is always false so far.
Hope that bug will be fixed soon.

* [Slim4] Add samples
2019-10-21 22:20:12 +08:00
Jan Jongboom
1052ebaced typescript-jquery: Update to work with Typescript strict mode (#3969)
* typescript-jquery: Work in Typescript strict mode

* re-generate samples
2019-10-21 13:44:48 +02:00
Bernd Hacker
ea76a94001 [typescript-rxjs] improve HttpQuery typing (#4198)
* refactor(typescript-rxjs): replace HttpQuery casting by adjusting type definition

* feat(typescript-rxjs): regenerate samples
2019-10-21 11:29:23 +02:00
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
wing328
54151891cc Merge branch 'master' into 5.0.x 2019-10-17 11:18:57 +08:00
Jim Schubert
0e1ce6bb63
[docs] Custom template clarifications and other minor enhancements (#4167)
* [docs] Updating docsite outputs to be browsable on Github as well

* Fix links to other files
   Suffix `.md` was needed to make links works

* [docs] Add clarification to differences between customization and templating docs

* [docs] Collapsible side bar, scroll to top, minor enhancements
2019-10-16 18:04:44 -04: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