12694 Commits

Author SHA1 Message Date
William Cheng
00ef7a8590
add schema mapping support to perl (#12991) 2022-07-23 08:56:47 +08:00
Bruno Coelho
c03cf178c9
[swift][client] reduce unnecessary public api (#12975)
* [swift][client] reduce unnecessary public api

* [swift][client] reduce unnecessary public api
2022-07-23 08:39:34 +08:00
Max K
08c4a35162
[aspnetcore] Added dotnet outdated to READMEs (#12981)
* Added dotnet outdated to READMEs

* Update samples
2022-07-23 08:37:17 +08:00
William Cheng
e4b268613c
[R] fix assignment, better doc (#12979)
* better code format

* fix doc comment, remove blank line

* ignore .lintr in rbuildignore
2022-07-22 13:08:01 +08:00
William Cheng
6e6c2f9a0e
add http basic test in r client (#12978) 2022-07-22 10:01:48 +08:00
William Cheng
f26985c239
add http bearer auth support to R client (#12974) 2022-07-22 09:44:05 +08:00
Justin Black
d1c2230709
v303 unit test spec, adds post json request bodies (#12875)
* Adds post request body routes and test data to spec

* Sample regenerated

* Adds tags and post endpoints

* Uses refs to tests examples in requestBodies

* Stops passing in test_examples into generate_operation

* Adds testCases to MediaType

* Adds refs to test cases in media type

* Adds post request body examples

* Fixes enum 1 ingestion of 1.0

* Only generates test examples when they exist

* Regenerates samples
2022-07-21 15:34:49 -07:00
Ry Bobko
1b6069f984
[Typescript-Angular] Handle runtime-generated injected BASE_PATH in Typescript-Angular services (#12936)
* handle array of strings for basePath

* handle string[] for basePath when generated from APP_INITIALIZER

* updated samples

* updated samples
2022-07-21 16:41:31 +02:00
Paul Hagedorn
298ccfcfd8
[typescript-nestjs] Upgrade to NestJS v8 (#12937)
* feat(typescript-nestjs): upgrade to nestjs v8

Set default nestVersion to 8.0.0

* chore(typescript-nestjs): create typescript-nestjs-v8-provided-in-root.yaml and add it to samples.json

* chore(typescript-nestjs): generate samples

* docs(typescript-nestjs): generate docs

* chore(typescript-nestjs): re-generate samples
2022-07-21 13:41:32 +02:00
William Cheng
eeb1711f9f
Add support for string response deserialization (#12964) 2022-07-21 15:18:59 +08:00
William Cheng
17ba8304b6
Update swashbuckle version to 6.4.0 (#12965)
* update swashbuckle to newer version

* use newer version of swashbuckle for all aspnet versions
2022-07-21 15:10:32 +08:00
William Cheng
c26e19cbc0 Revert "Add support for string response deserialization (#12910)"
This reverts commit b8524bee232a55e28693354ab543b91e3f65629a.
2022-07-21 12:58:46 +08:00
Emanuele Saccomandi
b8524bee23
Add support for string response deserialization (#12910)
* Add support for string response deserialization

* updated samples

* updated samples

* realigned to master

* fix: errors were not getting thrown

* updated samples

* fix: errors were not getting thrown

* updated samples
2022-07-21 12:45:50 +08:00
Martin Delille
cf58ac0583
[cpp-qt-client] Minor fixes (#12951)
* foreach => for

* Fix PetStore.pro

* Whitespace formatting
2022-07-21 12:03:22 +08:00
Max K
17c021df5b
Added support for inheritance in Swashbuckle in ASP.NET Core (#12856)
* Added support for inheritance in Swashbuckle

* Updated to new API
2022-07-21 11:44:46 +08:00
William Cheng
2248baa5ea
add schema mapping support to ruby client generator (#12962) 2022-07-21 11:38:27 +08:00
William Cheng
f898b072ba
add model caching to ruby client generator (#12961) 2022-07-21 11:22:41 +08:00
Yohei Kitamura
9b154bb437
[Ruby] Enhance Faraday middleware support (#12873) 2022-07-21 11:01:14 +08:00
Paul Hagedorn
33ec914e6a
fix(typescript-nestjs): initialize queryParameters in Service if auth uses apikey but has no other query parameters (#12940) 2022-07-20 19:33:09 +02:00
William Cheng
05f4792df7
[csharp-netcore] fix OAuth2 integration when using httpclient library (#12954)
* Update RestSharp to v108

* Add OAuth2 Application (client_credentials) authentication

* Run generators and fix typos

* Undo accidental python and rust changes

* Add documentation, fix authenticator bug, and fix user agent bug

* Fix tests

Missed some changes in the mustache templates.
Also had to update the `netcoreapp2.0` test project to `netcoreapp3.1` for compatibility with RestSharp

* Switch HttpUtility to WebUtility for compatibility

* skip oauth file generation for httpclient

* fix templates

* remove files, regenerate samples

* add reference to system.web

Co-authored-by: Jared Bates <Jared.Bates@sight-sound.com>
2022-07-20 20:30:56 +08:00
Jared Bates
2dcc319e13
[csharp-netcore] Update RestSharp and add client_credentials auth support (#12789)
* Update RestSharp to v108

* Add OAuth2 Application (client_credentials) authentication

* Run generators and fix typos

* Undo accidental python and rust changes

* Add documentation, fix authenticator bug, and fix user agent bug

* Fix tests

Missed some changes in the mustache templates.
Also had to update the `netcoreapp2.0` test project to `netcoreapp3.1` for compatibility with RestSharp

* Switch HttpUtility to WebUtility for compatibility
2022-07-20 19:25:29 +08:00
Cédric Thireau
0a0a8cffd6
Fix spring implicitHeaders w/o annotationLibrary (#12921)
Fix erroneous code generation when `implicitHeaders=true` and `annotationLibrary=none`
2022-07-20 11:42:49 +08:00
William Cheng
322f617d33
add schema mapping to powershell generator (#12934) 2022-07-20 11:10:27 +08:00
William Cheng
e2b1ed3dfc
add schema mapping to r client (#12933) 2022-07-20 11:09:56 +08:00
devhl-labs
92193f7159
Adds isInnerEnum to CodegenProperty (#12860)
* added nonNullableVars

* added return property to operation

* added return property to operation

* build samples

* added inner enum

* build samples

* added a comment
2022-07-20 01:41:17 +08:00
Bruno Coelho
8d62e597ae
[kotlin][client] Kotlinx Serialization code formating (#12922)
* [kotlin][client] Kotlinx Serialization cleanup

* [kotlin][client] Kotlinx Serialization cleanup
2022-07-19 14:05:17 +01:00
Marcus Handte
8fded5c47e
Fix npe when unwrapping optional. (#12882) 2022-07-19 12:11:11 +01:00
stropho
f176716a61
[typescript-axios] avoid stringifying header string values (#12919)
* feat(typescript-axios) don't stringify string headers

* samples
2022-07-19 09:55:34 +02:00
William Cheng
b722fd9063
cache the model name for faster lookup in r client gen (#12918) 2022-07-19 14:12:55 +08:00
William Cheng
d2be711669
powershell: cache model name for faster lookup (#12917) 2022-07-19 14:12:36 +08:00
William Cheng
6bfef6c191 Merge remote-tracking branch 'origin/master' into 7.0.x 2022-07-19 11:54:20 +08:00
Akhil Nair
259221ab25
This PR adds memoization to Java **toModelName()** method. (#12909)
### PR checklist

- [x] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
- [x] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [x] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
  ```
  ./mvnw clean package
  ./bin/generate-samples.sh
  ./bin/utils/export_docs_generators.sh
  ```
  Commit all changed files.
  This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
  These must match the expectations made by your contribution.
  You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
  For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
- [x] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.1.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks)
- [x] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.

This PR greatly reduces the time taken for Java code generation.
**toModelName()** method is invoked numerous times and it was accumulating a lot of time.

This has reduced the Java SDK generation time for our rather large open API spec from ~3h30m hours to 4 mins.

The generated code is the same as before.

spec: https://cdn.intersight.com/components/an-apidocs/1.0.11-7546/model/intersight-openapi-v3-1.0.11-7546.yaml

@wing328
2022-07-19 11:48:32 +08:00
William Cheng
b88666b87a
add uuid test, better hyper test (#12916) 2022-07-19 11:22:29 +08:00
Taufik Rama
4ee336a9da
[Rust] Changed 'UUID' handling into 'uuid' crate (#12895)
* [Rust] Changed 'UUID' handling into 'uuid' crate

* [Rust] updated 'samples/'
2022-07-19 11:03:53 +08:00
Jaemin Park
ed4ed3923f
[cpp-ue4] Fix GET request writes body (OpenAPITools#12833) (#12904)
Co-authored-by: nullbus <nullbus@nm-fc.com>
2022-07-18 17:14:18 +08:00
William Cheng
2e0a121205
add decimal support to crystal cilent (#12899) 2022-07-18 17:01:36 +08:00
William Cheng
eb471db7c9
[R] fix a couple warnings reported by lintr (#12903)
* better code format in r client

* update code based on lintr

* update samples
2022-07-17 23:49:37 +08:00
William Cheng
e05b9746ea
[R] Add lintr (#12902)
* add lintr

* update samples
2022-07-17 17:29:05 +08:00
Max K
d2294d2eca
Updated mustache templates, generator and docs (#12848) 2022-07-17 15:51:05 +08:00
William Cheng
f05dd12b43
add decimal mapping in perl client gen (#12897) 2022-07-17 13:10:53 +08:00
AnaTofuZ
75895e18bc
Perl: Fix JSONization of ArrayObjects (#12896)
* Perl: fix object to json

* generate samples

* add test case
2022-07-17 12:50:39 +08:00
William Cheng
0b80444b56
fix circular reference in inline model (#12894) 2022-07-17 12:43:40 +08:00
William Cheng
bdd54dacad
Fix parameter schema mapping (#12893)
* fix parameter schema mapping,refactor unaliasSchema

* minor code format change
2022-07-17 12:43:00 +08:00
AnaTofuZ
a9e63f4ce3
Perl: Type coercion for the JSON conversion part of Perl (#12891)
* Perl: separate date and DateTime

- Since the json values to be returned are different for date and DateTime, they are managed separately

* Per: Enforcing Perl types to openAPI types

Perl JSON values return different types depending on the context, so look at openapi's type and modify the type.

* generate samples

* generate docs

* add perl test (json types)
2022-07-16 22:18:51 +08:00
Thomas Hansen
e2b9f39b19
[PHP] ObjectSerializer::deserialize() associative arrays bugfix (#12849)
* [PHP] ObjectSerializer::deserialize(): fix bug with json_encode

* [AUTOGENERATED] update samples
2022-07-16 17:21:42 +08:00
Sascha Peilicke
bf604a08ab
Java: Add toString method to ApiException (#12851)
Previously, only the class name appeared in stacktrace whereas now
relevant details are added. This applies to most Java-related
generators.
2022-07-16 17:20:30 +08:00
William Cheng
40c87e125c
fix stream_callback doc (#12879) 2022-07-16 16:33:41 +08:00
William Cheng
ed6280b0f7
add roxygen2 to workflow (#12880) 2022-07-16 16:33:23 +08:00
sebastien-allard
5fb40e571e
[BUG][typescript] Unnecessary semicolon [sonar(typescript:S1116)] (#12863)
* [BUG][typescript] Unnecessary semicolon [sonar(typescript:S1116)]

Making generated stringEnum compliant with Sonar rule:
https://rules.sonarsource.com/typescript/RSPEC-1116

* [BUG][typescript] Unnecessary semicolon [sonar(typescript:S1116)]

Making generated stringEnum compliant with Sonar rule:
https://rules.sonarsource.com/typescript/RSPEC-1116
2022-07-15 17:25:54 +02:00
stropho
87aab5a1f3
[typescript-axios] discriminator type in template (#12878)
* feat(typescript-axios) discriminator type

* add samples
2022-07-15 11:39:26 +02:00