1230 Commits

Author SHA1 Message Date
Tomasz Prus
ca848871da
[Python] Add missing Mock library for Python 2.7. (#10939)
* [Python] Add missing Mock library for Python 2.7.

* Update template for test-requirements.txt.
2021-11-24 15:54:25 +08:00
Tomasz Prus
e9f2ccde67
[Python] Add option to select content-type using body or force it for… (#10686)
* [Python] Add option to select content-type using body or force it for API call

* Add support for application/json-patch+json

* Add unittests.
2021-11-22 08:41:04 -08:00
Ian Cubbon
6779c33b9d
[GO][Client] Multipart/form-data Request Support More Than One File (#10843)
* Instead of limiting a request to a single file when
performing an upload, use a slice of files so an
arbitrary number of files can be used in the form.

* Remove commented out line of code

* Update examples for multi-form file fix for multiple files

* Convert spaces to tabs for indentation

* Updated examples to have tabs instead of spaces

* Add an example of a multipart/form-data OA3 schema
that contains two files to be uploaded
2021-11-22 16:27:43 +08:00
WILLIAM CHENG
eb75515715 Merge branch '5.4.x' into 6.0.x 2021-11-21 09:50:47 +08:00
WILLIAM CHENG
78fe5dc427 Merge remote-tracking branch 'origin/master' into 5.4.x 2021-11-21 09:43:21 +08:00
Oleh Kurpiak
e7c3bdacc2
[Java] fix deserialization of readonly properties (#10113)
* [Java] fix deserialization of readonly properties

* [Java] fix deserialization of readonly properties

* [Java] fix deserialization of readonly properties

* [Java] fix deserialization of readonly properties
2021-11-14 22:05:25 +08:00
Andrew
d91ff3a150
[GO] dont canonize headers (#10779)
* [GO]: dont canonize headers

* [GO]: update unit tests
2021-11-14 10:36:49 +08:00
William Cheng
bd1a6471b6
[java][Jersey2] add spotless maven, gradle plugins (#10796)
* add bunker-holding logo

* add spotless plugin to jersey2 java client

* add spotless plugin to java jersey2 client

* use jdk11 in gradle tests

* fix gradle test local spec

* setup java 11

* skip spotless in check task
2021-11-06 18:11:58 +08:00
WILLIAM CHENG
29be352deb Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-11-02 12:59:35 +08:00
WILLIAM CHENG
025e560985 Merge remote-tracking branch 'origin/master' into 5.4.x 2021-11-02 12:51:52 +08:00
William Cheng
48f81eef45
use IllegalArgumentException instead (#10745) 2021-11-02 12:47:15 +08:00
Justin Black
7559b53370
Feat adds python AnyOf send and receive example (#10754)
* Samples regenerated

* Adds AnyOf tx/rx example to python

* Updates samples
2021-11-01 12:15:45 -07:00
WILLIAM CHENG
4f2b5ee36d Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-11-01 00:54:44 +08:00
WILLIAM CHENG
ab603a7322 Merge remote-tracking branch 'origin/master' into 5.4.x 2021-11-01 00:49:06 +08:00
William Cheng
8551b0af49
[java][jersey2] remove warning using JsonMapper.builder (#10734)
* remove warning usign JsonMapper.builder

* add back java8 tag
2021-10-30 16:55:33 +08:00
William Cheng
c3740dd647
update scribejava to 8.x (#10733) 2021-10-30 14:42:48 +08:00
William Cheng
d75683aeae
[java][jersey2] update plugins in pom.xml (#10710)
* update jersey2 plugin

* remove jar
2021-10-29 12:36:40 +08:00
Martin Visser
59d5851797
Fix library generation compatibility with Gradle 7.2 (#10716)
* Make Java libraries compatible with Gradle 7

* Make kotlin-spring compatible with Gradle 7

* Update samples to comply to Gradle 7.2

* Generate samples
2021-10-29 12:36:12 +08:00
Peter Leibiger
f1ab3edbc0
[dart] Fix pub server URL (#10695)
* replace private pub server with official pub server URL
2021-10-27 00:33:58 +08:00
itaru2622
97e079fde0
add no_proxy support to python client (#10648)
* add no_proxy support to python client

* add unittest for no_proxy supporting, python client

* update samples for no_proxy supporting, python client

* fix input parameter in samples/openapi3/.../tests_manual/test_extra_pool_config_options.py

* re-implement no_proxy support to python client according to PR conversation #10648

* re-update samples for no_proxy supporting, python client
2021-10-26 10:12:42 +02:00
WILLIAM CHENG
3594b3452d Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-10-25 13:31:12 +08:00
WILLIAM CHENG
42f4e863b7 prepare 5.4.0-SNAPSHOT 2021-10-25 12:13:33 +08:00
William Cheng
378465702c
Prepare v5.3.1 in the master (#10681)
* prepare v5.3.1

* update doc

* update readme
2021-10-25 01:16:07 +08:00
William Cheng
ec2ed98269
better comment/docstrings in jersey2 apiclient (#10668) 2021-10-24 12:19:20 +08:00
William Cheng
bb37a71d06
update dependencies in build.sbt to newer versions (#10667) 2021-10-23 16:17:46 +08:00
WILLIAM CHENG
afacdb229a Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-23 10:16:27 +08:00
William Cheng
885a813f86
update java jersey2 dependencies (#10659) 2021-10-23 10:13:39 +08:00
Tomasz Prus
b1950dd488
[Python] Remove virtualenv deprecated option from test scripts. (#10666)
* [Python] Remove virtualenv deprecated option from test scripts.

* [Python/asyncio] create venv with Python 3.x
2021-10-22 17:32:44 -07:00
Jordan M. Adler
e7dace6099
[typescript] Add headers to ApiException (#10153) 2021-10-22 08:50:03 +02:00
William Cheng
681578d1b5
rename enum constants (#10631) 2021-10-22 09:26:48 +08:00
William Cheng
730636ad31 Merge remote-tracking branch 'origin' into 6.0.x 2021-10-19 12:55:59 +08:00
William Cheng
2bd2c23115
Revert "[JAVA][jersey2] import the auto generated supporting JSON class only when discriminator is needed (#10557)" (#10597)
This reverts commit 52713b21d452bcc4219793861443b495d2a03213.
2021-10-14 11:41:19 +08:00
agilob
77b72bd0ee
Dart json_serializable: remove experimental generator (#10532) 2021-10-12 16:07:23 +08:00
beytun
52713b21d4
[JAVA][jersey2] import the auto generated supporting JSON class only when discriminator is needed (#10557)
* Import the auto generated supporting JSON class only when discriminator is needed

* Generate samples again
2021-10-12 16:05:38 +08:00
William Cheng
4b62b55877
use implementation, add min version of maven, gradle (#10571) 2021-10-11 21:10:04 +08:00
William Cheng
96c65fea61
[Java] add an option to customize gradle.properties (#10540)
* add an option to customize gradle properties

* add more info to gradle.properties
2021-10-08 11:20:50 +08:00
William Cheng
6c5f6d2400
[java] Update Gradle to 7.2 (#10538)
* update gradle to 7.2

* update samples

* use gradle-7.2-bin.zip instead
2021-10-08 10:48:27 +08:00
William Cheng
59ddcc31ab update samples 2021-10-06 12:13:24 +08:00
William Cheng
0bfa28f844 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-06 12:00:02 +08:00
Bodo Graumann
9aadd7724c
Add message and more context to RequiredError (#10530) 2021-10-05 12:41:49 +02:00
Josh Burton
f5e8f54b21
[dart-dio-next] Adds an option for using the dio_http package (#10497)
* [dart-dio] Adds an option for using the dio_http package

Relates to #10305

* [dart-dio-next] Generates new dio_http sample

* [dart-dio-next] renames dio_http sample, adds pom.xml

* [dart-dio-next] Removes executions not required
2021-10-05 14:03:48 +08:00
RomainPruvostMHH
1735ab9d27
[Java] Replace Java EE 8 dependencies by Jakarta EE 8 (#10513)
* Migrate javax.annotation:javax.annotation-api to
jakarta.annotation:jakarta.annotation-api:1.3.5

* Migrate javax.annotation:javax.annotation-api to
jakarta.annotation:jakarta.annotation-api:1.3.5 for sbt

* Migrate javax.annotation:javax.annotation-api to
jakarta.annotation:jakarta.annotation-api:1.3.5 for gradle

* Commit samples files after the execution of the command
"generate-samples.sh for configs java and kotlin

* Delete org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec
from the exclusion section of org.jboss.resteasy:resteasy-client in the
resteasy module because jboss-annotations-api_1.2_spec isn't a
transitive dependency

* Migrate javax.validation:validation-api to
jakarta.validation:jakarta.validation-api:2.0.2 for maven

* Migrate javax.validation:validation-api to
jakarta.validation:jakarta.validation-api:2.0.2 for gradle

* Migrate javax.validation:validation-api to
jakarta.validation:jakarta.validation-api:2.0.2 for sbt

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.ws.rs:javax.ws.rs-api to
jakarta.ws.rs:jakarta.ws.rs-api:2.1.6 for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.json.bind:javax.json.bind-api to
jakarta.json.bind:jakarta.json.bind-api:1.0.2 for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.json:javax.json-api to jakarta.json:jakarta.json-api:1.1.6
for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.xml.bind:jaxb-api to
jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.el:el-api to jakarta.el:jakarta.el-api:3.0.3 for maven

* Migrate javax.servlet:servlet-api to
jakarta.servlet:jakarta.servlet-api:4.0.4 for maven

* Delete the property servlet-api-version in pom files because it is
useless

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.activation:activation to
jakarta.activation:jakarta.activation-api:1.2.2 for maven

* Delete javax.activation:activation from the exclusion section of
org.jboss.resteasy:resteasy-client in the resteasy module because
javax.activation:activation isn't a transitive dependency

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Fix the name of property jakarta.activation-version

* Fix a missing property 'jakarta-annotation-version' in
JavaJaxRS/resteasy/pom.mustache

* generate samples

* Fix version value of jakarta.validation-api artifact in
Java/libraries/rest-assured/pom.mustache

* Fix missing property jakarta-annotation-version in
jaxrs-resteasy/eap/pom.mustache

* generate samples

* Revert changes in sample files after running the command
generate-samples.sh in gitBash

* Fix files in
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8

* Replace the old dependency javax.validation:validation-api by the new
Jakarta EE 8 jakarta.validation:jakarta.validation-api in
openapi-generator-online

Co-authored-by: rpruvost <rpruvost@ITEM-S78402.emea.msad.sopra>
Co-authored-by: rpruvost <romain.pruvost@soprasteria.com>
2021-10-05 09:47:29 +08:00
John Gallagher
2ceccfbe3c
[REQ] [RUBY] [FARADAY] Allow middleware to be configured (#10495)
* feat: allow configuring middleware in setup

* fix: stop requiring Faraday middleware unnecessarily

* chore: regenerate petstore samples

* chore: regenerate openapi3 client

* chore: ci fails so rebuild
2021-10-04 17:09:21 +08:00
William Cheng
8602fbc87c update ruby samples 2021-10-02 13:10:13 +08:00
Justin Black
638a2faa3d
Updated model generation, addProps handling moved into type object and anyType handling (#10505)
* Updates fromModel helpers

* Samples regenerated

* updateModelForComposedSchema made protected so it can be overridden
2021-10-01 13:09:32 -07:00
Justin Black
d4b8ff60a1
[Java] Fixes schema class type booleans for composed schemas (#10334)
* Adds get/setIsString interface to IJsonSchemaValidationProperties

* Adds get/set isNumber interface in IJsonSchemaValidationProperties

* Adds get/set isAnyType in IJsonSchemaValidationProperties

* Adds and uses ModelUtils.isAnyType, adds setTypeProperties

* Adds missing descriptions of isAnyType parameters

* Uses ModelUtils.isAnyType

* Samples regenerated

* Moves isArray handling higher up in fromProperty

* Moves isAnyTypeSchema handling higher up in fromProperty

* Moves isFreeFormObject handling higher up in fromProperty

* Refactors fromProperties, updates tests

* Fixes the fromProperty refactor, tests now pass

* Uses setTypeProperties to set isNumber, isNull, isArray, and isUnboundedInteger

* Sets isAnyType in setTypeProperties

* Sets isMap in setTypeProperties

* Sets property.isPrimitiveType in isFreeFormObject, tweaks if condition order

* Adds fix for JavaClientCodegenTest.testJdkHttpClientWithAndWithoutDiscriminator

* Refactors fromProperty

* Adds updatePropertyForObject updatePropertyForAnyType

* Sets binary and file types to not be strings

* Updates samples

* Adds updatePropertyForString

* Adds testComposedPropertyTypes

* Fixes python test

* Samples updated

* Switches all isAnyTypeSchema usages to ModelUtils.isAnyType

* Refactors model enum handling higher up

* Moves m.dataType assignent higher into fromModel

* Moves m.isNullable setting higher into isModel

* Adds updateModelForComposedSchema

* Further fromModel refactoring, all schema checks are now at the same indentation level

* Further refactors fromModel, adds isTypeObjectSchema block

* Moves addVars into anyType or objectType blocks in fromModel

* Turns off isNullable n isAnyType array

* Fixes typescript CodegenParameers

* Adds updatePropertyForAnyType to typescript-axios so property.isNullable will be false for AnyType

* Adds testComposedModelTypes

* Updates ComposedAnyType schema

* Fixes tests for JavaJAXRSCXF by adding updateModelForObject method

* Updates go and csharp to handle object model differently

* Adds updateModelForAnyType

* Fixes name reference

* Adds testComposedResponseTypes

* Refactoring fromResponse

* Further refactoring of fromResponse

* Uses setTypeProperties in fromResponse

* Tests now pass for testComposedResponseTypes

* Sets COdegenResponse dataType using getTypeDeclaration

* Begins refactoring of fromRequestBody

* Adds updateResponseBodyForPrimitiveType

* Adds all needed type if else blocks in fromRequestBody

* Fixes JavaJAXRSCXFExtServerCodegenTests

* Fixes RubyClientCodegenTests

* Adds fixes for clients that need custom isMap for body parameters

* Ruby broken, samples regened, debugging

* Adds updateRequestBodyForArray, renames updateRequest.. methods

* Samples regenerated

* Removes changes from Ruby generator

* Reverts RubyClientCodegen.java

* Reverts changes to GoClientCodegen.java

* Reverts PowerShellClientCodegen.java

* Reverts CrystalClientCodegen.java

* Removes updateRequestBodyForObject from JavaCXFServerCodegen.java

* Adds comment about refed models

* Tweaks made to fromProperties to add an explanatory comment

* Updates RustServer to have ByteArray request bodies not be strings

* Sets types in fromFormProperty

* Adds testComposedRequestBodyTypes

* Fixes when validation syncing is done in syncValidationProperties

* Removes redundant validation code from fromParameter

* Moves parameter inX setting higher up before schema logic in fromParameter

* More refactoring in fromParameter, uses early return to reduce levels of indentation

* Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForArray

* Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForObject

* Removes setParameterBooleanFlagWithCodegenProperty from  updateRequestBodyForPrimitiveType

* Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForMap

* Removes setParameterBooleanFlagWithCodegenProperty from addBodyModelSchema

* Removes setParameterBooleanFlagWithCodegenProperty from fromFormProperty

* Refactors parameter array handling code into fromFormProperty

* Simplifies fromRequestBodyToFormParameters

* Removes setParameterBooleanFlagWithCodegenProperty from fromParameter

* Adds deprecated docstring to setParameterBooleanFlagWithCodegenProperty

* Refactors ModelUtils.isFileSchema out of string schema check

* Removes ModelUtils.isFileSchema from RustServer updateRequestBodyForString

* Improves comment text

* Fixes RustServer uuid type setting for CodegenParameter

* Removes unneeded parens

* Fixes array property examples

* Removes unused code

* Renames variable to itemsProperty

* Adds testComposedRequestQueryParamTypes

* Adds updatePropertyForAnyType to rustserver will not have changed model properties

* Hoists arrayInnerProperty._enum into parameter for html2 generator

* Moves turning string type off into the codegen files

* Adds two more missing locations in rustserver

* Moves addVarsRequiredVarsAdditionalProps into anytype and objecttype handling

* More refactoring of where addVarsRequiredVarsAdditionalProps is used

* Samples regenerated
2021-09-27 16:12:40 -07:00
William Cheng
119370079a update spec template, samples 2021-09-25 18:14:26 +08:00
romanblack1
7384a1e513
Define content type only if the body is not empty (#9766)
* define content type iff the body is not empty

* update samples
2021-09-25 15:05:38 +08:00
romanblack1
622a936358
Define content type if and only if the body is not empty (#9910)
* rubypatch

* moving change to api.must

* fix content_type to content-type

* added end to if
2021-09-25 14:53:58 +08:00
Bodo Graumann
be3bd2e6c7
[Typescript] Improve exception for unknown responses (#10361)
* Clean up tests

* Change pets to async-await

* Use different pets for each test

* Workaround multiple petstore server instances

* Add test for unknown error response code

* Remove call duplication

Running the petstore server locally fixes all issues.

* Make body of unexpected error responses available

* Regenerate all consolidated typescript samples

* Remove json heuristic for unknown error responses
2021-09-24 23:53:37 +02:00