20678 Commits

Author SHA1 Message Date
Joscha Feth
824f864512
docs: stop regeneration on error (#19898) 2024-11-10 17:38:04 +08:00
William Cheng
6ff52c7e31
suppress the cast warning in java okhttp-gson client (#20076) 2024-11-10 17:34:40 +08:00
Dennis Ameling
13b11d7706
kotlin-server: Fix required + nullable combination for properties (#20054)
* kotlin-server: Fix required + nullable combination

* Update FILES

* Updated generated code
2024-11-09 22:35:11 +08:00
William Cheng
223a169717
add TINQIN to the user list (#20072) 2024-11-09 18:28:17 +08:00
Julian Vennen
6bd3d53eee
[PHP/Dart/Python] Correctly escape strings in single quotes (Fixes #17582) (#19529)
* [PHP/Dart/Python] Correctly escape strings in single quotes (Fixes #17582)

* Move escapeTextInSingleQuotes method to DefaultCodegen, add docblock
2024-11-09 16:50:12 +08:00
William Cheng
1bda458882
Add tests for duplicated operationId (#20070)
* add tests for duplicated operation id

* add spec file
2024-11-09 16:38:20 +08:00
William Cheng
b34df341a4
[csharp] Add option to fallback to int for Timeout (#20069)
* add option to fallback to int for Timeout

* update doc
2024-11-09 15:23:57 +08:00
Alec Petersen
bbccd2827f
Replace MaxTimeout usage with Timeout, update Timeout to be a TimeSpan type (#19875) 2024-11-09 14:07:13 +08:00
DaveK-Rocketmakers
d9229c7b9f
fix(csharp): Fixed JsonConverter for discriminators only appearing on base classes (#19972)
* fix(csharp): Fixed JsonConverter for discriminators only appearing on base classes

* chore: Updated .NET samples
2024-11-09 13:55:02 +08:00
Cameron Koegel
5702751e91
[Java] Respect User Supplied Header Params (#20042)
* [Java] Respect User Supplied Header Params

* remove if `dynamicOperations` true
2024-11-09 13:41:30 +08:00
Dennis Ameling
a7a86398d0
[kotlin-server] Bump Kotlin/Gradle versions and improve CI triggers/config (#20061)
* [kotlin-server] Bump Kotlin versions to latest

* Run tests on more samples

* Fix typo in workflow definitions

* Update samples

* Bump Gradle to 7.6.4

* Some further tweaks

* Bump Gradle versions

* Fix Gradle version syntax
2024-11-09 13:39:20 +08:00
Dennis Ameling
7bce639441
[typescript] use supportsES6 in sample testing (#20062) 2024-11-08 14:11:54 +01:00
Jenny G. L.
961c2e44d1
[scala][client]: scala-http4s: minor improvement (enum companion method, remove implicit, error handling) (#19901)
* [scala][http4s][client]: add enum method; remove implicit

* improve error handling

* more enum enhancement

* remove unused

* update samle

* avoid breaking change

---------

Co-authored-by: Jenny Leahy <jennyleahy@JENNYLEAHY.localdomain>
2024-11-08 17:15:32 +08:00
Sylwester Zieliński
3a3688280f
Bump libraries for Kotlin-client. (#20053) 2024-11-08 08:05:28 +00:00
dependabot[bot]
00db84d22b
Bump actions/setup-dotnet from 4.0.1 to 4.1.0 (#20055)
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-11-08 13:13:06 +08:00
Jules Ivanic
2c38d0de35
[typescript-fetch][Fix] oneOf models are generated without ...ToJSONTyped functions but models referencing still try to import (#20046)
* Fix #19858

* re-generate the samples
2024-11-07 14:33:33 +01:00
William Cheng
28e02fc1a2 update aspnet samples 2024-11-07 20:33:49 +08:00
Julien Tschäppät
7deecdc569
[csharp] Add a server generator for FastEndpoints (#19690)
* Add of a first working generator for FastEndpoints framework

Generator that support the basics of a FastEndpoints project
https://fast-endpoints.com/

* Add respose code documentation support

* Add an option to enable use of problem details

* Clean enum and model

* Add an option to generate record for requests/models

* Update sample

* Add support of nullable types

* Add option to enable authentication

* Add option to generate validators

* Clean readme.md file

* Add option to enable response caching

* update readme template

* Add missing files references

* Update generated sample

* Add link to documentation

* Add generator documentation

* correctly support packageName

supportingFiles additions moved to processOpts()

* improve useAuthentication option handling

Avoid to copy an empty file

* processOpts, move call to parent at the end

* Update generated sample

* Refactor and fix super.processOpts(); call order

* Handle the case of multi-line description

* Rename field to match naming conventions

* Add useApiVersioning option

* Update generated sample

* Add generator documentation

* Fix record when model contains optional properties

* Add configuration files for each option

* Add sample project for each configuration

* Add GitHub Action workflow for sample projects

* Add FastEndpoints BindFrom attribute on path, query and form params

* Update sample generated projects

* Fix validator template

* fix alphabetical order

* Use fully qualified name for FastEndpoints

* Add options to set GUID to be used in sln file

* update sample projects

* Update generators.md

* Fix path in github workflow

* Put readme, gitignore and solution file at the root of generated project

* update sample projects

* Remove the projectGuid option

This Guid need to be constant, it is related to project type

* update sample projects
2024-11-07 20:28:29 +08:00
Anders Lien
e2553a4a91
Copy escapeReservedWord implementation from python generator (#20035) 2024-11-07 20:00:06 +08:00
Linh Tran Tuan
cfef948c11
[Rust-Axum] [Breaking Changes] Prevent Operation response with internal Error (#20047)
* [Rust-Axum] Fix: prevent Operation returns Internal Server Error

* Update
2024-11-07 18:39:51 +08:00
Jules Ivanic
86758747c2
Fix #20044 (#20045) 2024-11-07 09:50:51 +01:00
Cameron Koegel
98cd9bd803
[typescript-axios] Respect User Supplied Header Params (#20040) 2024-11-06 18:01:59 +01:00
Jonathan Ballet
57cfff1950
python: stronger typing for the "configuration" module (#20014)
* python: strong typing for the configuration module

* 3.8 compatibility

* fix bearer format

* Specific auth settings
2024-11-06 16:36:47 +08:00
devhl-labs
54920ff106
[csharp][generichost] Better handling of duplicate operation ids (#19913)
* fixed missing output

* bug fix

* add new sample

* build samples again

* delete sample

* move the sample and add to github workflow

* remove model not needed for this test

* handle specs with no models

* better handling of duplicate operation ids

* fixed mistake in resolving conflicts

* build samples again

* revert a change sent in another pr
2024-11-06 16:29:49 +08:00
devhl-labs
f98073d508
Refactor copy lambda (#19983)
* comment out broken tests

* refactored copy lambda

* added tests
2024-11-06 16:29:17 +08:00
Aaron Pritzlaff
b51b18e3ca
Scala cask api effects (#19936)
* Scala-cask improvements:

 * fixe for grouped methods which have routes containing dashes.

Previously our OperationGroup work-around would potentially
Create methods like ‘foo-bar’, which isn’t a valid function name

 * Fix to not import some.package.Array[Byte] when binary format is specified

 * Fix for grouped operations which contain duplicate query parameters

 * Fix for binary response fields. This can come up with the following example

        "responses" : {
          "200" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "format" : "binary",
                  "type" : "string"
                }
              }
            },
            "description" : "data"
          },

 * Fix for enum model classes
Extracted complex logic for ‘asData’ and ‘asModel’ transformations for properties

 * Introduced a generic effect F[_] for services

This was done to support composable services
(Service A calls Service B) by using monadic
Effect types (ones which can flatMap)

 * Fixed unique union types for responses, asModel and asData fixes for non-model types

* scala-cask: regenerated samples

* Fix for reserved-word properties in the API

* Fix for null imports and reserved-word enum types

* Fixes for api methods with backticked params

* Fix for duplicate (by name) grouped params

* small syntax fix

* logging response type

* Regenerated samples

* String.format fix
2024-11-06 16:14:31 +08:00
Linh Tran Tuan
cded99c3fc
[Rust-Axum] Support Authentication (Cookie, API Key In Header) (#20017)
* [Rust-Axum] Support Cookie Authentication & API Key In Header

* Fix

* Fix

* Fix Header Params & Responses
2024-11-06 16:13:00 +08:00
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