20229 Commits

Author SHA1 Message Date
Paul Mundt
4b0fc3013f [dart2] Fix up test code generation, double deserialization, 'new' keyword deprecation (#3576)
* dart2: Use the correct classname in test generation

At present test generation has a stray hard-coded reference to the pet
store Pet() class, which should reflect the actual classname under test.

* dart2: Call toDouble() in generated code for double types

At present the generated code does not correctly handle transitioning
to double when dealing with non-integer types in JSON deserialization.
This ends up with dart raising an unhandled type mismatch exception:

Unhandled exception: type 'int' is not a subtype of type 'double' where
...

Using the .toDouble() conversion when a double type is expected fixes
this up by making the typing explicit.

* dart2: Drop use of deprecated 'new' keyword in generated code

The use of the 'new' keyword in dart2 is deprecated and should be
avoided, as per the official guidance of the dart2 authors:

https://dart.dev/guides/language/effective-dart/usage#dont-use-new

* dart2: Regenerate samples for mustache template changes
2019-08-09 00:15:45 +08:00
Martin Delille
1152af4d02 Run Qt5 client sample test (#3415) 2019-08-08 23:59:50 +08:00
Jean-François Côté
b28ef78145 typescript-fetch: allow configuration of headers and credentials (#3586)
* Fix #3402 by giving the possibility to set additional headers and the credentials parameters to the fetch query.

* Fix #3402 : Changes from code review
2019-08-08 14:48:45 +02:00
William Cheng
7f36f26422
using partials in ruby api_client (#3564) 2019-08-08 09:49:01 +08:00
cgensoul
411199bc99 [OCaml] Added optional params support in API operations (#3568)
* Added handling of api keys in headers.

* Added handling of optional arguments in api functions.

* Optional header params.

* Fixed a bug in path param replacement.

* Relaxed deserializing of model records with @@deriving yojson { strict = false }. It allows receiving more fields in the JSon payload than declared in the OCaml record, fields not matching any record field are ignored.

* Reformatted api-impl.mustache.

* Generate shorter enum value names by allowing underscore character.

* Cleanup of optional params generation.

* Updated the OCaml samples with the latest version of the generator.

* Corrected a bug encountered when generating default value for optional enum fields.

* Added v3 version of the samples for the OCaml generator.
2019-08-07 11:25:32 +08:00
Richard Whitehouse
4478f42927
[Rust Server] Generate valid Rustdocs for lazy_static items (#3556)
Generate valid Rustdocs for lazy_static items and update samples
2019-08-06 18:44:51 +01:00
Jean-François Côté
9e659d13ed Fix NPM build for Typescript-fetch (#3403)
* -Fix bug in fetch -> Missing "runtime"
-Move fetch files to an "src" folder instead of doing everything at the root which removes the bugs when using the library itself
-Fix the distribution of fetch using npm

* Move the .ts files to an `src` folder which is more common in npm package

* Add missing mustache

* Add missing .npmignore
2019-08-06 16:08:38 +02:00
unintended
b8295afa27 Expand path templates via resttemplate's uriTemplateHandler (#3500)
* Expand path templates via resttemplate's uriTemplateHandler

* fix tests and compilation on lower jdk version

* fix typo

* re-generate samples
2019-08-06 12:56:43 +02:00
Anıl Can Aydın
3538c08a8b Readme updated with a new tutorial and company using OpenAPI Generator (#3566) 2019-08-06 16:24:29 +08:00
Juang, Yi-Lin
5ab1c9c75b Fix logic of getNullableType of csharp server and client. (#3537)
* Fix default nullable

* Fix tests

* Update samples

* Fix template default value

* Update samples

* Also fix for interface

* update samples
2019-08-06 10:26:50 +08:00
William Cheng
2bbebf9752 [Ruby] clean up Ruby dev dependencies (#3551)
* clean up ruby dev dependencies

* update ensure uptodate to cover ruby faraday
2019-08-06 09:52:48 +09:00
Prateek Malhotra
f756bd5e11 typescript-fetch: Properly detect and encode container request body param (#3517)
Signed-off-by: Prateek Malhotra <someone1@gmail.com>
Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>
2019-08-05 19:48:52 +02:00
Jeremie Bresson
fae073874b Update samples 2019-08-05 15:07:26 +02:00
Cristian Achille
00f7134eb3 #2956 [typescript] change accessToken name parameter to optional (#3555)
* [typescript] change accessToken name parameter to optional

* [typescript] update samples for ts-fetch and ts-rxjs
2019-08-05 12:37:13 +02:00
Dennis Melzer
b20118b87c java-springcloud: No dependency management if parent overridden (#3301)
* If a separate parent pom is specified, there
should be no depdendency management

#3230

* Add Bean Validation framework

* Fix test and depedencies

* Format pom
2019-08-05 10:49:58 +02:00
Esteban Gehring
a48df102d6
#3542: typescript-angular fix string cast (#3558) 2019-08-05 10:40:18 +02:00
William Cheng
3f7653a5c9
Add a link to join the Slack workspace (#3554) 2019-08-04 23:57:19 +08:00
William Cheng
4df1e1928c update rust server samples 2019-08-04 23:06:14 +08:00
Richard Whitehouse
83f17941b9
[Rust Server] Allow more than 32 configured paths (#3494) 2019-08-04 12:55:33 +01:00
Richard Whitehouse
6963e5eeb0
[Rust Server] Support multipart/form_data request bodies (#2846)
[Rust Server] Support multipart/form_data

- Support multipart/form_data in the Rust Server
- Add a new test API to test the change.
- Update the examples to match
2019-08-04 12:54:24 +01:00
William Cheng
86228e9964
[Ruby] remove auto-generated Gemfile.lock (#3541)
* remove auto-generated gemlock file

* update test file to conform to rubocop format
2019-08-03 16:36:22 +08:00
William Cheng
480d6baf3b
Add @meganemura @dkliban as the template creator of Ruby Faraday client (#3544) 2019-08-03 14:54:18 +08:00
William Cheng
8b44c9dff1 update spring samples 2019-08-03 01:30:49 +08:00
Dennis Melzer
ba63aa55a5 Add lowercase lamda (#3501)
* Add lowercase lamda

#3381

* Add lowercase prefix for spring

#3381

* Add lamda prefix

* Add lamda lower case to @Value

* Add properties for braces

#3381

* Add property for braces

* Start CI

* Revert
2019-08-02 15:24:04 +02:00
William Cheng
d45e306480
Use partial for Ruby HTTP libraries (#3539)
* use partial for ruby http libraries

* fix isFaraday

* add back client side validation switch

* remove blank lines
2019-08-02 21:18:24 +08:00
cgensoul
1c36fa9fe3 Fixed #3521. Response headers were not processed for enums collection. (#3526)
* Fixed #3521. Response headers were not processed for enums collection.

* Replace " by '' in text fields to allow these to be used in OCaml comments.

* Added support of ByteArray (i.e. base64 encoded data) body and free form object as request body. Added support of free form object in response body as well.

* Added result as a reserved word to prevent generating model files with this name (having a result.ml model file confuses dune into thinking some other model modules depend on Result when they don't).

* Updated samples to reflect the latest changes in the OCaml generator.
2019-08-02 19:04:53 +08:00
Steven Masala
d0f0e17542 remove fixme by setting param to final and creating local variable for sanitising model name (#3525)
- general cleanup

(cherry picked from commit 88cf7e801f78a6611fc0d63479c78296e7312419)
2019-08-02 11:33:15 +02:00
William Cheng
ffaeb11a61
Add cgensoul to OCaml tech committee (#3536) 2019-08-02 14:15:49 +08:00
Dennis Kliban
4c1133be3f Problem: faraday ruby client does not respect TLS settings (#3527)
Solution: pass in tls settings to the faraday client
2019-08-02 12:20:16 +08:00
William Cheng
dff3386594
Remove Gitter badge 2019-08-02 09:44:42 +08:00
William Cheng
ca85ecb283
[Ruby][Faraday] Various improvements (#3520)
* update ruby faraday oas v2 samples

* skip some default tests in faraday

* add ruby faraday oas v3 client

* add tests, fix url

* add tests to CI

* fix file upload

* undo changes to ruby-client-petstore.sh

* test faraday first

* combine gemspec tempaltes

* test ruby faraday in drone.io

* use smaller image

* update bundler

* use official ruby image

* skip bundler installation

* skip autotest

* install make

* use different image

* skip ruby tests in drone.io
2019-08-02 07:00:29 +08:00
Juang, Yi-Lin
93ddf6e2ef Fix DateTimeOffset nullable issue (#3530) 2019-08-02 06:58:32 +08:00
Ivan Aksamentov
ed82aaae97 Fix PHP Symfony OpenAPI 3 sample location. Fixes #3531 (#3532)
* Fix PHP Symfony OpenAPI 3.0 sample location

* Update PHP Symfony OpenAPI 3.0 sample
2019-08-02 06:55:58 +08:00
Ivan Aksamentov
581131e0fe Fix PHP Symfony non-primitive return type being forced to be an array (#3515)
* Fix PHP Symfony non-primitive return type being forced to be an array

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

* Update PHP Symfony samples
2019-08-02 06:54:13 +08:00
sunn
08415d1d83
Remove QRandomGenerator (#3508) 2019-08-01 20:50:28 +02:00
Mateusz Szychowski (Muttley)
4d285939a6 [C++][Pistache] Do not use JSON for primitive types in request body (#3509)
* [C++][Pistache] Do not use JSON for primitive types in request body

Request body can contain any input, simple strings, CSV text or something else

* [C++][Pistache] Update Petstore sample version
2019-08-01 13:49:17 +02:00
William Cheng
eca8ec3cf8 update doc 2019-08-01 15:58:45 +08:00
Marc Schlegel
0a7527b03e [java-client][okhttp-gson] fixes for interceptors in ApiClient.java (#3502)
ApiClient for Okhttp3 must not copy the interceptors when setting the HttpClient.
Enforce invariant that the HttpClient must never be null.
2019-08-01 06:39:47 +02:00
Dennis Kliban
bcc3a9ecf7 Ruby client faraday (#3405)
* WIP: add faraday support to Ruby client

* update samples

* bin/console

* https only

* ruby-faraday: Add a gemspec template for faraday

* Add a test for ruby-faraday client options

* Remove Gemfile.lock from ruby-client-faraday

* Implement faraday client

* Problem: can't use Faraday library for ruby clients

Solution: add support for Faraday library

This patch builds on the work started by @meganemura

* Problem: Faraday is set as default library

Solution: Make Typhoeus default

This patch also updates the api_client template for Faraday to include query params with requests.
2019-08-01 11:08:34 +08:00
Erik Seliger
f90f214121 fix(typescript-angular): improve small template issues (#3466)
* fix(typescript-angular): improve small template issues

* fix: template adjustments

* fix: repair hasSomeFormParamsLogic

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>
2019-07-31 22:24:02 +02:00
Erik Seliger
0e621dcc29 feat(typescript-angular): add flag for using string enums (#3464)
* feat(typescript): add flag for using string enums

* fix: adjust templates

* fix: repair logic

* fix: remove sample

* fix: add to v7 sample

* fix: remove unneeded lines
2019-07-31 21:16:49 +02:00
William Cheng
8b054e6f8e update spring samples 2019-08-01 00:31:58 +08:00
Justin Black
88af8964fd [python-experimental] automatically use values for enums of length1 (#3118)
* Update python client java generator

* Updates python generator mustache files

* Python sample regenerated

* Switches from getfullargspec to getargspec for python2 compatibility

* Uses getattr to get model class init method to correctly see its arguments, linting fixes to pass python tests

* Updates comment in python centerator to restart CI tests

* Adds bin/windows/python-experimental-petstore.bat

* CHanges spec update to apply to the python-experimental spec

* Moves new python templates to python-experimental

* Moves generator python java code to python-experimental

* Reverts python generator mustache files

* Regenerates python, v3 python, python-experimental samples

* Test moved to python-experimental, unused python files removed
2019-07-31 21:18:30 +08:00
Richard Whitehouse
199447a398 Add richardwhiuk to the Rust Technical Committee (#3506) 2019-07-31 13:50:51 +02:00
Thibault Duperron
4c9d023468 Enable async option for spring-cloud library (#2670)
* Enable async option for spring-cloud library

* Samples
2019-07-31 14:22:05 +08:00
William Cheng
d46cabcd4f
Better handling of dot in inline model name (#3498)
* better handling of dot in inline model name

* do nothing if title is present

* add comment
2019-07-31 13:50:29 +08:00
julaudo
6824bd8b24 #2694 [BUG][Typescript Axios] Content-type not set (#2695)
* #2694 [BUG][Typescript Axios] Content-type not set

* Test required allOf

* re-generate typescript-axios samples

* re-generate typescript-axios samples
2019-07-30 15:47:17 +02:00
Doxoh
f90507b527 [aspnetcore] Support cookie parameter (#3490)
* Fix typo useDefaultRoutng to useDefaultRouting

* support the cookie functionality in aspnetcore

* Changes like wing328 comments
2019-07-30 18:22:15 +08:00
timmiotool
3b584c2138 validation for primitive request bodies #3491 (#3492)
* Add parameters to primitive request bodies

Signed-off-by: tim.smyth <tim.smyth@kiwigrid.com>

* Replace tabs for spaces

Signed-off-by: tim.smyth <tim.smyth@kiwigrid.com>
2019-07-29 18:06:20 +02:00
Michal Foksa
37cdc8e493 Feature/mustache lambda documentation (#3476)
* Default outputFile value is `openapi/openapi.yaml`.

* Mustache Lambdas documentation.

* Default OpenAPIYamlGenerator outputFile value is `openapi/openapi.yaml`.
2019-07-29 15:34:50 +02:00