1199 Commits

Author SHA1 Message Date
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
William Cheng
acd747ca6d Merge remote-tracking branch 'origin/master' into 6.0.x 2021-09-22 12:13:44 +08:00
William Cheng
acdf357b76
Revert "Accept header forces application/json type even if server (#10337)" (#10440)
This reverts commit 18301d00112e064d80d94f1ca5d6ca6032808ddd.
2021-09-21 18:17:05 +08:00
Wojciech Trocki
18301d0011
Accept header forces application/json type even if server (#10337)
* fix!: accept should not force application JSON 

Generated code offen provides range of accept methods.
This method improperly takes JSON as preferred

Example:
	localVarHTTPHeaderAccepts := []string{"application/zip", "application/json"}

* chore: generated changes
2021-09-21 12:04:00 +08:00
Wojciech Trocki
a939676c0d
fix: expose allowed values of the enum (#10386)
* fix: expose allowed values of the enum

Fixes #10385

* chore: update examples
2021-09-21 11:58:38 +08:00
William Cheng
1947f130c0 update doc, samples 2021-09-21 11:52:33 +08:00
adessoDpd
1a48c5f19f
[Wsdl] Handle schema property of type array with oneOf items and other minor updates/fixes (#10434)
* add handling of array of oneOfs

* handle res model-type lowercase name +shorten code

* remove unnecessary vendor-extension model enum

* handle openapi lowercase schema name for array res

* change xs:anytype to string for file responses

* update checkstyles

* remove not needed imports again

* update samples

* upper/lowercase use local getdefault

* update  samples again
2021-09-21 11:46:05 +08:00
Thomas Leplus
80fb9e9889
Use 'this' to assign to class field. (#10417) 2021-09-19 11:42:34 +08:00
bflaton
9479d35081
Python client docstring (#10339)
* Updated template so that generated code now renders docstrings and function parameters nicely in IDE.

Endpoints are still accessible in generated code, mainly to satisfy some test cases.

* fixed manual tests
2021-09-14 09:38:48 -07:00
Noor Dawod
495f6eb30c
Dart2 template linting (#10263)
* Bump jimschubert/query-tag-action from 1 to 2

Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action) from 1 to 2.
- [Release notes](https://github.com/jimschubert/query-tag-action/releases)
- [Commits](https://github.com/jimschubert/query-tag-action/compare/v1...v2)

Signed-off-by: dependabot[bot] <support@github.com>

* Updated Dart2 template to fix linting errors when using recommended rules.

* Updated Petstore code.

* Revert to having no EOF marker at end of few files.

* Fix a call on null value.

* Updated Petstore code.

* Add more checks for nulls.

* Updated Petstore code.

* Updated Petstore code.

* Revert back decoding an enum value.

* Revert back decoding an enum value.

* Updated Petstore code.

* Revert to older version of _convertParametersForCollectionFormat method.

* Updated Petstore code.

* Updated template and Petstore files.

* Adjust doc for analysis_options file.

* Updated Petstore sources.

* Shorten command to replace path parameters.

* Updated Petstore code.

* Add a space for readability.

* Adjust template per feedback.

* Remove unneeded break statements.

* Updated Petstore code.

* Keep a new line character when replacing parameter names (like before).

* Remove string interpolation.

* Updated Petstore code.

* Remove commented code.

* Regenerate Petstore code.

* Regenerated Petstore code.

* Use another parameter name to stop variable shadowing.

* Regenerated Petstore code.

* Put description adjacent to the class.

* Add another global ignore for all files: constant_identifier_names

* Use const for contentTypes and authNames.

* Regenerate Petstore code.

* Use shorter code to check for an empty array.

* Regenerate Petstore code.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-13 09:40:15 +08:00
Mike Marchetti
9464999d9c
fix: handle deepcopy of openapi objects (#9735) (#9735)
- Add __deepcopy__ and __copy__ to OpenApiModel
- pass discriminator inside deepcopy if exists
- add test cases for deepcopy of models
2021-09-09 09:16:59 -07:00
William Cheng
477e2365c7
improve git_push.sh (#10356) 2021-09-09 12:49:03 +08:00
Thomas Hervé
36ae0b9ffe
Handle nullable items in Go arrays (#10268)
If an item in a go array is nullable, we want to represent it as a pointer,
otherwise it will be deserialized with a default value and it will be
impossible to differentiate it from null.
2021-09-09 11:53:23 +08:00