267 Commits

Author SHA1 Message Date
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
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
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
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
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
Nicholas Muesch
00d56375b0
Use Map interface for configureApiKeys (#7982) 2021-01-04 10:54:01 +08: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
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
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
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
fbl100
99d83712a8
Fixes issue #8014, _check_type flag not being honored. (#8053)
* Fixes issue 8014, _check_type flag not being honored.

Updated model_utils.mustache to pass the check_type flag into attempt_convert_item(). Failure to do so
results in type validation errors occurring when the user has specifically requested that they be disabled.

* regenerated samples

Co-authored-by: Frank Levine <frank.levine@blacklynx.tech>
2020-12-07 12:18:16 -08:00
Ülgen Sarıkavak
e00ac502f1
[python] Update python versions (#8042)
* Remove redundant encoding definitions

UTF-8 is already the default encoding in Python 3.

* Remove Python3.4 related requirements

* Remove dead Python version 3.5

* Add Python 3.9 to CI and test configs

* Update petstore example
2020-12-07 12:07:35 -08:00
itaru2622
35d616c9af
Fix bug [python][client] generated python client code cannot POST object in multipart/form-data (#8075)
* encode object in json and add content-type:application/json for multipart/form-data

fix issue https://github.com/OpenAPITools/openapi-generator/issues/8068

* update samples by ./bin/generate-samples.sh

* non-ascii chars supported in encoding object to json, and add "content-type:application/json; charset=utf-8"

* update samples again, by ./bin/generate-samples.sh

* update comment(docstring) in parameters_to_multipart according to the discussion in PR review.

* fix default value in parameters_to_multipart function as described in PR review comment.

* update samples again, by ./bin/generate-samples.sh
2020-12-07 09:50:09 -08:00
Toby Murray
cbe1fd9728
Bump Gradle in generated Java projects to 6.7.1 (#8079)
* Bump Gradle in Java projects from 6.0.1 to 6.7.1

Regular maintenance, 6.0.1 was released November 18th, 2019 and the latest release (November 16th, 2020) is 6.7.1. This updates all the wrapper templatesto the latest version.

* Updated generated Java samples

Generated via `./bin/generate-samples.sh bin/configs/java-*`

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-07 10:44:23 +08:00
Sergey
13f1c610d9
[python] Re-merge Subclass Python exceptions (#7321) (#8095)
* Subclass Python exceptions (#7321)

* Subclass Python exceptions:
- UnauthorizedException (401)
- ForbiddenException (403)
- NotFoundException (404)
- ServiceException [500 - 599]

Fixes #2151

* add generated sample code

* use Python 2 flavor inheritance

* regenerate samples

* update samples

Co-authored-by: Ryan Rishi <ryan@ryanrishi.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-05 12:02:00 -08:00
fuxs
38dbcdd752
[Go] Fixes missing return statement (#8072) (#8090) 2020-12-05 18:24:22 +08:00
William Cheng
2578ef5e63
Prepare snapshot (v5.0.0) (#7986)
* Revert "prepare 5.0.0-beta3 release"

This reverts commit 3ebe774df37b43348bac1310a272de53a2d7040b.

* revert to snapshot

* update samples
2020-11-20 19:19:59 +08:00
William Cheng
2715f1371a
Prepare 5.0.0 beta3 (#7984)
* prepare 5.0.0-beta3 release

* update samples

* remove beta3 from readme
2020-11-20 15:18:58 +08:00
William Cheng
3bf8ca7484
[python] Renames python generators (#7965)
* python->python-legacy, python-experimental->python

* test with openjdk8

* test with openjdk11

* comment out rm

* move kotlin tests to circleci

* move kotlin tests

* move tests to circleci

* fix circleci

* rearrange test

* move tests

* use wrapper

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2020-11-18 14:34:00 +08:00
Nicholas Muesch
eceac6a63c
Skip validation if input_value is None (#7845) 2020-11-08 12:27:58 -08:00
Steve B
ea2cdd23c2
[python] add socket_options to configuration for the rest client (#7795)
* [python] add socket_options to configuration for the rest client

* (python-experimental) add socket_options to configuration for the rest client

This mirrors work done on the python generator

* (python-experimental) add test to cover socket_options is passed on from configuration

Co-authored-by: steve brazier <steve.brazier@trioptima.com>
2020-10-27 18:22:28 -07:00
Maksym Melnychok
b70edd7f1b
[python] Add option to return None instead of raising exception when accessing unset attribute (#7784)
* add option to return None instead of raising exception when accessing unset attribute

* update python samples

* reimplement getattr using getitem or get depending on attrNoneIfUnset

* move getattr and setattr to respective templates

* update docstrings, def get/setattr methods to have docstrings in them, use __dict__ to avoid recursion issues

* revert required_properties change

* add manual tests for .get method
2020-10-25 09:13:22 -07:00
William Cheng
d6c71ff0fb
[java][jersey2] add proxy support (#7752)
* add client config getter and setter

* update gradle, sbt config

* update client config

* update samples

* add code sample to set proxy
2020-10-20 10:11:01 +08:00
William Cheng
b733312707
update doc to include proxy instruction (#7749) 2020-10-19 22:14:34 +08:00
William Cheng
6046c3da94
remove github.com/antihax/optional from go.sum (#7692) 2020-10-14 10:11:05 +08:00
William Cheng
b768e42704
Update junit to newer version (4.13.1) (#7690)
* update junit to newer version

* update junit to newer version
2020-10-14 10:10:32 +08:00
William Cheng
931c4e361f update samples 2020-10-10 17:10:32 +08:00
Maksym Melnychok
8416fff568
[python-experimental] implement in operator for model classes (#7637)
* implement  operator for model classes

* refresh samples
2020-10-09 10:38:15 -07:00
William Cheng
fe31b9e2ce
java jersey2: remove trailing whitespaces (#7632) 2020-10-09 17:11:23 +08:00
Hippolyte HENRY
9ba943318a
[go][client] Fix API docs example generation (#7489)
* [go][client] Fix API docs example

* Generate samples
2020-09-25 14:45:18 +08:00
William Cheng
596bbb9c58
Add option to set recursion limit (#7491)
* add option to set recursion limit

* fix test failure

* update doc

* add tests

* add missing import

* rename option to recursionLimit
2020-09-24 11:47:22 -07:00
William Cheng
8c78f13a41
remove hardcoded PetApi (#7483) 2020-09-22 11:45:29 -07:00
Nicholas Muesch
32c591d9a7
Support multiple api keys in python example documentation (#7417)
* Support multiple api keys in config option

* Regenerate samples

* Update rest of examples
2020-09-15 13:40:48 -07:00
William Cheng
8fad36c898
[Go] minor format change, deprecate "withGoCodegenComment" option (#7375)
* use tab in comment, remove withGoCodegenComment

* deprecated option
2020-09-12 22:05:10 +08:00
William Cheng
2fd23f505e
Prepare 5.0.0-SNAPSHOT (#7347)
* Revert "Prepare 5.0.0-beta2 release (#7345)"

This reverts commit 212b4f784742744b7b238607dcefb23ec9db64d7.

* update readme
2020-09-04 15:31:54 +08:00