18346 Commits

Author SHA1 Message Date
Jim Schubert
4b6499c636
[maven] Support user overrides for serverVariables (carryover from #3363) (#3609)
*  Adds server variables overrides option to the Maven plugin
2019-08-11 14:49:51 -04:00
William Cheng
290550ef91
Add build badges for 4.2.x branch (#3610) 2019-08-12 00:35:49 +08:00
William Cheng
1c31dce4bd Merge remote-tracking branch 'origin/4.2.x' into 5.0.x 2019-08-12 00:22:19 +08:00
Jim Schubert
06533b977c
[core][gradle] User-defined server variable substitutions (#3363)
* [core] Initial support for server variable overrides
* [gradle] Support user overrides for serverVariables
* [core] Clarify server variable overrides, and propagate them to templates in the "servers" array
2019-08-11 09:57:36 -04:00
Andrey
07381e7275 Fix kotlin templates (#3504)
* Fix kotlin templates to use okhttp 4.0.1.
* Fix escaping of dataType field.
* Fix handling of arrays/lists of enums.
2019-08-11 09:35:57 -04:00
William Cheng
01222268e8 update samples 2019-08-11 18:56:47 +08:00
Juang, Yi-Lin
22d022b2d5 [aspnetcore] Add TypeConverter for enum string conversion (#3557)
* Add TypeConverter for enum
2019-08-10 22:57:36 -04:00
Michal Foksa
42d6420400 Feature/mustache lambda tests (#3447)
* Mustache lambda tests

* If lambda key is already taken in additionalProperties, throw an exception.

* Test whether common lambdas are registered in additionalProperties.
2019-08-10 22:15:40 -04:00
Gustaf Barkeling
ac85c8f901 Fix #3604 by adding undefined as return type to headers and credentials methods in runtime.ts (#3605) 2019-08-10 10:45:41 +02:00
William Cheng
5956569e7a
Prepare 4.1.1-SNAPSHOT (#3603)
* update pom

* update samples

* update pom
2019-08-10 09:41:08 +08:00
William Cheng
59c4e381d1
Prepare 4.1.0 release (#3597)
* update pom

* update doc

* update version

* add dep for nullable annotaiton
v4.1.0
2019-08-09 22:25:32 +08:00
Jérémie Bresson
1ab7b9ceb6 [java][client][jax-rs] Add a constant for Jackson @JsonProperty (#3560) 2019-08-09 11:01:23 +08:00
William Cheng
65c7c1b39b
restore openapi3 petstore.yaml (#3590) 2019-08-09 01:32:50 +08:00
William Cheng
2d7cc778db
Add a new NodeJS Express server generator (#3567)
* create nodejs express esrver

* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet

* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet (#2839)

* Working Express server with successful routing to controllers.

* rewrote controllers and services. Haven't tested yet

* controllers and services have passed tests successfully

* Added documentation

* Added documentation

* Support for openApi v3, using 'express-openapi-validator' for parsing and validation, and an internal router to pass arguments to controllers and services. /controllers/Pet.js and /services/PetService.js should be used for reverse engineering for future codegen script

* update generator and template

* update samples

* more update

* update service, controller

* add vendor extensions

* some updates to adapt to changes in the generator (removing references to swager); some work on handling file uploads; some work on tests

* Update NodeJS server generator and templates based on new output (#3261)

* update generator and template

* update samples

* more update

* update service, controller

* add vendor extensions

* update doc

* Changed routing code to follow the following convention:
Each path operation has a 'x-openapi-router-controller' and 'x-openapi-router-service'. Automated files will be placed under /controllers and /services respectively.
Controller file names will end with 'Controller.js'.
Removed swaggerRouter, replaced it with openapiRouter
Routing works and simple tests show a return of 200 to requests.

* [nodejs-express-server] various updates, fixes (#3319)

* various fix

* remove dot from service

* add space

* better method empty argument

* remove test service (#3379)

* add new doc

* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData
2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.

* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData (#3442)

2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.

* added model classes. Currently as a concept only. Seems like won't be in use

* Updated README.md to be a detailed description of the project.
Removed test files that are not needed.
Removed utils/writer.js which is not needed, and the references to it in the codegen files

* Removed redundant file app.js - this file has no benefit at this point. index.js now calls ExpressServer.js directly. Updated files that used to call app.js. Updated README.md accordingly
Added a path to call the openapi.yaml, and a test file for all endpoints that are not in the openapi.yaml, ensuring that they return 200. Updated README.md accordingly

* Remove test controller (#3575)

* remove test controller

* add back changes to templates

* remove app.js

* update wording
2019-08-09 00:30:47 +08:00
Mario De Schaepmeester
fbb2f1e05a [C#][client][csharp-netcore] Fix csharp netcore defaultheaders (#3562)
* [csharp-netcore] Send default HTTP headers with requests

* [csharp-netcore] Add DefaultHeaders in favor of DefaultHeader
2019-08-09 00:24:47 +08:00
dan-drl
752030890f Fix issue deserializing to nullptr (#3572)
* Fix issue deserializing to nullptr

* Update codegen files
2019-08-09 00:17:54 +08:00
William Cheng
36dd848440
[OCaml] Add file post-processing (#3583)
* post process file in ocaml, remove unused sample

* auto-format ocaml petstore

* revert formatting

* remove openapi3 ocaml client
2019-08-09 00:17:24 +08:00
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