11973 Commits

Author SHA1 Message Date
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
Yohei Kitamura
e12100b033
[Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support

* Remove redundant params_encoder config

* Memoize Faraday connection and refactor
2022-04-16 16:42:58 +08:00
Peter Leibiger
a60df64cfb
[dart] Support/Fix sourceFolder parameter and docs (#12113)
* [dart] Support/Fix sourceFolder parameter and docs

* allow passing the sourceFolder to generators
* not sure how this translates to the dart2 generator due to the `part` files
* fix doc generation not showing default value of CLI options

* [dart] Delete old generator doc files
2022-04-16 16:41:13 +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
Eric Wolf
ce6d8c0be4
Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
The default for `sourceFolder` in the documentation was wrong.
2022-04-16 16:39:19 +08:00
Oleh Kurpiak
ceaff2001b
[Java] Ignore return value for Java file assert classes (#12145) 2022-04-16 16:29:45 +08:00
Hui Yu
16ab5feeb9
do not put the invalid value of the enum to a JSON structure (#12133) 2022-04-16 16:28:28 +08:00
Yuriy Belenko
0e9d6b09be
[php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates

* Remove default values from DI\get helper

It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.

* Refresh samples
2022-04-16 16:20:05 +08:00
William Cheng
c533deb9a9
improve errorObjectType to avoid regression (#12131) 2022-04-14 16:31:42 +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
Anton Koscejev
7851dfe148
[kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request

* [kotlin][client] fix incorrect handling of binary downloads

* [kotlin][client] update samples
2022-04-14 01:52:01 +08:00
mkusaka
498ba58881
[typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true

* [typescript-fetch] update samples
2022-04-13 09:06:02 +02:00
William Cheng
4c2a981230
[C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels

* update samples

* add file
2022-04-13 10:22:37 +08:00
Tom Bärwinkel
30d8ed68a7
Upgrade haskell-servant to latest LTS (#12092) 2022-04-13 01:31:03 +08: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
Florian Greinacher
79de04ed32
fix: respect configured generator URL in swagger config (#12064)
* fix: respect configured generator URL in swagger config

The generated OpenAPI spec does not reflect the GENERATOR_HOST which causes wrong generated code and non-functional snippets in the UI.

This PR improves that by adding the relevant parts to the spec.

* style: use `OpenAPI` instead of `Swagger`

* refactor: make Set creation Java 8 compatible

* fix: add missing import
2022-04-13 00:47:45 +08: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
mkusaka
877a3fc58d
[typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0

* [typescript-fetch] update docs

* [typescript-fetch] update package-lock.json manually & fix test

* [typescript-fetch] fix test
2022-04-12 09:10:37 +02: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
mkusaka
257141c933
[typescript-fetch] add default config feature (#12037)
* [typescript-fetch] add global config feature

* [typescript-fetch] update samples

* [typescript-fetch] rename GlobalConfig to DefaultConfig and set defaultConfig to set config

* [typescript-fetch] update samples
2022-04-10 08:33:12 +02:00
Peter Leibiger
51c48510a4
[dart] Improved library specific template usage (#10742) 2022-04-10 09:53:55 +08:00
William Cheng
a34f992c95
update jackson databind to newer version (#12097) 2022-04-10 09:37:44 +08:00
William Cheng
4e82b74cd5
fix warning in cref for list (#12096) 2022-04-10 09:37:09 +08:00
Mikko Maunu
4374a63a4c
maven-compiler-plugin only once, because duplicates cause warnings (#12093) 2022-04-09 22:41:33 +08:00
William Cheng
3e1797fb11
Add operations servers for csharp-netcore (#12090)
* Add the operation associated with each request path

* Populate the request operation with a combination of classname and operation id

* Initialize operation servers dictionary with default values

* Allow passing in the operation index with requests

* Check that the server contains a variables key before iterating

* Generated samples

* Generated samples with latest changes

* Include operations when at least one server exists

* Generate samples with the latest changes

Co-authored-by: Mike Hamer <mhamer@bandwidth.com>
Co-authored-by: Mike Hamer <hamer.mike@gmail.com>
2022-04-09 16:36:21 +08: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
Noah Fontes
f6231d2488
Remove restrictions for additional property types (#11802)
When a schema specifies additionalProperties: true, we need not restrict
those properties to a particular type. This change sets the schemas for
them to AnyType instead of object.

From a generation perspective, this only changes the output for
generators that differentiate between AnyType and object in their type
mappings; most do not. This fixes at least one bug in the Go and
TypeScript generators.
2022-04-09 10:19:54 +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
Yuriy Belenko
cd56a4b1a1
[php-slim4] Add Mock Server (#12044)
* Setup Data Mocker as dev dependency

New 1.2.0 version of the package contains required factory class.

* Refresh samples
2022-04-09 09:43:07 +08:00
Josh Burton
97eca73160
[dart-dio] Adds support for enumUnknownDefaultCase to dart builtvalue enums (#12080) 2022-04-09 09:35:42 +08:00
Oleh Kurpiak
346dfbc102
Configure apiNameSuffix via plugins (#12062) 2022-04-09 09:34:06 +08:00
lukacsaronzs
baa0ca088c
Fixed typo in readme which caused the project link to be broken (#12083) 2022-04-08 17:04:35 +08:00
William Cheng
6591d4e6fb
[PowerShell] better enum model support (#12082)
* better enum model/class support in powershell client generator

* add new files
2022-04-08 13:27:03 +08:00
Justin Black
f852c9c695
Adds postProcess method to python-experimental (#12079) 2022-04-07 16:04:22 -07: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
Oleh Kurpiak
edfb3e123f
Reduce casting for operations processing (#12002) 2022-04-06 11:15:36 +08:00
William Cheng
66db259678
comment out error message debug (#12056) 2022-04-06 11:06:19 +08:00
William Cheng
a7e92786df
[PowerShell] add more tests to powershell client (#12057)
* add more tests to powershell client

* update spec

* update method name

* add new file
2022-04-06 10:24:32 +08: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
5cef7e613a
add response headers to api exception (#12042) 2022-04-05 17:24:41 +08:00
William Cheng
4e16146638
more checks in validateJsonObject (#12041) 2022-04-05 17:24:22 +08:00