1230 Commits

Author SHA1 Message Date
William Cheng
de8decc9f5
throw exception when failed to refresh token (#12431) 2022-05-24 14:51:39 +08:00
Justin Black
4d544994fd
[python-experimental] BoolSchema + NoneSchema improvements (#12411)
* Moves is_none is_true is_false methods into base mixins, adds tests

* Improves docstrings
2022-05-23 15:55:49 -07:00
cachescrubber
8be490d130
Upgrade Spring Boot to 2.5.14 / 2.7.0 (#12408)
* Upgrade Spring Boot to 2.5.14 / 2.7.0

* Generate Samples
2022-05-20 20:24:13 +08:00
Nick Dunne
d38cb1b37a
[java][spring] added springdoc support for service metadata and security (#12346)
* added springdoc config file to codegen

* added mustache template for springdoc config

* changed type to all caps so it can be used in the template

* added security scheme details
caveat: didn't add oauth2 flows

* removed url not supported by codegensecurity

* Fixed default doc provider in help message

* refactored config file generation test
and added springdoc test

* removed default codegen modification
implemented through booleans in template instead

* added new/updated generator files

* fixed escaping of description

* fixed appDescription in template
removed if and fixed escaping

* updated generated files again

* updated to springdoc in generator docs
2022-05-18 11:20:54 +08:00
Artem Kuzmenko
5221ca2b0a
feat(typescript): add repository field to package.json (#12292) 2022-05-16 09:54:37 +02:00
Peter Leibiger
02f16267cf
[dart] Bump min dio version to prevent unused import (#12354) 2022-05-13 14:09:33 +08:00
William Cheng
12cdacabbf
[Inline model resolver] better handling of inline responses and bug fixes (#12353)
* better handling of inline response schemas, bug fixes

* update samples

* add new files

* better code format

* remove unused ruby files

* fix java test

* remove unused js spec files

* remove inline_response_default_test.dart

* fix webclient tests

* fix spring tests
2022-05-13 10:17:59 +08:00
William Cheng
d135f1992e
Fix inline allOf in request body (#12348)
* fix inline allof in request body

* update samples
2022-05-12 12:51:36 +08:00
William Cheng
ad3b5f7045
[Inline model resolver] various improvements (#12293)
* better handling of requestbody in the inline resolver

* remove commented code

* better request body naming

* fix unique naming

* minor code format change

* removed additional underscore from names, fix test

* more fixes, update tests

* fix all tests

* undo changes to default codegen

* update samples

* update python tests

* add new files

* update samples
2022-05-10 17:13:57 +08:00
Justin Black
8fc85530e8
[python-experimental] fixes delete endpoint with no body use case (#12287)
* Generates delete_coffee endpoint

* Adds test of delete_coffee

* Removes .run files

* Fixes bug and adds test

* Reverts version file

* Reverts function sig

* Removes comma
2022-05-02 18:42:13 -07:00
Peter Leibiger
89d17e2845
[dart] Rename dart-dio-next to dart-dio and make it stable (#12258) 2022-04-30 16:43:11 +08:00
William Cheng
b6a8037f62 update samples 2022-04-27 20:45:24 +08:00
Michael Marner
e6be5543dd
[Dart-Dio-Next]#9082 Add json_serializable serialization option (#9980)
* PoC json_serializable in dart-dio-next

* Move build.yaml template into json_serializable dir

* Undo implicit-dynamic change

* Fix automatic formatting

* Treat non-required fields as nullable

* Make class properties final

* Fix error introduced by merging in master

* Fix map creation when deserializing

* Exclude built files from analysis

* Add new dio import props

* Fix broken merge

* Fix configuration of nullable properties

* Only add api_util import if using built value

* Add config param to set properties as final

* Fix syntax error due to merge

* Update to simplified dio configuration

* Add missing api constructor template

* Fix import for multipart files

* Fix inclusion of library deserialize template

* Update docs

* Remove trailing newline from class

* Fix whitespace in generated templates

* FIx built value generation problem caused by merge conflicts

* Escape dollar signs in strings

* Handle enums

* Config for json_serializable sample

* Generate sample for json_serializable

* Revert "Escape dollar signs in strings"

This reverts commit 6e2a3aeea0450518433f2a07fe7cda92272b18a5.

* Use raw strings when dealing with enum values

* Add json_serializable Maven module ind fix number based enums

* regenerate all tests

* Update docs and fix wrong maven module

* add a beta hint to json_serializable option

* Update minimum dart sdk with json serializable

* Use dart 2.14 when testing Dart samples

* Update codegen to remove analysis errors in output

Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
2022-04-27 16:12:22 +08:00
William Cheng
e0d8d0f5d6
better code format for python cilent (#12251) 2022-04-27 16:00:44 +08:00
jld3103
37905e8bfa
dart2: Fix authentication (#11360)
* dart2: Fix authentication

* dart2: Update samples
2022-04-27 02:13:19 +08:00
Justin Black
5de527e784
Enables test_inline_composition (#12240) 2022-04-25 22:09:31 -07:00
Justin Black
c456de40c0
Adds ability to turn inline model resolver on or off and uses it in python-experimental (#12198)
* Adds getUseInlineModelResolver and uses it

* Regenerates python-exp samples

* Regenerates docs

* Samples regenerated

* Moves codegenProperty.complexType setting

* Fixes python-experimental tests

* Reverts vesion file change

* Improves type setting code for python-exp

* Fixes AnyType type hint

* Samples regenerated
2022-04-25 21:44:05 -07:00
William Cheng
23ee8fdf7a
better code format for python client (#12231) 2022-04-25 23:25:42 +08:00
Dmitry Vasilev
6f1fa4592b
[BUG][python] Fix PEP8 E111 issue in rest.mustache (#12229)
* Fix PEP8 E111 issue

* Update samples
2022-04-25 17:00:27 +08:00
William Cheng
4ee5f72214
Use LinkedHashMap for deterministic iteration order (#12230)
* to LinkedHashMap

* LinkedHashMap

* allModels to LinkedHaskMap

Co-authored-by: yilinwang <linda.yilin@gmail.com>
2022-04-25 13:33:24 +08:00
William Cheng
8e49875871 update samples, docs 2022-04-24 15:38:16 +08:00
adessoDpd
1602942292
[Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation

* add option to use specified operationId

* update samples

* update cli description
2022-04-24 15:29:09 +08:00
Justin Black
fbdd3c3e22
[python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison

* Reverts file
2022-04-19 21:28:42 -07:00
William Cheng
8330e16d66
Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item

* update tests

* update samples

* regenerate samples

* fix allof naming, remove files

* add files

* update samples

* update readme

* fix tests

* update samples

* update samples

* add new files

* update test spec

* add back tests

* remove unused files

* comment out python test

* update js test using own spec

* remove files

* remove unused files

* remove files

* remove unused files

* better handling of allOf with a single type

* comment out go test

* remove test_all_of_with_single_ref_single_ref_type.py

* fix inline resolver, uncomment go test
2022-04-20 10:28:15 +08:00
Justin Black
6a77660b08
[python-experimental] fixes bug where some singleton representations raised a RecursionError (#12157)
* Adds issue components and endpoint

* Regenerates samples

* Fixes singleton repr, removes issue components and endpoint

* Removes unused endpoint

* Reverts file

* Adds tests of enum, boolean, and none representations

* Uses super repr for singletons that ere not none, true, or false
2022-04-17 14:06:17 -07:00
Justin Black
e2e7609bac
Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
2022-04-17 09:36:09 -07:00
Justin Black
eef7cddd6f
Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated

* Adds test_UUIDString uuid model test

* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type

* Adds maps data type back in

* Adds missing Null and AnyType definitions and adds them to python-experimental

* Generator docs updated, added missing uuid, null, anytype, and object

* Adds uuid support description

* Docs updated
2022-04-16 14:55:49 -07:00
William Cheng
2abdd3acb7 set follow_location default to true 2022-04-16 17:46:55 +08:00
Connor Moore
7b1795a159
[REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option

Implementation of https://github.com/OpenAPITools/openapi-generator/issues/10028

* regenerated clients
2022-04-16 16:51:01 +08:00
cachescrubber
f195a83aaf
[Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (#12089)
* Fix Bug in OneOfImplementorAdditionalData pulling in wrong vars to one-of-implementors.
Support parentVars in order to support fluent setter with inherited properties.

Squashed commit of the following:

commit f945c943777a1a496d7de8fc0a188842d9efb1ac
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date:   Thu Apr 7 18:22:54 2022 +0200

    Polishing

commit 23ce1d0ff1faff53e85ca4362f33660962aa6a92
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date:   Thu Apr 7 17:15:28 2022 +0200

    Add JavaDoc

commit fee70fde5709afa67f3aabd4f48ba496df63a884
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date:   Thu Apr 7 17:11:17 2022 +0200

    Add imports for inherited Properties

commit 29509aaac51750fbd33c00a57d32cac34cbcbb90
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date:   Thu Apr 7 13:40:36 2022 +0200

    Generate Samples

commit 1d19d5465137d3af712f2fd3b4ae4474c58af15e
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date:   Thu Apr 7 13:21:23 2022 +0200

    SpringCodegen: Support parentVars in order to support fluent setter with inherited properties.

commit 2217a77bb747d0b07ef17407a6b5dd5c624a2551
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date:   Thu Apr 7 07:18:50 2022 +0200

    Add allVars to omit list in OneOfImplementorAdditionalData

commit 90499a3b0a187971bfe25deb6355c3444dcf89a7
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date:   Wed Apr 6 16:40:23 2022 +0200

    Works exactly as needed for oneOf/allOf in Java/Spring

commit b6d496d772e0d0a8d87a3b8cdba8fd3ca4db7f3f
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date:   Wed Apr 6 15:16:27 2022 +0200

    Debug Session: identify critical codep path

commit 85722360038107f15841d5acc448d93dee513a06
Author: Lars Uffmann <lars.uffmann@vitroconnect.de>
Date:   Tue Apr 5 09:56:38 2022 +0200

    Add test case to reproduce issue.

commit 14acc5cd974bb5260f3751015558807e2eb1a8a1
Author: Lars Uffmann <lars.uffmann@gmail.com>
Date:   Tue Apr 5 06:57:30 2022 +0200

    Add config to reproduce the issue

* Adjust indentation.

Co-authored-by: Lars Uffmann <lars@wintermute.local>
2022-04-16 16:48:14 +08:00
0xNF
01ad80f5f8
[Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples

Co-authored-by: 0xnf <0xnf>
2022-04-16 16:40:30 +08:00
Justin Black
1deaaa88fe
[python-experimental] Allow response media types to omit schema (#12135)
* Adds issue spec file and attemts to generate code from it

* Adds missing schema definitions

* Skips fromProperty invocation if the passed in schema is none in getContent

* Makes MediaType.schema optional

* Adds checking that the content type is in self.content

* Sets ApiResponse body type as Unset if there is no schema for it

* Handles schema = None case

* Adds endpoint without response schema

* Reverts version files

* Adds test_response_without_schema
2022-04-13 15:45:33 -07:00
mkusaka
8c57b66da9
[typescript*] drop support typescript below 4.0 (#12123)
* [typescript-axios] drop support typescript below 4.0 & update samples

* [typescript-axios] update package.json & package-lock.json

* [typescript-node] drop support typescript below 4.0 & update samples

* [typescript-nestjs] drop support typescript below 4.0 & update samples

* [typescript-redux-query] drop support typescript below 4.0 & update samples

* [typescript-aurelia] drop support typescript below 4.0 & update samples

* [typescript-jquery] drop support typescript below 4.0 & update samples

* [typescript] drop support typescript below 4.0 & update samples
2022-04-12 19:06:54 +02:00
Peter Leibiger
e988dc8b62
[dart] Remove old dio generator (to be replaced with dart-dio-next) (#12109)
* remove old `dart-dio` generator which will be replaced by `dart-dio-next` in a seperate PR
* remove left-over `DartJaguarClinetCodegen` class which was sunset a while ago and is unused
2022-04-13 00:42:15 +08:00
Peter Leibiger
478ed9b8ed
Add a sample of an enum model array in query params (#12107) 2022-04-12 13:53:51 +08:00
Peter Leibiger
15e9d4ed8c
Add example allOf with single ref (#10948)
* Add example allOf with single ref

* fix dart-dio-next handling of that case

* Refactor without vendor extension

* Regenerate newer samples
2022-04-12 13:52:53 +08:00
Justin Black
b29b5e1045
[python-experimental] fixes json + charset use case (#12114)
* Adds code to detect json content type when charset is also set

* Updates template to properly render content type, regenerates samples

* Adds test_json_with_charset

* Reverts version file

* Fixes typo
2022-04-11 20:05:26 -07:00
William Cheng
6bc065ec34
Specify source encoding in java/kotlin sample poms templates (#12088)
Co-authored-by: cghislai <charlyghislain@gmail.com>
2022-04-09 15:20:58 +08:00
Dennis Kliban
e783e9b780
Adds 'params_encoder' config option for Ruby clients using Faraday (#9839)
The partial templates were renamed because they no longer hold tls
settings exclusively.

fixes: #9838
2022-04-09 10:14:38 +08:00
Josh Burton
97eca73160
[dart-dio] Adds support for enumUnknownDefaultCase to dart builtvalue enums (#12080) 2022-04-09 09:35:42 +08:00
Justin Black
d45f72da32
Eliminates handlebars helper warnings (#12078) 2022-04-07 15:35:15 -07:00
Justin Black
32295bf46f
[python-experimental] adds missing init files in endpoint modules (#12077)
* Adds mising init files inthe endpoint modules

* Reverts versin file

* Fixes test

* Samples regenerated
2022-04-07 13:23:52 -07:00
Justin Black
2e19371a26
Fix the null pointer exception when generating examples for schemas in python-experimental (#12019)
* Improves example generator for python-experimental

* Fixes quotes around date example

* Improves object schema examplple gen

* Samples regenerated

* Adds back in AnyType + oneOf discriminator handling

* Reverts version file

* Returns early in example gen for array composed schemas

* Adds toExampleValue method to python-exp

* Improves pattern regex sample generation in python-experimental

* Fixes comment typo
2022-04-07 11:17:37 -07:00
Bodo Graumann
510f79989a
[typescript] Support esbuild, second attempt (#11465)
* Install correct typings for url-parse

* Use es modules compat mode when es6 output is selected

* Consolidate typescript sample generation naming scheme

* Regenerate samples

* Create new typescript sample to test esmodules in browser

* Expose RequiredError type

* Make browser integration tests pass locally

* Remove cookie tests, because we don’t allow cross-origin cookies

* Add output type to package definition

* Execute new browser tests in pipeline

* Install headless chromium dependencies in circle ci
2022-04-06 14:53:02 +02:00
William Cheng
a596d5aec0
update jackson databind to newer version (#12053) 2022-04-05 18:09:23 +08:00
Katsuyuki Omuro
efc1a66ebc
[Ruby] Fix incorrectly capitalized identifier in apis template (#12045) 2022-04-05 17:50:44 +08:00
William Cheng
2d4a01aa70 Revert "Prepare 6.0.0 beta release (#12039)"
This reverts commit 914b539eea7097ad2b4323d20c8f95144782cb68.
2022-04-04 12:17:12 +08:00
William Cheng
914b539eea
Prepare 6.0.0 beta release (#12039)
* update to 6.0.0-beta

* update samples
2022-04-04 10:29:49 +08:00
William Cheng
b54257d7ab
Support binary return format only in Ruby faraday client (#11974)
* support binary return format on  in ruby faraday client

* add option to return binary data

* update condition
2022-04-03 16:55:15 +08:00
Daniel Qian
41451ff5ee
fix #11958 [BUG] python generates wrong model name and model file name (#11959)
* fix #11958 [BUG] python generates wrong model name and model file name

Modify AbstractPythonCodegen.toModelName just like AbstractJavaCodegen.toModelName

* add unit test

* update samples and docs
by
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh

* fix AbstractPythonCodegen#toModelName logic, remove underscore

* update samples and docs
by
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
2022-04-01 19:43:08 -07:00