9299 Commits

Author SHA1 Message Date
Dheeraj Nalluri
3784f459e9
[typescript-angular] Unify authorization lookup (#6953)
* [typescript-angular] Unify authorization lookup

* [typescript-angular] Update samples.

* [typescript-angular] Fix typo.

* [typescript-angular] Revert changes to some of the sample files.

* [typescript-angular] Fixed compile error.

* [typescript-angular] Use arrow functions to avoid "this" issues

* Document usage of credentials map.
2020-07-22 10:29:28 +02:00
Patrice De Saint Steban
b1dcf65c5b
[Avro] Default value for no required fields to null (#7006)
* Default value for the non required fields to null

When a field is not required, the avro schema has no default value.
Has described in an [avro issues](https://issues.apache.org/jira/browse/AVRO-1803), the property default: null must be set.

If we don't do this in the avro file, when we generate java code from generated avro schema, the builder fail if the data isn't set in the avro data class.

* Update generated avro sample
2020-07-22 13:13:59 +08:00
William Cheng
2ab35e0386
add JsonTypeName (#6995) 2020-07-21 14:21:10 +08:00
daiscog
95bd845f79
Typescript-angular generator: Mark deprecated operations with @deprecated JSDoc tag (#6973) 2020-07-20 16:12:42 +02:00
Kim T
383b1e9db8
[NodeJS] nodejs-express-server fix /api-docs path (#6977) 2020-07-20 18:57:50 +08:00
Justin Black
0e0f8eb74c
[python-experimental] Removes python2 (#6991)
* Removes future from python-exp v3 sample

* Removes future from python-exp v2 sample

* Deletes future from remaining python-exp files

* Removes six from python-exp templates

* Removes six from python-exp samples

* Removes mock from python-exp

* Python-exp switched to py3

* Removes python 2.7 for python-exp ci testing

* Requires python>=3.3 for python-exp

* Reverts unnecessary changes to two templates
2020-07-19 09:45:56 -07:00
Justin Black
ed84280108
Python-exp remove codegemodel mutation, allow mixed OneOf types (#6797)
* Stops converting primitive models into object models, adds ComposedSchemas with mixed type

* Samples update for python-exp
2020-07-18 10:13:22 -07:00
William Cheng
44d3f717f8 update java samples 2020-07-18 22:02:16 +08:00
Sebastien Rosset
968f32b55e
[Java][Jersey2] Add JsonTypeName annotation (#6551)
* Mustache template should use invokerPackage tag to generate import

* add JsonSubTypes annotation to handle scenario when OAS name has special characters

* add JsonSubTypes annotation to handle scenario when OAS name has special characters. Add unit test

* run sample scripts

* fix unit test

* run sample scripts

* add minimal openapi document to show issue with special characters and discriminators

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add unit tests for unmarshaling of discriminators with special characters

* Add unit tests for unmarshaling of discriminators with special characters

* use JsonTypeName

Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-18 21:56:41 +08:00
William Cheng
dd6e8ccc3d
replace ~ with $user.home (#6985) 2020-07-18 17:07:03 +08:00
William Cheng
0707b4bb20
[Scala] setup Ivy cache directory (#6978)
* use ivy2 cache

* use ~/.ivy2 cache dir

* add pom.xml to openapi-generator-ignore

* update scala-akka sample

* use ~ for home directory
2020-07-18 15:48:47 +08:00
William Cheng
d2161c8ad1 update c# samples 2020-07-18 11:18:21 +08:00
mh03r932
ffdd7000a4
fix: make accept header consistent with sync vers. (#6922)
* fix: make accept header of async apis consistent with sync version

* make sync and async version use same logic
* generate samples for csharp-netcore using generate-samples.sh

* fix: make accept header of async apis consistent with sync version

* change tabs to spaces to match existing code
2020-07-17 18:08:51 +08:00
bgong-mdsol
8cd52033e4
[Java][Native] added WithHttpInfo method for async-native (#6903)
* [java-asyncNative] add withHttpInfo

* update api template for async-native
2020-07-17 15:30:02 +08:00
Tomohiro Suwa
9318833fa5
[Ruby] ruby client build from hash nullable (#6945)
* Ruby Client: nullable for build_from_hash

* Generate sameples with a8eed9ce38e
2020-07-17 00:39:21 +09:00
Bodo Graumann
7cb8766a5c
[Typescript] Fix array model of alias to array (#6888)
* Add failing test

* Add model unaliasing

* Regenerate samples

Not really related to this bug fix, but probably necessary for ci
checks.
2020-07-16 16:31:41 +02:00
翠 / green
fce74884f8
[typescript-axios] switched to new URL API (#6960)
* [typescript-axios] switched to new URL API

* [typescript-axios] fix tests
2020-07-16 15:35:41 +02:00
William Cheng
a348f5a170
[Go] fix unmarshal for models with parents (#6946)
* set disallowAdditionalPropertiesIfNotPresent to false in go exp oas3

* fix unmarshal in go

* remove fields from embedded structs

* fix typo
2020-07-16 14:52:30 +08:00
William Cheng
02a8207b91
skip test for enum model, update readme (#6936) 2020-07-15 19:00:14 +08:00
William Cheng
cef1bec466
fix null payload in java jersey2 (#6933) 2020-07-15 00:50:37 +08:00
Sebastien Rosset
38368c9bda
[Java][jersey2] Fix format of Date header in HTTP signature (#6925)
* Use RFC 1123 date format for Date header in HTTP signature

* Use RFC 1123 date format for Date header in HTTP signature
2020-07-15 00:19:55 +08:00
William Cheng
9d76ca291e
add nullable body support to powershell (#6930) 2020-07-15 00:19:13 +08:00
Sebastien Rosset
b86a51ae17
fix typo (#6928) 2020-07-14 14:03:04 +08:00
William Cheng
5980c420e3
minor fix to sample code (java jersey2) (#6921) 2020-07-14 12:36:05 +08:00
Justin Black
dad931a25a
Python exp sample component renaming + additions (#6917)
* Stops converting primitive models into object models, adds ComposedSchemas with mixed type

* Reverts java and mustache changes

* Reverts mroe files

* Samples regen

* Fixes remaining tests
2020-07-13 10:22:03 -07:00
William Cheng
29183e0280
[PowerShell] support default value in models (#6920)
* support default value in ps

* revert changes to the spec
2020-07-13 13:41:10 +08:00
jekkel
0be0a06d84
[Java][Client][vert.x] Support per-call authentication and JsonNullable in client request bodies, fix path parameter encoding (#5732)
* Support per-call authentication and JsonNullable in client request bodies

Extensions
----------
Since vertx is an asynchronous/reactive toolkit usage of mutable fields
of `ApiClient` to store authentication prohibits delegation of
authentication from incoming call without recreating the client
everytime (which is prohibitively expensive due to instantiation of objectmapper).
This commit adds a per call authentication override which takes precedence
over the mutable fields so a single client can be safely reused. To ease
usage a simple builder-style auxiliary `AuthInfo` object is provided
providing methods for each specified authentication.

A new configuration option for `ApiClient` has been added: `timeout`. It gets
applied as timeout for the vertx http request.

Fixes
-----
Request bodies have been wrongly serialized using vert.x built-in
objectmapper instead of the embedded instance thus usage of beans with
`JsonNullable` wrapped fields in request bodies led to bad requests.

* update vertx samples

* Client Java Vertx: Add url encode for path parameters.

* update vertx samples
2020-07-08 16:30:31 +08:00
William Cheng
ce177a7fb6
Add isAdditionalPropertiesTrue (#6880)
* move postProcessModel to the end

* add isAdditionalPropertiesTrue

* remove supportsAdditionalPropertiesWithComposedSchema from go exp

* remove x-additional-properties

* update comment
2020-07-08 11:30:16 +08:00
William Cheng
3e69d73ec9
Update JS dependencies (#6867)
* update JS dependencies

* test js in circleci

* remove js test in travis

* remove node version
2020-07-07 12:26:35 +08:00
Jon Schoning
8c5c0597ae
[haskell-http-client] avoid depending on ParseTime,FormatTime (#6861)
* [haskell-http-client] avoid depending on ParseTime,FormatTime

* [haskell-http-client] update haddocks
2020-07-04 19:52:52 -05:00
William Cheng
61789475ea update python samples 2020-07-03 18:51:31 +08:00
Matthew Davis
f15acbc700
clarify direction of py client side validation flag (#6850)
* clarify direction of py client side validation flag

* change pet store py cli validation disable example

Co-authored-by: Matthew Davis <Matthew.Davis.2@team.telstra.com>
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-37-8.ec2.internal>
2020-07-03 18:39:53 +08:00
Jorge Rodríguez Martín
068ad02bc8
[BUG] [JAVA] Fix multiple files upload (#4803) (#6808)
* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload
2020-07-03 00:23:17 +08:00
Bruno Coelho
f0157b8c0f
[kotlin][client] fix retrofit dependencies (#6836) 2020-07-03 00:03:17 +08:00
William Cheng
aed5be9b9c
[PowerShell] add more fields to be customized (#6835)
* more fields to be customized

* set powershell version

* fix psData
2020-07-02 23:50:50 +08:00
grzegorz-moto
23f57a7290
[Java][WebClient]remove the dead code from java ApiClient.mustache (#6556)
* remove the dead code

Remove the dead code from ApiClient
The code is not used and it contains vulnerability of Log Forgery when it writes unvalidated http header to the log. An attacker could take advantage of this behaviour to forge log entries or inject malicious content into the log.

* update Petstore samples

* whitespace
2020-07-02 18:34:28 +08:00
Ian Lord
eaa3c730fa
[PHP] Better handling of invalid data (array) (#6760)
* Update ObjectSerializer.mustache

If the $data is a wrongly formatted Json or if data is not an array, php gives error:

Invalid argument supplied for foreach() at line 257 (Now line is 262)

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-02 18:33:22 +08:00
tgerth
38ab7383f2
Make ApiClient in retrofit2 be able to use own OkHttpClient (#6699)
* set adapterBuilder.client() only if okBuilder was used in retrofit2

* updated the samples

* added field okHttpClient and updated samples

* bug fixed, added exception if okBuilder is null

* added semicolon

* added space, changed Exception to RuntimeException and changed its message

* updated the samples
2020-07-02 15:37:57 +08:00
William Cheng
c6cb7ebe2a
mark python2 support in flask as deprecated (#6653) 2020-07-02 15:16:53 +08:00
William Cheng
520f87abae update samples 2020-07-02 12:00:27 +08:00
Hippolyte HENRY
63c1b1350d
[Java][jersey2] Add a getter for the User-Agent header value (#6831)
* [Java][jersey2] Add a getter for the User-Agent header value

* generate samples
2020-07-02 11:45:30 +08:00
William Cheng
fa97333a5c
[Java] Deprecate feignVersion option (#6824)
* deprecate feign option

* update doc

* udpate samples
2020-07-02 00:12:32 +08:00
Marcel Ramos
8e95298653
[R] Enum R6Class Support, closes #3367 (#5728)
* wip: fix documentation tags

* update model.mustache

* update template for documentation

* update mustache templates

* update mustache templates

* run ./bin/r-petstore and update R pkg docs

* use loadNamespace instead of package:pkgName string

* update R package code

* wip: enum

* update enum function

* use httr::content to unwrap response

* update enum table and functions

* include simplifyVector and auto_unbox arguments

* remove mapping and return strings

* use triple stash values and update enum class methods

* remove extra comma

* minor: formatting

* update and run ./bin/r-petstore.sh

* move helper for template

- export tag does not coincide with original model function
- move helper down so it does

* update tests based on generator

* Revert "update tests based on generator"

This reverts commit b6314c8927a8411561577c0dfd100018947de42e.

* Update tests with engine

- preserve test_petstore.R

* restore apiResponse

* restore simplifyVector to TRUE value

* update api.mustache templates

* fix and add tests to package

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-01 15:48:09 +08:00
Benoît Courtine
fa72c63b62
[Rust][Client] Unify sync/async client structure (#6753)
* Unify sync/async client structure (configuration as first param instead of a struct).

* Fix: Hyper client requires the client.rs file.

Co-authored-by: Henning Holm <git@henningholm.de>

* Add API method comments (description and/or notes when available).

Co-authored-by: Henning Holm <git@henningholm.de>
2020-07-01 15:24:20 +08:00
Yuriy Belenko
6224f5e397
[php-ze-ph] Set required PHP version to ^7.2 (#6763)
* Bump required PHP version to ^7.2

* Update required PHP version in readme

* Change samples input spec to OAS 3.0

* Refresh samples
2020-07-01 15:11:34 +08:00
Jochen Schalanda
d9957ad0a9
[Java][client][native][Gradle] Add missing jackson-databind-nullable (#6802)
* Add missing jackson-databind-nullable to java-native Gradle build

Closes #6801

* Regenerate java-native samples

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-01 15:08:28 +08:00
Kasper Kondzielski
323cd38b5c
Improve sttpOpenApiClient generator (#6684)
Co-authored-by: eugeniyk <keatrance@gmail.com>
2020-06-30 21:14:34 -04:00
Chris Tankersley
d433c2d42f
[php-laravel] Upgrade php-laravel to 7.x (#6346)
* Update laravel from 5.6 to 7.0

* Updated petstore example, removed missing files

* Updated PHP version to match composer.json

* Add samples generation config with OAS3 input spec

* Fixed gitignore compile errors, updated to newest petstore example

* Add composer.lock to .gitignore

* Fix generator gitignore location

* Add integration tests

* Refresh samples

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2020-06-30 12:22:32 +03:00
William Cheng
f05aa8e80d
Prepare 5.0.0-SNAPSHOT (#6812)
* Revert "Prepare 5.0.0-beta release (#6803)"

This reverts commit a77fd443ad9c5fcd85186b76a15abd1b02887576.

* prepare 5.0.0 snapshot

* update non-java-invalid-spec.xml
2020-06-30 01:19:46 +08:00
William Cheng
a77fd443ad
Prepare 5.0.0-beta release (#6803)
* prepare 5.0.0-beta release

* fix java-client pom
2020-06-29 23:06:47 +08:00