1230 Commits

Author SHA1 Message Date
Justin Black
8226269101
Fixes legacyDiscriminatorBehavior description (#8931)
* Fixes description

* Samples and docs updated
2021-03-08 13:39:12 -08:00
Tyler Ballast
f5151de9fc
Add whitespace to SDK documentation where necessary (#8919)
* Add a space between table title and the line above it to resolve issues when translating markdown to asciidoc

* Regenerate Samples

Co-authored-by: Tyler Ballast <tyler.ballast@reportix.com>
Co-authored-by: tballast <tyler.ballast@gmail.com>
2021-03-08 21:40:54 +08:00
William Cheng
7720c9f6bd update samples 2021-03-08 19:05:16 +08:00
Jiri Kuncar
8cb4741248
[go][client] Fix example value for non string enums (#8900)
* [go][client] Fix example value for non string enums

* regenerated samples
2021-03-08 18:11:50 +08:00
Justin Black
101da6e434
Adds getAdditionalPropertiesIsAnyType to java schema classes (#8908)
* Adds getter and setter for AdditionalPropertiesIsAnyType in IJsonSchemaValidationProperties

* Removes venv

* Implements getter and setter in CodegenModel

* Implements getter and setter in CodegenProperty

* Implements getter and setter in CodegenParameter

* Adds getter and setter in CodegenResponse

* Creates setAddProps

* Removes comment

* Adds setAdditionalPropertiesIsAnyType invocations

* Updates samples

* Updates tests in testAdditionalPropertiesPresentInResponses

* Updates tests in testAdditionalPropertiesPresentInParameters

* Updates testAdditionalPropertiesPresentInModelProperties to check getAdditionalPropertiesIsAnyType

* Updates testAdditionalPropertiesPresentInModels
2021-03-07 09:42:47 -08:00
William Cheng
2b3b5a71cf update samples 2021-03-03 16:29:52 +08:00
William Cheng
d96197bcbd Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-03 16:19:20 +08:00
Peter Leibiger
d31875f505
[dart][dart-dio] Fix failing master due to unstable test dependency (#8870)
* replace branch ref with commit ref (new release of http_mock_adapter coming soon)
2021-03-03 13:00:22 +08:00
agilob
83a5c3db1e
[dart] Default value is only available when nullable is not set (#8854)
* Default value is only available when nullable is not set (not false)

* Simplify isNullable mustache syntax
2021-03-02 18:06:45 +08:00
Peter Leibiger
5ce64756a6
[dart][dart-dio] Handle nullable/required header/query parameters (#8837) 2021-03-02 11:09:47 +08:00
Peter Leibiger
2ed702b339
[bug][dart][dart-dio] Improve parameterToString handling (#8372)
* [dart][dart-dio] Improve parameterToString handling

* add tests
* not sure this is complete but it is better than before and can serve as a baseline with the test cases

* Add a map parameter to FormData test

* Rename method to clarify what it actually does

* Couple more tests
2021-03-02 11:08:47 +08:00
Thomas Hervé
3cf93226fa
Make nullable fix on all vars in Go (#8820)
* Make nullable fix on all vars in Go

This applies the Nullable change to all variables on the model, instead
of just the ones in vars.

* Add sample showing the issue
2021-02-27 18:12:51 +08:00
Peter Leibiger
3e9c1e1fc3
[dart] Remove old leftover format parameter from path (#8834) 2021-02-25 20:29:34 +08:00
Peter Leibiger
fbe2bb7c97
[dart][dart-dio] API class/template refactoring (#8825)
* [dart][dart-dio] Refactor API template

* first construct a `RequestOptions` instance with all parameters etc. inline
* then construct and serialize the body data
* then send the request and await the response
* then deserialize the response
* always use the `specifiedType` for built_value (de)serialization instead of a mix of ways (this does the same as finding the serializer directly)
* use indent of 2 spaces (as per Dart convention)
* prefix all local variables to prevent name clashes with parameters

* Add tests that (de)serialize collections and add API key header
2021-02-25 20:24:21 +08:00
agilob
9fc33f6a73
[Dart] Add configuration to add new generators and add json_serializable (#8789)
* Add Dart configuration flag to set new generator

* Change templates to add json_serializable generator

* Fix dart tests

* Add custom serialization for standard generator

* this change opens us a way to allow adding more than 2 generators

* Add sample project for json_serializer

* Use basename for json field name

* Update samples with basename as json key

* Update dart generator docs

* Create AbstractDartCodegen class

* Update docs, dart-dio and dart-jaguar dont get json_serializable yet

* Deduplicate method calls

* Dix dart-dio generation

* Revert formatting change in dart mustache

* Fix formatting changes again

* Improve dart serialization documentation

specify default serializer

* Better name for cli option

* Rename default dart generator to 'native'

* Another attempt to reduce whitespace noise

* Fix api-client and api-helper

* Rename default serialization mode to include word serialization

* Remove trailing whitespace in enums
2021-02-25 17:11:16 +08:00
Adrien CABARBAYE
a31dba5b88
[GO] use latest available oauth2 version (#8764)
* [GO] use latest available oauth2 version

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-25 02:32:49 +08:00
Thomas Hervé
f9b1f98d21
Fix base type naming in Go (#8819)
Go generation didn't properly named base type in `getSchemaType`, which
ends up breaking some doc generation.
2021-02-25 02:31:59 +08:00
Peter Leibiger
4f4f1d4128
[dart][dart-dio] Remove manual json encode/decode calls in API classes (#8812)
* [dart][dart-dio] Remove manual json encode/decode calls in API classes

Dio automatically adds a default transformer which does call `json.encode` and `json.decode` when the content-type is `application/json`. When the content-type is different, then it  is up to the consumer to configure the Dio instance correctly to support custom content-types.

Also tests!!!

* [dart] Constraint test library to < 1.16.0 as it requires Dart 2.12.0

* Fix more constraint problems for the new test project
2021-02-24 23:29:41 +08:00
William Cheng
c653051997
Revert "[Ruby] force users to specify the temp folder path to address security concerns (#8730)" (#8807)
This reverts commit 18a6f5a941f3b5777977693f3b59ac5d200928a8.
2021-02-24 00:31:43 +08:00
Ronny Pfannschmidt
eb3d6d2f16
[python][template] move _path_to_item of simple init to avoid name error (#8737)
* [python][template] move _path_to_item of simple init up so its avaliable for missing default errors

* update generated examples
2021-02-22 21:00:14 -08:00
William Cheng
1b6cabb97d
[Java] use Files.createTempFile instead (#8787)
* use Files.createTempFile

* fix import

* add missing import
2021-02-23 11:40:37 +08:00
William Cheng
e9d4886e70
replace tab with spaces, minor code format change (#8775) 2021-02-21 12:14:52 +08:00
William Cheng
ea428d6048
update jackson dependencies to address security issues (#8778) 2021-02-21 11:40:24 +08:00
William Cheng
ba4aae5074
[Go] bug fix (breaking), minor code format enhancement (#8715)
* go minor code format enhnacement

* fix required vars in the model new

* remove comma
2021-02-20 11:50:27 +08:00
William Cheng
18a6f5a941
[Ruby] force users to specify the temp folder path to address security concerns (#8730)
* address security issue when downloading files in the ruby client

* update samples

* fix double quote
2021-02-20 11:49:10 +08:00
William Cheng
d19bfebeda
replace tabs with 4-space in dart templates (#8740) 2021-02-19 18:02:54 +08:00
Peter Leibiger
c916df9381
[dart][dart-dio] Nullable support/improvements (#8727)
* [dart-dio] Disable nullable fields by default

This is not in line with the OAS and will prevent future Dart nullabilty features (NNBD) from being useful as all types would be optional.
Users can still opt-in for this.

* [dart-dio] Properties are nullable when not required AND not nullable

* [dart][dart-dio] Support nullable/required fields

* properties in built_value need to be nullable when they are nullable in OAS or when they are not required in OAS
* built_value does not support serializing `null` values by default as it is based on a serialization format based on iterables/lists and not maps
* dart-dio uses the built_value json plugin to convert the built_value format to regular json
* by generating a custom serializer for each class we can add support for serializing `null` values if the property is required AND nullable in OAS
* this is a breaking change as not all properties in the models are nullable by default anymore

* Implement required/nullable for dart

* Changes for set types and enum names after rebase

* Add some comments and fix built_value fields with default being nullable

* More rebase changes and regenerate docs
2021-02-17 21:44:21 +08:00
Peter Leibiger
7704ff3d08
[dart][dart-dio] Allow API key authentication with multiple API keys (#8728)
Remove the break stopping after the first key.
2021-02-17 21:40:27 +08:00
Oleh Kurpiak
135c8f45a4
[Java][native] extend native ApiClient (#8557) 2021-02-16 21:47:44 +08:00
Peter Leibiger
683dcb8889
[dart][dart-dio] Raise min Dart to 2.7.0 & update built_value constraint (#8684)
* raise min Dart version to 2.7.0 / Flutter 1.12.0
* update constraints for built_value to support new major versions with null safety
2021-02-16 18:00:59 +08:00
Peter Leibiger
608242b4d8
[dart][dart-dio] Improve prefixing of inner enums with classname (#8685)
* [dart][dart-dio] Improve prefixing of inner enums with classname

* prevent further name conflicts by correctly naming the enum, until now there could potentially occur conflicts e.g. 2x `MapTestInnerEnum` by renaming the `items` child property
* correctly set `enumName` to match `datatypeWithEnum`

* Unrelated test regeneration
2021-02-16 17:59:54 +08:00
William Cheng
53285e5aa5 update samples 2021-02-16 08:15:04 +08:00
David Hontecillas
51c8fd1520
Fix generated go client cannot upload file (#8393)
* go client send **io.File body

* run generate-samples for Go upload fix
2021-02-16 08:08:27 +08:00
Moshe Elisha
90e8dcf3e3
[JAVA][native] - Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed (#8554)
* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 56e2b1fb

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 335c304d

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed
2021-02-12 23:02:13 +08:00
William Cheng
b4f4d7434b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-02-12 18:48:20 +08:00
miyucy
3c4b1a0c4c
Fix syntax error (#8675)
Added missing closing brace in list_invalid_properties model method.
2021-02-11 23:43:19 +08:00
Reinhard-PTV
6fdd8ea3da
Fixed serialization of date-time query parameters. (#8616) 2021-02-08 23:03:29 +08:00
Reinhard-PTV
df107e2244
Do not use context timezone. (#8614) 2021-02-08 19:25:58 +08:00
William Cheng
3e81876e2c Merge remote-tracking branch 'origin/master' into 5.1.x 2021-02-06 17:52:32 +08:00
William Cheng
c7fcb39a2d
Prepare v5.0.1 release (#8627)
* release 5.0.1

* update samples
2021-02-06 16:37:22 +08:00
William Cheng
21d7330aea update samples 2021-02-06 14:55:43 +08:00
Žilvinas Urbonas
90e25f6f4c
[BUG][Python] init access token for python client configuration (#7469)
* fix: init access token for python client configuration

* fix: remove duplicate initializations for access_token
2021-02-05 13:09:53 -08:00
Aanisha Mishra
d869544ce1
[Go][Client] Secret key content string in http signing support (#8570)
* accept private key content string

* sample update

* Add comments to new methods

* update samples with comments

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>

* Update signing.mustache

* update sample comments

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* update empty checks for privateKey

Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>
Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2021-02-04 10:33:17 +08:00
Bruno Coelho
45fc02350b
[kotlin] fix Date types usages (#8594)
* [kotlin] fix Date types usages
2021-02-02 20:55:51 -05:00
William Cheng
2c457a458e Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-02-02 21:43:53 +08:00
William Cheng
5b99d8724c Merge remote-tracking branch 'origin/master' into 5.1.x 2021-02-02 21:04:15 +08:00
Peter Leibiger
1b440e191c
[dart-dio] Improve API & API-Client field initialization (#8589) 2021-02-02 18:46:51 +08:00
Peter Leibiger
769b0e0e38
[feature][dart] Add support for uniqueItems/sets (#8375)
* [dart][dart-dio] Add support for set types

* copy `uniqueItems` usage from 2.0 fake spec to `3.0`
* add support for sets in parameters, responses and properties

* Regenerate all other samples

* Fix broken tests due to invalid cast

* Update documentation

* Regenerate samples

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-02 18:42:45 +08:00
Peter Leibiger
26f21bb6a0
[dart-dio] Add missing isRedirect parameter to response (#8588) 2021-02-01 22:29:20 +08:00
Peter Leibiger
5135967c91
[dart] Fix typo added in 57126a19 (#8581) 2021-01-30 11:32:33 +08:00