20651 Commits

Author SHA1 Message Date
Tanmay Mohapatra
06547b7b82
[julia] improve enum support (#20016)
* [julia] improve enum support

Improved enum support. Added an override for `postProcessModels` method in julia code generator to do enum post processing. Added an override for `toEnumValue` method in julia code generator to generate enum values correctly based on julia types. Updated templates to use `#enumVars` for generating enum values.

* generated samples
2024-11-06 16:04:15 +08:00
dependabot[bot]
e1bccbfe47
Bump s4u/setup-maven-action from 1.15.0 to 1.16.0 (#20025)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: s4u/setup-maven-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 16:03:23 +08:00
Lennard Sprong
bdad11d027
[swift6] Add Sendable conformance to request parameter enums (#20023) 2024-11-04 16:23:09 +00:00
Lennard Sprong
00dbe59994
[swift6] Add Sendable conformance to structs and enums (#20013) 2024-11-04 11:38:46 +00:00
Chirag Jain
67af02ccc8
python-pydantic-v1: Keep trailing commas for enum validation tuples (#19985)
* python-pydantic-v1: Keep trailing commas for tuples when enum has just single member

* Update samples

* Add test for single member enums

* Refactor test name
2024-11-02 15:26:19 +08:00
Kirill Zimnikov
66c7b2f8cc
feat cpp-qt-client: fix cast primitive to string (#20000) 2024-10-31 21:10:07 +08:00
William Cheng
b66b7af5d0
[JS] set option to true by default, update samples (#20003)
* set option to true by default, update samples

* update doc
2024-10-31 15:01:37 +08:00
Tobias Brauneis
ae4e2515dc
add parameter 'useURLSearchParams' to use JS build-in UrlSearchParams, instead of deprecated npm lib 'querystring' (#19949) 2024-10-31 14:48:45 +08:00
Alexander Kose
c70b07808e
Add support for a token supplier to OAuth based RestClient clients. (#19944)
Fixes OpenAPITools#19943
2024-10-31 14:13:59 +08:00
Pavel Sveda
acb16410c4
[Kotlin] Introduce support for Kotlin Explicit API Mode for Kotlin-Client generator (resolve #16506) (#19999)
* [Kotlin] Properly document nonPublicApi CLI option

* [Kotlin] Respect parameter name of parent KSerializer to avoid miss-behavior

* [Kotlin] Introduce support for Kotlin Explicit API Mode for Kotlin-Client generator (resolves #16506)
2024-10-30 21:57:47 +00:00
Bruno Coelho
e9ea12f25a
[swift6] improve retry interceptor (#19988)
* [swift6] improve retry interceptor

* [swift6] improve retry interceptor

* [swift6] improve retry interceptor
2024-10-30 11:31:35 +00:00
alfredo-accuris
9452873b99
[csharp] Mustache fully qualify namespace for Path (#19349)
* fix: csharp mustash fully qualify namespace Path

The generated code of Csharp get a fully quallify namespace for PATH

using Path = global::System.IO.Path;

* mend

* Remove alias for fully qualify Path class
2024-10-30 14:41:35 +08:00
ksn-partisia
b627e1cc67
[Bug] [Java] Fix raw type compilation warning in ApiClient for jersey2 and jersey3 (#19966)
* Add type annotation to raw type Iterable in jersey templates

* Regenerate samples
2024-10-30 14:24:32 +08:00
Ross
4a21dea47f
Added support for a trait based reqwest Rust client (#19788)
* Added Rust Reqwest trait based client

* Fixed Cargo imports for reqwest trait template

* Added support for mockall to Rust reqwest trait library

* Added MockApiClient when mockall and topLevelClient are enabled

* Added missing flags to Rust generator documentation

* feat: add support for single argument and bon builder

Adds support for single argument and bon building for the new
reqwest-trait generator

* Rebuilt rust samples

---------

Co-authored-by: Troy Benson <troybensonsa@gmail.com>
2024-10-30 14:21:11 +08:00
Per Hallgren
03c29e72c6
fix(go): only import reflect when using it (#19967)
The api.mustache template only uses the reflect package if there is a
query parameter which `isCollectionFormatMulti`. The import for the
reflect package is however added if _any_ parameter is
`isCollectionFormatMulti`.

If the parameter which `isCollectionFormatMulti` e.g. is in the body
instead of the query, this leads to the import being part of the
generated code but not used and the code does not compile.

This updates reworks the import handling for the `reflect` package so
that it is only added if there is a query parameter which
`isCollectionFormatMulti`.

Co-authored-by: Per Hallgren <perhallgren@users.noreply.github.com>
2024-10-30 14:20:25 +08:00
William Cheng
cbc64e86d3
Update inline model resolver to flatten responses (#19992)
* update inline model resolver flatten responses

* minor update

* minor update

* minor update

* minor update
2024-10-30 11:50:29 +08:00
Stefano Marzo
25b6fd3937
Added Company to README.md (#19994)
Updated the README company list by adding CERN, which is currently experimenting with OpenApi Generator to streamline API calls in a newly developed business application.
2024-10-30 11:49:54 +08:00
Tomasz Letachowicz
32bf99a39f
[BUG][KOTLIN] Sanitize names of the adapter variables in anyOf and oneOf model template to avoid compilation errors (#19981)
* [kotlin] Sanitize one_of and any_of model variable names to avoid compilation errors (#19942)

* [kotlin] add missing validateJsonElement method to oneOf and anyOf model templates (#19942)
2024-10-29 11:38:11 +00:00
William Cheng
48e8375166
fix ref to allOf wrapper, add tests (#19986) 2024-10-29 10:24:59 +08:00
devhl-labs
891698784d
Fix test on Windows (#19980)
* comment out broken tests

* fixed test for windows
2024-10-29 00:35:55 +08:00
William Cheng
32fdd7c4d8 update samples 2024-10-28 11:36:40 +08:00
William Cheng
537737730b better handling of api response 2024-10-28 11:33:39 +08:00
Andreas Haessler
836d426d21
[Java] Fix generation of POJOs with sets of enums (fixes #19957) (#19960) 2024-10-28 10:19:08 +08:00
William Cheng
62c0258e04
Better handling of allOf with unsupported schemas (#19964)
* better handling of allOf with unsupported schemas

* add test spec

* better messages
2024-10-28 10:00:17 +08:00
dependabot[bot]
30ff0d7ca9
Bump actions/setup-dotnet from 4.0.1 to 4.1.0 (#19971)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-25 15:16:32 +08:00
dependabot[bot]
008c1a42ef
Bump http-proxy-middleware from 2.0.6 to 2.0.7 in /website (#19952)
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.7/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.6...v2.0.7)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 16:43:32 +08:00
William Cheng
511316a966
Test build.gradle for java native petstore samples, sync pom.xml & build.gradle (#19951)
* test build.gradle for java native petstore samples

* trigger build

* sync pom.xml and build.gradle (java native)
2024-10-23 16:38:30 +08:00
Simon
21093b78c6
[JAVA]: Fix unknown property error for gradle build (#19933)
* Replace classifier with archiveClassifier

* Regenerate samples by script
2024-10-23 15:37:46 +08:00
Schmiddiii
f576f05eb2
Fix Rust generation for versions without minor or patch parts (#19946)
This fixes generation of a Rust library for OpenAPI specifications
where `info.version` was a single-digit number. This happened to for
[this](db005f2e55/openapi.yaml (L10))
specification. The fix for this issue is similar to the one in !17440.
2024-10-23 14:35:37 +08:00
Aliaksandr SEMIANKEVICH
e9c3c63732
[REQ] resolve #17544 Add x-field-extra-annotation and x-class-extra-annotation for kotlin generator (#19899)
Co-authored-by: Aliaksandr SEMIANKEVICH <aliaksandrsemian.epam@navan.tech>
2024-10-22 18:05:38 +08:00
William Cheng
071540f55a
fix path with unescaped value (#19938) 2024-10-22 15:07:46 +08:00
Tomasz Letachowicz
eb92eeb32e
[kotlin] Fix the path variable escaping in kotlin client generators (#19930) (#19937) 2024-10-22 12:34:42 +08:00
Linh Tran Tuan
52610e026e
[BugFix] [Rust*] model-name-prefix causing invalid generated code (#19922)
* [BugFix] [Rust*] model-name-prefix causing invalid generated code]

* Update

* Fix

* Update

* Update
2024-10-21 18:10:16 +08:00
Bruno Coelho
266193f95f
[swift6] update RXSwift version and pin Alamofire version (#19857) 2024-10-20 08:24:10 +01:00
Linh Tran Tuan
cfdb00a14c
[Improvement] [Rust-Axum] Fix clippy warning (#19920) 2024-10-20 14:09:25 +08:00
William Cheng
8c8f2f3521
fix javaodc in resttemplate oauth class (#19918) 2024-10-19 21:52:18 +08:00
William Cheng
695902cca1
update resttemplate dep to newer version (#19917) 2024-10-19 16:13:14 +08:00
William Cheng
ec98693da5
fix accepts, contentType with unescaped values (#19915) 2024-10-19 15:56:07 +08:00
Tomasz Letachowicz
c8f2d2be1f
[java][feign] Fix the character escaping in feign generated Content-type and Accept headers in order to generate proper values for these fields (#19895) (#19912) 2024-10-19 15:12:45 +08:00
William Cheng
fc161821a7
update configs with tempalteDir (#19914) 2024-10-19 15:12:08 +08:00
Ryan Mustard
1248d7a103
[swift5] fix compile error from Alamofire 5.10 - cast Parameter type to avoid recursion (#19908)
* cast type to avoid unintended recursive call

* update samples
2024-10-18 15:58:14 +01:00
Bruno Coelho
c6dbf0870c
[swift5] add credentials by default (#19906) 2024-10-18 10:38:27 +01:00
Jonas Reichert
f6c0b4ad6b
[swift6] adjust RequestInterceptor to pass RequestBuilder instead of OpenapiClient (#19904)
* inject requestBuilder instead of openAPIClient

* adjust template

* run samples

* fix tests

* fix test

* w

* fix
2024-10-18 09:45:35 +01:00
Joscha Feth
dc3718cd5c
fix(typescript): typecheck generated samples + fixes (#19903)
* fix(typescript): typecheck generated samples + fixes

* wip(today's fortune): The sum of the Universe is zero.

* Update .github/workflows/samples-typescript-typecheck.yaml

* Update modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache

* chore: regenerate samples
2024-10-18 09:57:43 +02:00
David Riddervold Marconis
ce09134b48
[typescript] feat: Add typescript licenseName option (#19888)
* Add licenseName option to typescript

* Update documentation

* Fix import in test

* Consolidate typescript test OptionsProviders

* Rename Typescript to TypeScript
2024-10-17 15:48:38 +02:00
Joscha Feth
23bd50fea0
fix(typescript): missing override directives / satisfy noImplicitOverride (#19896)
* fix(typescript): missing `override` directives

* chore: regenerate samples
2024-10-17 15:43:21 +02:00
Bruno Coelho
38dac13c26
[swift6] add credentials by default (#19885) 2024-10-16 13:38:49 +01:00
Gregory Merlet
0a39a1760e
Add httpClient config to typescript-nestjs generator (#19876)
* feat: add httpClient to config

* chore: generate samples and doc

* refactor: change import to type

* chore: generate samples and doc
2024-10-16 13:32:05 +02:00
Bruno Coelho
ca032113f2
[Swift] shorter readme (#19884)
* [Swift] shorter readme

* [Swift] update docs

* [Swift] update docs

* [Swift] format codegen

* [Swift] try to make CI pass
2024-10-16 11:55:18 +01:00
Nicolas Vervelle
65b1859161
Add nullability annotations to Java generated clients (#19617)
* issue-1960: Add nullability annotations to Java generated clients

Motivations:
Have generated clients properly annotated for nullability to be able to check code using them with tools like NullAway

Modifications:
* Add nullable_var_annotations template to handle nullability annotation on vars
* Add pojo templates to use the nullability template
* Adapt tests

* issue-1960: Add nullability annotations to Java generated clients

Modifications:
* Run export_docs_generator.sh script to update samples
2024-10-16 16:14:29 +08:00