1230 Commits

Author SHA1 Message Date
adpoliak
a4312412fc
[PYTHON] use customized default Configuration() objects if configured by the programmer (#8500) 2021-01-29 16:24:10 -08:00
Oleh Kurpiak
f0b9e21b6b
[Java] fix generation for JavaTimeFormatter (#8348)
* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter
2021-01-29 11:22:37 +08:00
NANASHI0X74
57126a1900
Add getters for private default Headers and authentications (#8509)
* add getters for default headermap and auths

* regenerate samples, make shebangs portable

* Revert making shebangs portable

This reverts commit ec60f603598abf0f57dfdb6ca55b4d5c1ee25edf.

Co-authored-by: nanashi0x74 <rian.lindenberger@mpq.se>
2021-01-29 10:58:07 +08:00
Justin Black
2553d056dc
Removes nulltype from python, updates samples (#8555)
* Removes nulltype from python, updates samples

* Removes nulltype from the python requirements

* Removes nulltype import in models, moves requiredVars to optionalVars when approprieate
2021-01-28 09:30:36 -08:00
William Cheng
694b10e41c Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-28 16:47:55 +08:00
William Cheng
d97717ee24 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-28 15:52:44 +08:00
William Cheng
7654356df2
Migrate elixir samples to use OAS v3 (#8538)
* use 3.0 spec for testing

* add new files

* add 200 responses

* update samples, better code format for jaxrs
2021-01-27 11:14:58 +08:00
William Cheng
84813be309
remove supportJava6 option (#8514) 2021-01-26 10:27:09 +08:00
Peter Leibiger
201acbd3de
[dart] Fix switch on enums not possible (#8512)
All enum instances are `const` so `equals/hashCode` is not needed.
Removing this allows to `switch/case` on enum instances.
2021-01-25 18:31:19 +08:00
Kuzma
57227e510f
Remove servers urls with trailing slash (#7940)
* remove trailing slash

* update sample app

* added tests

* bug fix

* Adds test in DefaultGeneratorTest

* Reverts python files

* Does not modify a value of /

* Stops skipping / use case

* update samples

Co-authored-by: Justin Black <justin.a.black@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-25 13:32:39 +08:00
Christophe Bornet
06ad7a51ef
[Kotlin-Spring] Fix properties default value (#8373)
* [Kotlin-Spring] Fix properties default value

* Fix kotlin enum default

* Update go sample
2021-01-24 22:43:58 +08:00
SBNTT
96da7aaf9d
--http-user-agent arg support in dart generator (#8508)
* add User-Agent header

* set User-Agent header only if httpUserAgent is defined

* add User-Agent header in dart-dio generator

* update samples
2021-01-23 10:39:21 +08:00
Peter Leibiger
90ed1290fa
[dart][dart-dio] Improve form param handling, respect required flag (#8369)
* [dart-dio] Improve form param handling, respect required flag

* simplify template
* respect required flag (only null check when not rquired)
* minor formatting

* Add additional nullable check
2021-01-22 17:58:27 +08:00
William Cheng
52065cc1c5 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-18 12:40:31 +08:00
William Cheng
53a5bfecfd Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-18 11:33:57 +08:00
Johannes Wienke
cd2a0db1ce
Fix counting for large API solutions in generated Python README (#8403)
* Fix counting for large API solutions

Let 2 follow 1.

* Update Python samples with new readme
2021-01-15 13:51:12 -08:00
Justin Black
c4dbd2cfa3
[python] Fixes file upload + download, adds tests (#8437)
* Adds tests for file upload and files upload

* Adds test_download_attachment

* Fixes test_upload_file

* Adds download_attachment endpoint

* Adds test_download_attachment

* Updates assert_request_called_with signature

* Samples regen

* Adds upload download file spec route and sample gen

* Fixes file upload for application/octet-stream, writes test_upload_download_file

* Changes if into elif

* Improves python code in api_client
2021-01-15 13:27:33 -08:00
Toby Murray
99144252f7
Migrate off deprecate Gradle configurations (#8436)
A bunch of gradle configurations have been deprecated, with drop in replacements. Relevant to this project:

compile -> implementation
testCompile -> testImplementation

They're visible by executing e.g. ./gradlew build --warning-mode all with supporting documentation here: https://docs.gradle.org/6.6.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
2021-01-15 22:32:50 +08:00
William Cheng
e2ad6dbc1b
[Go] Fix response body (#8439)
* fix go response body

* add missing import
2021-01-14 23:32:19 +08:00
William Cheng
22ac8faec7
Revert "[GO][Client] return GenericOpenAPIError instead of error in Execute() (#8137)" (#8427)
This reverts commit 1562afea3980484a7f1819c4f51b0d53a44a009f.
2021-01-14 13:59:21 +08:00
Ronny Pfannschmidt
6b6d1b1a97
[python] fix #8404: avoid shadowing the name Endpoint (#8405)
if a type was named Endpoint, its import for use in the api would shadow
the name Endpoint for the internal utility
2021-01-13 08:38:41 -08:00
Justin Black
ce893a84ff
Fixes object serialization when there is an inline array property which contains a refed enum (#8387)
* Fixes object inline enum defintion with refed enum item

* Adds refed array model example w/ serialization + deserialization
2021-01-08 13:15:55 -08:00
William Cheng
64ae0eed04 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-09 00:15:53 +08:00
William Cheng
18bec1da28 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-08 21:06:47 +08:00
Peter Leibiger
2ba0e03629
[dart-dio] Fix serialization of map body params (#8367) 2021-01-07 22:30:16 +08:00
Peter Leibiger
02473d8175
[dart] Cleanup, remove leftover inline objects/docs and regnerate tests (#8362) 2021-01-07 22:29:32 +08:00
Peter Leibiger
c43234711a
[dart-dio] Generate the correct serializers (#8357)
* only generate actually used serializers (anything used in body or response)
* generate previously missing serializers for collection types
* improve formatting
2021-01-07 22:28:37 +08:00
Peter Leibiger
fc22de0522
[dart-dio] Fix failing integration tests (#8335)
This happened due to the merge of #6384 where implicit-dynamics were still allowed.
2021-01-05 22:08:55 +08:00
Hippolyte HENRY
a9c168c400
[ruby] Support aliasing of API keys (#8124)
* Allow aliasing of auth keys

* update sample and add config for feature

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-05 20:04:08 +08:00
Peter Leibiger
0c4a928ebc
[dart][dart-dio] Enable strong-mode and strict types (#8231)
* [dart-dio] Enable strong-mode and strict types

This will make it easier to eventually transition to NNBD. Also fix some formatting things.

* [dart-dio] Add implicit-casts: false to analysis options

* [dart-dio] Add dartanalyzer to integration tests

* raise minimum Dart version to 2.6 (to support spread collection)
* add header to all files for language version
* fix some missing imports that can be fixed (some remain due to missing inheritance support)
2021-01-05 09:43:17 +08:00
Josh Burton
604ac6d90f
[dart-dio] Serializes request bodies using a specific serializer so a… (#6384)
* Updates samples

* Handles primitive types
2021-01-05 09:40:32 +08:00
Nicholas Muesch
00d56375b0
Use Map interface for configureApiKeys (#7982) 2021-01-04 10:54:01 +08:00
Tomofumi Chiba
9889e5dfba
[typescript(experimental)] fix for Deno v1.6 (#8265)
* fix for Deno 1.6

* update dependency version of Deno test code
2020-12-28 13:57:00 +01:00
William Cheng
25b0cbe2f1
Prepare 5.0.1 snapshot (#8249)
* update version to 5.0.1-SNAPSHOT

* update samples

* update meta codegen
2020-12-21 17:14:18 +08:00
William Cheng
4261252491 prepare 6.0.0 snapshot release 2020-12-21 16:39:40 +08:00
William Cheng
345b68a107 prepare 5.1.0 snapshot release 2020-12-21 16:35:12 +08:00
William Cheng
d7d5e53f2b
Prepare v5.0.0 release (#8247)
* update to 5.0.0

* update samples
2020-12-21 13:04:11 +08:00
Arthur Mogliev
206f698a98
[php-ze-ph][php-mezzio-ph] Migration from Zend to Laminas and corresponding generator rename (#8145)
* Migration from php-ze-ph to php-mezzio-ph

* Sample regen after rebase

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-20 21:48:37 +08:00
William Cheng
0be3fe6104
Set skipFormModel to true by default (#8125)
* set skipFormModel to true by default

* update tests

* regenerate ruby faraday client

* remove inline object spec files

* more clean up on inline object files

* update samples
2020-12-18 23:57:19 +08:00
Aanisha Mishra
f766735d5c
[Python][Client] Python model directory init missing (#8215)
* include model and api dir init mustaches

* update examples

* remove unwanted changes

* revert unwanted changes in sample

Co-authored-by: aani <aani>
2020-12-18 10:13:35 +08:00
Peter Leibiger
a5377647f4
[dart][dart-dio] Add support for default values (#8201)
* [dart-dio] Generate default value builders

* return `null` when there is no default value instead of `"null"`
* use built_value's `_initializeBuilder` to set default values

* [dart-dio] Fix default value formatting in model doc
2020-12-17 17:50:36 +08:00
Aanisha Mishra
1562afea39
[GO][Client] return GenericOpenAPIError instead of error in Execute() (#8137)
* error to GenericOpenAPIError

* reformatted files

* reformat files

* spaces to tabs

* update petstore examples

* remove extra brackets

* update sample generation

* update go test cases

* update openapi3 go tests

* edit test samples

* update documentation
2020-12-17 16:39:43 +08:00
Peter Leibiger
96e6bc4650
[dart-dio] Allow dynamic headers and add additional dio parameters (#8191)
* fixes some compile errors due to header params not being of type `String`
* add optional `extra` and `validateStatus` parameters from dio
2020-12-16 23:24:09 +08:00
Peter Leibiger
e1c43f1356
[dart][dart-dio] Prevent name clashes with existing dart types (#8198)
* [dart][dart-dio] Prevent name clashes with existing dart types

Can not use dart import aliases for now as this is not supported by built_value. This means we need to add potentially clashing names/classes to an `additionalReservedWords` exclusion list. Starting with a basic list of some http/io classes.

Correctly use `importMapping` and `defaultIncludes` this time around. Improve reserved word checking.

This now successfully generates `ModelList`, `ModelFile` and `ModelClient` models which previously were not generated at all or were wrong types.

* Address review comment

* Update generator docs
2020-12-16 17:25:20 +08:00
Tomas Sykora, jr
180fae02cd
[DART-DIO] [GENERATOR] Make header params with dynamic types (#6915)
* Make header params with dynamic types

Otherwise this will generate code which is not compile-able. Like this:

```dart
        Future<Response<List<StockItemProjectionDirect>>>getAllStockItems(Store storeId,{ int xXChunkNumber,int xXChunkSize,StockItemRequestFilterDto stockItemRequestFilterDto,CancelToken cancelToken, Map<String, String> headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async {

        String _path = "/api/store/{storeId}/stock".replaceAll("{" r'storeId' "}", storeId.toString());

        Map<String, dynamic> queryParams = {};
        Map<String, String> headerParams = Map.from(headers ?? {});
        dynamic bodyData;

        headerParams[r'XX-Chunk-Number'] = xXChunkNumber;
        headerParams[r'XX-Chunk-Size'] = xXChunkSize;
```

See how the func recieves int argument which then assignes into a string... last 2 lines

* FIX: Dynamic header and sync with upstream

* DART-DIO new samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-16 17:13:50 +08:00
Robert Parini
a4f84b2f8c
[Python][Client] Default to system CA instead of certifi (#8108)
* Use system CA by default and remove certifi

See https://github.com/OpenAPITools/openapi-generator/issues/6506

* Use system CA by default in asyncio client

* Update README_onlypackage.mustache

* Result of ./bin/generate-samples.sh

* Add ssl_ca_cert argument for Configuration

* Result of ./bin/generate-samples.sh

* Remove certifi, use system CA by default
2020-12-15 16:36:35 -08:00
Thomas Hervé
952cd9c689
Include description directly in python docstrings (#8154)
* Include description directly in python docstrings

mustache escaping the description make them render weirdly, including
sometimes unsupported characters in python.

* More parameters
2020-12-15 09:30:50 -08:00
Peter Leibiger
ddd11abb87
[dart][dart-dio] Correctly type responses and futures (#8195)
* don't rely on implicit dynamics
* this is a requirement for NNBD
* add space between return type and some method names
2020-12-16 00:52:47 +08:00
Hippolyte HENRY
81a5e44a6c
[ruby] Improve ruby client examples (#8040)
* [ruby] Improve ruby client examples

* samples

* quote fixes

* Keep enum value

* better string type handling

* fix failing tests

* add space after comment

* update samples

* use Time

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-16 00:10:04 +08:00
Peter Leibiger
70e86a0840
[dart] Fix enums with default value (#8182)
* simplify template expression
2020-12-15 09:56:35 +08:00