Commit Graph

7566 Commits

Author SHA1 Message Date
Ramanth Addala
a4b1c269d8 fix(r): updated example in doc(.md) file (#3429)
* fix(r): updated doc(.md) files

* fix(r): changed enum representation
2019-07-24 23:15:21 +08:00
Jeremy Bohrer
5775813031 2745 typescript date format (#3423)
* fix axios issue

* fix typo
2019-07-23 15:44:34 +02:00
Bernd Hacker
d2576f411e [typescript-rxjs] runtime and api cleanup (#3316)
* feat(typescript-rxjs): use interfaces from rxjs/ajax, use shorthands

* feat(typescript-rxjs): regenerate samples

* docs(typescript-rxjs): extend readme by middleware howto

* feat(typescript-rxjs): stop generating empty comment when there is no description in model

* feat(typescript-rxjs): import throwIfRequired and COLLECTION_FORMATS only when needed

* feat(typescript-rxjs): generate HttpHeaders and HttpQuery only if needed, improve formatting

* feat(typescript-rxjs): conditionally import HttpHeaders and HttpQuery

* feat(typescript-rxjs): add encodeURI helper, refactor queryString helper

* feat(typescript-rxjs): improve condition for hasListContainers

* feat(typescript-rxjs): regenerate samples
2019-07-22 11:21:37 +02:00
Silas Boyd-Wickizer
76fecf744b [typescript-node] Promise-based Authentication interface (#3408) 2019-07-22 10:54:48 +02:00
Daniel Grünberger
f436904359 [typescript-angular] Add encoder configuration, fix default encoder (#3372) (#3389)
* [typescript-angular] Add encoder configuration and fix default encoder (#3372)

* Add encoder to configuration
* Fix import indention
* Default encoder workaround for https://github.com/angular/angular/issues/18261

* [typescript-angular] Refactor api.service template

* Extract encoder class variable initialized in constructor

* [typescript-angular] Updated samples

* [typescript-angular] Add missing imports

* [typescript-angular] Update samples

* [typescript-angular] Update samples

* [typescript-angular] Fix tests

* Fix typo
* Add missing interface method implementation
* Update samples
2019-07-22 10:54:14 +02:00
Daiki Matsudate
5cba55f8fb
[Swift4] Introduce XcodeGen (#3396)
* add XcodeGen.mustache

* generate code

* add dependencies
2019-07-22 17:12:34 +09:00
Martin Delille
1413775e0e qt5 client: strip whitespace (#3406) 2019-07-21 22:23:15 +02:00
Prateek Malhotra
84e2f60d6b typescript-fetch: fix basic type errors (#3380)
* use proper response for simple object return types
* exclude api and/or model support files and imports if none are generated

Signed-off-by: Prateek Malhotra <someone1@gmail.com>
2019-07-19 08:04:27 +02:00
Jim Schubert
944e1c3468
[fix] Assign template directory to additional properties (#3385)
* [fix] Assign template directory to additional properties
2019-07-18 09:50:54 -04:00
Benoît Courtine
26b8d1f4c2 Better Rust client imports (#3332)
* Better Rust client imports.

* No more "unused_imports" in models for serde_json::Value.
* No more compilation problem for apis requiring serde_json::Value.
* "crate::" prefix for models and apis imports, for compatibility with Rust 2018 edition.

* Rust samples regeneration using new code.
2019-07-18 10:08:48 +01:00
Slavek Kabrda
0fec25e92e [Go][experimental-client]: make struct members pointers, provide custom marshalling (#3371)
* [Go][experimental-client] Properly define packageName for go-experimental sample client

* [Go][experimental-client] make structure members pointers, provide custom marshalling.
2019-07-18 15:52:37 +09:00
Josh Burton
1aa8a2bec4 [dart-jaguar] Fixes error accessing default converters (#3361)
`this.converters` was causing errors as the default converters are declared outside of the API client.
2019-07-18 15:28:15 +09:00
Jérémie Bresson
4223743ee0 [java rest-assured] prevent reqSpec reuse between requests (#3375)
* [java rest-assured] prevent reqSpec reuse between requests

* Update sample
2019-07-18 14:46:44 +09:00
james-beer
29a85d54a2 Adds default property values in ASP .NET Core models (#3369)
* Fixes docker-entrypoint.sh

* Adds default property values to C# model templates (#3359).
2019-07-18 14:22:12 +09:00
Michal Foksa
a85bd0f8f9 Include common lambdas in generators (#3368)
* Include commonly used Mustache lambdas in DefaultCodegen.
* Use or extend common Mustache lambdas from DefaultCodegen.
* Extract OnChangeLambda to own file.
* Javadoc fixed in addMustacheLambdas().
2019-07-18 06:28:40 +02:00
Jean-François Côté
610ca28681 Fix #3349 : [typescript-fetch] Proposition to follow spec (#3351)
* Fix 3349 : Proposition to follow spec closely

* Fix #3349 : Changes suggested by code review. Add an option for the single request parameter.

* Fix #3349 : Add sample with the use of the single request parameter

* Fix #3349 : Small fix that wasn't passing the tests

* Fix #3349 : Remove cariage return that might create an error

* Fix #3349 : Add chmod to make new sh file executable and fix the CircleCI issue

* Fix #3349 : Add windows sample generation

* Fix #3349 : Rename everything because of default value change

* Fix #3349 : Indentation fix

* Fix #3349 : Add 755 to typescript-fetch-petstore-multiple-parameters.sh

* Fix #3349 : Auto generation of the documentations

* Fix #3349 : Revert back a change that was auto-generated.
2019-07-17 22:30:27 +02:00
christof-vollrath-spring-media
8417c5bed0 [typescript-node] fixed enum generator for top level enums #665 (#2266)
* [typescript-node] fixed enum generator for top level enums #665

* [typescript-node] fixed enum generator for top level enums in models.mustache #665

* Remove wrong copyright line
2019-07-15 15:41:40 +02:00
hello-brsd
81e073df2c [typescript-fetch] fix access token type (#3323) 2019-07-15 08:03:09 +02:00
hello-brsd
2fbf0f33b3 [typescript-fetch] support additional properties (#3325) 2019-07-15 07:59:01 +02:00
hello-brsd
3eac8391f5 [typescript-fetch] support custom stringify for query string (#3327)
* [typescript-fetch] support custom query stringify

* [typescript-fetch] support custom query stringify
2019-07-15 07:58:08 +02:00
hello-brsd
d117506b8a [typescript-fetch] fix collection formats reference (#3324) 2019-07-15 07:57:07 +02:00
Jérémie Bresson
41d5750ddb [JaxRS-Spec] add openApiSpecFileLocation parameter (#3344)
* [JaxRS-Spec] add openApiSpecFileLocation parameter

* Update samples
2019-07-14 18:06:44 +08:00
Mateusz Szychowski (Muttley)
c1df082d65 [C++][Pistache] Add compatibility for nlohmann-json 3.5.0 (#3306)
* [C++][Pistache] Replace contains with find on json object

This makes generator compatible with nlohmann-json 3.5.0

* [C++][Pistache] Update Petstore sample
2019-07-13 13:31:14 +02:00
Jim Schubert
4843dfc244 Updates to address recent lodash Object prototype vulnerability (#3348) 2019-07-13 16:43:05 +08:00
Josh Burton
f04ef76d07 [dart-jaguar] Adds option to customise the generated API client name (#3234)
* [dart=-jaguar] Adds option to customise the generated API client name

* [dart-jaguar] Removes explicit clientName CLI property and derives client name from pub name

* [dart-jaguar] Updates samples

* Reverts import changes
2019-07-13 12:32:24 +08:00
Michal Foksa
e81e650627 1. Operations are grouped together by resourcePath so that operation s with same resourcePath can be rendered one after the other. (#3202)
2. Lambdas registered: lowercase, uppercase, onchnage, etc.
2019-07-13 00:41:26 +08:00
Shunsuke Tadokoro
09b4bbc1e1 Correct CLI option (#3340) 2019-07-12 23:59:12 +08:00
Jérémie Bresson
99ee68128d
[java-client][okhttp-gson] add missing import for bearer authentication (#3343) 2019-07-12 06:55:23 +02:00
Jérémie Bresson
15f8c2c78b [code] indicate replacement methods in the javadoc (#3329)
See PR #2946
2019-07-10 23:14:27 -04:00
William Cheng
753be28782 Merge remote-tracking branch 'origin/4.1.x' 2019-07-09 23:56:30 +08:00
William Cheng
203fc812bd
v4.0.3 release (#3315)
* update snapshot version

* update doc

* comment out haskell servant server test
2019-07-09 20:44:31 +08:00
Jérémie Bresson
5b3e9eb72f Revert "Fixed type assignment for referenced enums (#3186)"
This reverts commit c4d61af20b.
2019-07-09 08:20:03 +02:00
DonDi94
c4d61af20b Fixed type assignment for referenced enums (#3186)
Change-Id: Ie33e298bd3164499c717971c98d0c8fe807c6a71
2019-07-09 08:07:56 +02:00
Victor Orlovsky
0e37719162 [Java][Rest-assured] Bump rest-assured version (#3282)
* Update rest-assured version to 4.0.0

* Added rest-assured version 4.0.0 to documentation

* Remove CatAllOfTest and DogAllOfTest
2019-07-08 22:20:35 +08:00
Jérémie Bresson
3943d1cc9d [java] fix javadoc configuration (#3302)
* [java] fix javadoc configuration

* [java-pkmst-microservice] fix generated javadoc
2019-07-08 21:25:47 +08:00
William Cheng
3f9e374c8d
update js flow dep to fix security issue (#3296) 2019-07-08 17:00:38 +08:00
Jérémie Bresson
7b7e147696
[typescript] remove duplicate TypeScriptJqueryClientCodegen.SNAPSHOT field (#3298)
Fix following issue:

The field TypeScriptJqueryClientCodegen.SNAPSHOT is hiding a field from type AbstractTypeScriptClientCodegen
2019-07-08 10:59:11 +02:00
Jim Schubert
51e7005373
[online] Remove GENERATOR_HOST defaults (#3289)
The defaults configured for GENERATOR_HOST didn't really make sense.
When running the docker container with `-P`, GENERATOR_HOST defaulted to
http://localhost. This caused download links for generated client/server
code to be incorrect. For most cases, there's no reason to provide
GENERATOR_HOST as the code already figures the appropriate
scheme/host/port from the originating request.

GENERATOR_HOST could still be used for more complex deployment
scenarios, for instance if a specific server is configured as a file
server. I haven't tested this scenario, and it may require mounting /tmp
as a volume when running within a container.
2019-07-07 10:25:43 -04:00
Erik Timmers
366ca24062 Add option to disable default interfaces (#3022) 2019-07-07 16:44:03 +08:00
Jim Schubert
45da167f8e
[online] Revert GENERATOR_HOST explicit setting (#3287) 2019-07-06 17:18:34 -04:00
Justin Black
109808e60d [Python] Adds new client generator, python-experimental (#3244)
* Adds python-experimental generator

* Adds python-experimental samples folder which uses its own v2 spec

* Adds enusre-up-to-date updates

* Removes samples/client/petstore/perl/t/AnotherFakeApiTest.t

* Removes comment line from python-experimental generator

* Reverts perl docs file

* Updates perl sample client

* Adds python-experimental to pom.xml

* Copies the python test foldeers tests and testfiles into python-experimental

* Copies python test folder into python-experimental

* Moves python testing from Travis (samples pom.xml profile) to Circlci (samples.circleci pom.xml profile)

* Adds python-experimental pom.xml

* Adds python-experimental makefile and .sh files

* Chenges python-experimental to use gitignored venv rather than .venv which is not ignored when testing

* Adds dev-requiremnts.txt and removes .travis.yml from python-experimental so CI tests will pass

* Moves python-experimental from CicleCI to Travis to get support for multiple python environments

* Updates generator java comment so CI tests will run over again
2019-07-06 22:43:29 +08:00
Nathan Broadbent
78551d0180 Set error_reporting(E_ALL) in phpunit.xml settings, to crash on undefined variables (#3266)
* Set error_reporting(E_ALL) in phpunit.xml settings, so that undefined variables will always cause a test failure

* Update petstore sample for php-laravel
2019-07-06 22:21:41 +08:00
William Cheng
e9809294a5
update travis, support java9+ (#3279) 2019-07-05 23:32:10 +08:00
Balázs Zsoldos
bd17a15572 Avoid nullsafe errors in typescript-rxjs runtime.ts (#3255)
* #3253 Avoid nullsafe errors in typescript-rxjs runtime.ts

* #3253 Updating samples
2019-07-05 18:42:30 +08:00
Prateek Malhotra
90bd90c41a [Typescript][Fetch] switch to vars from allVars in model JSON conversion functions (#2899)
Signed-off-by: Prateek Malhotra <someone1@gmail.com>
2019-07-05 18:22:07 +08:00
William Cheng
0b79c5b6be
Add new Go client (experimental) generator (#3268)
* add new go experimental generator

* extends go client codegen

* add go samples and test

* comment out haskell client test
2019-07-04 22:56:49 +08:00
Jérémie Bresson
8d27857f83 [core] consider content in parameters and headers when computing unused schemas (#3243)
* [core] consider content in parameters and headers when computing unused schemas

* consider parameters in PathItem
2019-07-04 20:47:24 +08:00
Matthew Cachia
cbca86b43a Add unhandledException to 'spring' generator, which declares all operation methods to throw a generic exception, allowing implementations to unhandle checked exceptions. This is useful whenever it is unnecessary to handle specific exceptions and, more importantly, allow generic constructs (eg. Spring @ControllerAdvice) to tackle unhandled exceptions from a single point (for instance, tackle all unhandled exceptions as an HTTP500 while excluding the stacktrace in the response body). (#2482) 2019-07-04 20:19:40 +08:00
Kevin Locke
2c342cc2b4 [Java] Handle discriminator mapping non-ref name (#3247)
The `mapping` property of the [Discriminator Object] is "An object to
hold mappings between payload values and schema names or references."
The subsequent examples in the spec have `mapping`s of both types.
The `mapping` support introduced in #536 only supports references.

Update the code to support names (identified by lack of `/`) or
references and change a test mapping to cover this case.

[Discriminator Object]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#discriminatorObject

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-07-04 15:24:47 +08:00
Josh Burton
310f5feda0 [dart-jaguar] Makes converters publicly accessible so they can be used serialization/deserlization outside of the API client (#3245) 2019-07-04 15:13:23 +08:00