Compare commits

..

809 Commits

Author SHA1 Message Date
Jaime Sánchez
3c664d1a59
[java] [spring] Fix multipart optional params error compilation using delegates (#20793)
* fix spring multipart optional parameters

* use optional only in not required params

* remove debug line

---------

Co-authored-by: Jaime Sanchez <jaime.sanchezf@externos.santalucia.es>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-30 14:28:38 +08:00
Andrew Wilson
76540e591f
Improve Kotlin Misk OpenApi Generator (#21165)
* first pass

* fixing types

* fixing action

* updating samples

* updating files

* adding guido

* fixing misk

* removing old files

* cleaning generated files

* cleaning generated files

* adding back in license

* first pass

* second pass

* third pass

* typo

* fixup

* fixup 2

* fixup 3

* fixup 4

* fixup 5

* fixup 6

* fixing api override

* fixing docs

* fixing docs json

* fix misk version

* add action prefix

* fixup

* fixup 2

* fixup 3

* fixup 4

* fixup 5
2025-04-30 01:53:32 +08:00
kenji yoshida
56eb8f7bc9
update akka-http and pekko-http server generator and example (#21166) 2025-04-30 01:46:49 +08:00
Akihito Nakano
3bac186b2f
Fix the layout issue in the donation message (#21184)
The emoji might not render correctly for Windows users.
2025-04-30 01:45:41 +08:00
William Cheng
d04c0ddbb4
minor fix to javadoc (#21177) 2025-04-29 15:58:16 +08:00
RickyMa
afa135f93d
[cpprestsdk] Support passing enum request parameters (#20836)
* [cpprestsdk] Support passing enum request parameters

* Add a fake endpoint to test enum request parameters

* Add auto-generated sample codes

* Update to date with master branch

---------

Co-authored-by: leslizhang <453688819@qq.com>
2025-04-29 15:54:07 +08:00
Simon Podlipsky
2327562af4
fix(php-nextgen): do not call static methods dynamically (#21163) 2025-04-29 15:29:52 +08:00
martin-mfg
daeffde719
fix vertxFuture setting (#21176) 2025-04-29 15:07:30 +08:00
martin-mfg
9a289e9713
adjust jersey2/jersey3 templates (#21171)
* respect useJakartaEE in jersey3

* useJakarteEE=true in jersey3 samples

* don't force jakarta package for jersey3

* adjust whitespace between jersey2 and jersey3

* enforce useJakartaEe for jersey3, warn on misuse for jersey 2

* set useJakartaEe for jersey3, generate samples
2025-04-29 15:01:43 +08:00
martin-mfg
3fadfe3889
fix documentation versions (#21175) 2025-04-29 15:01:16 +08:00
Oliver Fast
65c312653a
fix(typescript-fetch): Use null as a value when the date value is nullable (#21133)
* fix use null when available for dates

* generated typescript-fetch-default-v3.0 sample

* ran all typescript examples
2025-04-28 10:59:48 +02:00
William Cheng
29b6b771d7
add unified.to to bronze sponsor list (#21160) 2025-04-27 23:58:17 +08:00
William Cheng
9eefc09487 update readme 2025-04-27 22:07:23 +08:00
William Cheng
dbf720c093
Prepare 7.14.0 release (#21159)
* Revert "v7.13.0 release (#21157)"

This reverts commit 4b805ff6b7ac5bd2557555810357569fe2677311.

* prepare v7.14.0 release

* update samples
2025-04-27 22:04:03 +08:00
William Cheng
4b805ff6b7
v7.13.0 release (#21157) 2025-04-27 21:02:20 +08:00
Mattias Sehlstedt
10fc9d07c7
Single request parameter equals and hashcode (#20833)
* Align indentation

* Add equals and hashcode to singleRequestParameter static class

* Add missing sample updates that were affected by new imports

* add restclient sample

* update FILES, chmod=+x

* Update samples with jakarta annotations

* Updates samples

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-04-27 16:46:01 +08:00
Renuka Fernando
858d5fd8b7
Set appropriate statusCode from examples (#19501)
Issue: OpenAPITools/openapi-generator#19446
2025-04-27 15:18:28 +08:00
Lucas Reeh
f656afcde3
Add original enumPropertyNamingType config for java enum generation (#20824) 2025-04-27 15:00:51 +08:00
roseatromero
de310f6ee1
Fix associative container on json values (#20606) 2025-04-27 00:17:52 +08:00
William Cheng
1850c07951 update samples 2025-04-27 00:16:39 +08:00
martin-mfg
9f3a73f81a
[spring]addition: api response examples + spring generator generates response examples (#17610, #16051) (#20933)
* addition: api response examples; spring's api.mustache generates response examples

* update samples

* added 2 sample configs; adsjuted to only generate examples for application/json

* added test

* remove accidentally added files

* small cleanup

* add new samples to workflow

---------

Co-authored-by: GlobeDaBoarder <glebivashyn@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-27 00:10:09 +08:00
Ross Sullivan
35ba0414fb
[rust] Fix for allOf multi model with only metadata fields (#20892)
* Fix for allof multi model with only metadata fields

* Update samples

* fixed compiler errors in java 17 and lower

* refactored isMetadataOnlySchema to ModelUtils.java
2025-04-26 23:44:56 +08:00
Mattias Sehlstedt
1eee6038df
Fixes so that a oneOf schema with a single sub-schema is simplified (#21043)
* Fixes so that a oneOf schema with a single sub-schema is simplified when SIMPLIFY_ONEOF_ANYOF is set to true

* Adjusts oneOf_array test to ensure that it is generated as an interface instead of being simplified

* Update ruby samples so that they no longer refer to a model that is now gone due to the schema being simplified
2025-04-26 22:53:21 +08:00
David Riddervold Marconis
02204d0e4b
fix: [csharp] JsonConverter anyof (#21137) 2025-04-26 22:21:02 +08:00
paul-kraftlauget
bbc0b4a79f
[kotlin-client][jvm-spring-restclient] Fix metrics URI templating for RestClient (#21149)
Spring configures uriTemplate attribute and not generated code
2025-04-26 22:20:16 +08:00
paul-kraftlauget
f9549479c9
[kotlin-client][jvm-spring-webclient] Fix metrics URI templating for WebClient (#21148)
Spring configures uriTemplate attribute and not generated code
2025-04-26 22:19:39 +08:00
Bruno Coelho
e3db6a6257
[swift][client] update migration docs (#21151) 2025-04-26 22:14:37 +08:00
Ross Sullivan
1c62f839c5
Fixed Rust model files not matching module imports causing compiler errors (#21134)
* fix(rust): Fixed Rust model files not matching module imports causing compiler errors

* chore(rust): Update samples with a duplicate model test

* update samples

---------

Co-authored-by: Ross Sullivan <rosssullivan101@gmail.com>
2025-04-26 22:03:28 +08:00
William Cheng
178f1c9641
update maven plugin dependency versions (#21153) 2025-04-26 22:00:03 +08:00
Bruno Coelho
f950ac97e8
[swift][client] make QueryStringEncodable return any Sendable (#21142)
* [swift][client] make QueryStringEncodable return any Sendable

* [swift][client] rename QueryStringEncodable to ParameterConvertible

* [swift][client] update migration docs

* Revert "[swift][client] update migration docs"

This reverts commit 00a490536df393c4075e3e739b2e33446f614988.

* [swift][client] rename QueryStringEncodable to ParameterConvertible
2025-04-25 14:40:58 +01:00
William Cheng
44c342bddd fix travis test build failure 2025-04-25 18:11:02 +08:00
William Cheng
35b94dff7a
[csharp] fix "Simplify 'default' expression (IDE0034)" messages (#21147)
* [csharp] reduce IDE0034 messages in generated code

* [csharp] regenerate all samples

---------

Co-authored-by: Fabian Buchenberger <37747351+ffabss@users.noreply.github.com>
2025-04-25 18:01:14 +08:00
xtroce
6ee94d636b
issue-20718 fixed code generation for jersey2/3 and okhttp-gson when using modelMapping with a package and anyOf/oneOf (#20721)
Co-authored-by: Sebastian Droeppelmann <sebastian@d-liver.solutions>
2025-04-25 17:13:36 +08:00
Paul Horton
bdb063f170
fix: Support PathParams not of primitive types for Go in generated tests (#21107)
* fix: Support PathParams not of primitive types for Go in generated tests

Signed-off-by: Paul Horton <phorton@sonatype.com>

* use tabs consistently

---------

Signed-off-by: Paul Horton <phorton@sonatype.com>
2025-04-25 17:09:11 +08:00
ふぁ
5a9f973e91
[dart-dio] Fix the version of the sample dependencies (#20797)
* [dart-dio] Fix the version of the sample dependencies

* update

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-25 17:06:29 +08:00
saulgillEST
c14c7a0421
Enhancement: Allow MergedSpecBuilder title, version and description to be configured #20822 (#20839) 2025-04-25 16:44:41 +08:00
Michael Düsterhus
27a705efd5
[fix][java]Add missing generated annotation to Authentication.mustache (#21125)
* Add generated annotation to Authentication.mustache

* Update Authentication.mustache jersey2

* Update Authentication.mustache jersey3

* Update Authentication.mustache okhttp

* Update Authentication.mustache restclient

* Update Authentication.mustache resttemplate

* Update Authentication.mustache vertx

* Update Authentication.mustache webclient

* doc: regenerate samples
2025-04-25 16:35:51 +08:00
Julian Kalinowski
f9dedd74ec
[kotlin] [multiplatform] [jvm-ktor] Fix formdata file upload (#21056)
* fix: kotlin multiplatform form-data file upload

* generate samples

* fix form data binary for jvm-ktor
2025-04-25 16:30:25 +08:00
Enrique Fernández
be77442bff
feat: support bearer authentication (#21110) 2025-04-25 16:17:32 +08:00
William Cheng
3fa806006b
[python-fastapi] update h11, httpx to newer versions (#21145)
* update h11 to newer versions

* update httpx to newer version
2025-04-25 16:14:26 +08:00
Enrique Fernández
0462bed734
fix: wrong typespec generation for all-of with single ref (#21139) 2025-04-25 16:06:06 +08:00
Łukasz Suski
d02c0f493e
[Kotlin] [Retrofit2] [Coroutines] [Client] Option to remove Response<> wrapper in operation return types (#20613)
* Add useResponseAsReturnType option to kotlin, jvm-retrofit2 and coroutines api template (#15491)

* Add useResponseAsReturnType flag to kotlin-jvm-retrofit2-coroutines.yaml sample

* Generate sample
2025-04-25 08:45:47 +01:00
jase
dfbe985db3
fix(typescript-angular): enable "exactOptionalPropertyTypes" and ensure assignments align with type definition (#20451)
* fix(typescript-angular): enable "exactOptionalPropertyTypes" and ensure assignments align with type definition

* fix(typescript-angular): update condition checks to explicitly compare with undefined

* chore(gradle): add autogenerated properties file for OpenAPI Generator
2025-04-23 14:08:21 +02:00
CG
a7159f6bcb
[BUG][kotlin-spring] Fix defaultValue for RequestHeader is not generated (#20504) (#21003)
* [BUG][kotlin-spring] Fix defaultValue for RequestHeader is not generated (#20504)

* revert apiDelegate changes

* fix: fix unresolved reference for enum type
2025-04-23 17:25:47 +08:00
William Cheng
3b6b55144d
fix gradle.properties in java client (#21129) 2025-04-23 17:05:04 +08:00
Kai-Uwe Hüber
28daa68943
Check if enum_values exists in the serverUrl [csharp] (#21122)
* check if enum_values are existing

If no enum_values are given for in a serverUrl, the check must be ignored.

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-23 16:26:41 +08:00
Ronan Pozzi
d589f5db11
[java][native]Delete unused gradle.properties template in native library (#21128)
The gradle.properties.mustache template was empty. Removing this override allow to specify gradleProperties while using native library

Co-authored-by: Ronan Pozzi <ronan-pozzi@asys.fr>
2025-04-23 16:23:35 +08:00
Ross Sullivan
caf22add95
[rust] Fixed nullable byte arrays (#20720)
* [rust] fixed nullable byte arrays

* Updated tests and samples

* updated type test

* Added double option support

* updated samples
2025-04-23 16:13:53 +08:00
jheyens
e767496357
Jersey2: Move setting of authentication parameters before generating target URL to consider API keys in URL parameters (#20688)
* Move setting of authentication parameters before generating target URL to consider API keys in URL parameters

* Regenerate Jersey2/3 examples
2025-04-23 16:04:26 +08:00
João Brilhante
d2e20253e4
[java][restclient] Fix model combining properties and additional properties (#20947) 2025-04-23 15:57:57 +08:00
Henrik Gerdes
abce11152e
fix(fastapi): use correct impl & package name with custom values (#20970)
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-04-23 15:57:21 +08:00
30p87
ee7927a525
[Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315) (#21016)
* [Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315)

* Properly implement samples, fixing build issues

---------

Co-authored-by: Tobias Fischer <t.fischer@goldflam.de>
2025-04-23 15:47:17 +08:00
PidgeyBE
72de5bc952
[Python] Fix the post processing of string enums (#20976)
* fix/ x-enum-varnames in python

* make x-enum-varnames examples more clear

* make x enum varname usage more explicit

* fix tests

* trigger tests

* trigger tests once again...

* fix more tests
2025-04-23 15:45:44 +08:00
Simon Podlipsky
d4d14204e8
fix(php-nextgen): always return if not void (#21119) 2025-04-23 15:40:57 +08:00
jheyens
a66dd20783
Jersey2: Do not reinitialize ClientConfig with default values when building HTTP Client (#20687)
* Do not reinitialize ClientConfig with default values when building HTTP Client

* Regenerate Jersey2/3 examples
2025-04-23 15:24:22 +08:00
Juan Treminio
346231083f
[PHP] - Add FormDataProcessor to handle nested ModelInterface data (#20990)
* [PHP] - Add FormDataProcessor to handle nested ModelInterface data

* Generating samples

* Updates php-nextgen and psr-18

* Adds tests

* Some more tests

* One last test

* Updating files

* Fixing diff

* Test fix

* Updating samples
2025-04-23 15:16:47 +08:00
Kevin Lin
b844d8d4cd
[Java] ApiClient: support deserializing from InputStream instead of String to bypass 2GB Java String limit (#21115)
* ApiClient: support deserializing JSON from InputStream instead of String to bypass 2GB Java String limit

* Update test_file_list.yaml
2025-04-23 14:59:02 +08:00
Antoine Reilles
338f7f2a09
cxf file upload should only present Attachment (#21124)
The InputStream is not necessary, as it can be obtained from the
Attachment object via getInputStream().
2025-04-23 14:53:42 +08:00
Jenny G. L.
80ab53b2ce
[scala][client]: scala-http4s scala3 client: minor improvement (allow empty string in optional enum to pass as None) (#21025)
* [scala][http4s][client]: add enum method; remove implicit

* improve error handling

* more enum enhancement

* remove unused

* update samle

* avoid breaking change

* [Scala][Client][HTTP4s]: when enum is optional, avoid throwing exception when it's empty string

---------

Co-authored-by: Jenny Leahy <jennyleahy@JENNYLEAHY.localdomain>
Co-authored-by: Jenny Leahy <jennyleahy@Mac.localdomain>
2025-04-23 14:21:33 +08:00
Enrique Fernández
3233eff187
[fix][elixir] faulty free-form object type spec (#21113)
* fix: faulty free-form object type spec

* add implicit free-form object example
2025-04-23 14:17:10 +08:00
Bruno Coelho
64d9719d39
[swift6][client] All models conform to Codable so this method should not be needed anymore (#21117)
* [swift6][client] All models conform to Codable so this method should not be needed anymore

* [swift6][client] All models conform to Codable so this method should not be needed anymore
2025-04-22 11:58:53 +01:00
Bruno Coelho
7f64d906a5
[swift6][client] Make it possible to opt out of JSONEncodable conformance (#21116) 2025-04-22 10:47:00 +01:00
Enrique Fernández
2fb59ff258
doc: remove references to petstore (#21111) 2025-04-21 15:42:09 +08:00
RickyRister
4c08ff865d
[Java][Vertx] Add option to generate methods that return Futures (#21083)
* [Java][Vertx] Add option to generate methods that return Futures

* run scripts

* update sample config and github workflow

* generate samples

* rerun script

* add vertx-no-nullable to samples workflow
2025-04-18 21:53:08 +08:00
Moritz Weber
c67b1132ec
[typescript-angular] add license information for BaseService (#21104)
The new BaseService was added in #20681, but the license information was not added.
2025-04-17 16:39:23 +02:00
Sri Sushma Karra
f9f5af5ed9
[JAVA][FEIGN] Removing hardcoded HTTP Client which is causing performance issues (#21085)
* [JAVA][FEIGN] Removing hardcoded HTTP Client

Fixing performance issues

* Updating samples for Java Feign performance betterment changes

* added APIClient.java for feign-hc5
2025-04-17 17:13:07 +08:00
Andrew Wilson
5e446b4147
[feat] [protobuf] Improve protobuf generator by adding custom options for api and model files (#21075)
* add custom options

* fixing docs

* typo
2025-04-17 13:11:34 +08:00
lucy66hw
b4378a6277
[Protobuf Schema] Map Field Handling in Composed Schemas (#21002)
* Address map under composed schema

Add explanation to code block

* add comment to explain the code block
2025-04-16 16:33:22 +08:00
Andrew Wilson
1136872cd5
[feat] [protobuf] Improve protobuf generator with switch useSimplifiedEnumNames (#21052)
* improving with simple enum names

* adding test case

* fixing docs

* fixing param name

* fix docs
2025-04-16 16:32:36 +08:00
devhl-labs
ffefebdd88
[csharp] Process webhook operations (#21082)
* process webhook operations

* process webhook operations

* build samples
2025-04-16 16:30:53 +08:00
NavruzshoevDaniel
7a57b80955
[BUG][Kotlin][WebClient] ApiClient is not compatible with spring-web 6 Observation API (#21020) 2025-04-16 15:25:22 +08:00
Gregory Merlet
a94b8f90ca
Fix typescript-fetch broken files when mixing basic types and refs in oneOf (#21057)
* feat: add test-array endpoint and TestArrayResponse schema to oneOf.yaml

* feat: enhance oneOf handling in TypeScript code generators with string and array support

* fix: correct type checks for string and object arrays in modelOneOf.mustache

* refactor: remove oneOfStringEnums handling and simplify oneOf logic in TypeScript code generators

* chore: update samples

* refactor: remove unnecessary string oneOf checks in TypeScriptFetchClientCodegen
2025-04-14 14:14:25 +02:00
Richard Jacks
79b1cc5d5e
Update jQuery.min.js from 1.8.3 to 3.7.1 (#20977) 2025-04-13 23:06:00 +08:00
Beppe Catanese
c22d790249
[POSTMAN] Include response examples (#21073)
* Extract response examples

* Add response examples to spec

* Generate Postman samples

* Test samples
2025-04-13 22:22:27 +08:00
devhl-labs
ca1f02500f
fixed subpath bug (#21081) 2025-04-13 18:50:26 +08:00
takashno
dcb8b1a2dc
modify enum template. field should be final. add testcase & sample updates. (#21019) 2025-04-13 18:49:15 +08:00
jpfinne
4fc46cb0d4
Make the OpenAPINormalizer extensible (#20995)
* Make the OpenAPINormalizer configurable
Add comment to force rebuild

* Add documentation of NORMALIZER_CLASS

* Use default normalizeSchema() method and add a new skipNormalization method

* super.normalizedSchema() can proceed
2025-04-11 19:19:56 +08:00
Tanmay Mohapatra
b1de687c7f
[julia] better serverside validation code (#21072)
* [julia] better serverside validation code

Updating the code generated for julia server to add more checks in the validation stage of incoming requests. Particularly adds checks for request body and required parameters. Updates the generated models with some helper methods that are used in validation filter.

* bump OpenAPI.jl version to use for CI
2025-04-11 02:00:29 +08:00
William Cheng
6da343a8ad update samples 2025-04-09 17:53:11 +08:00
Knuf
9c5722b9f6
Added HttpClient5 flavour to Java OpenFeign client generator. (#21007)
* Added HttpClient5 flavour to Java OpenFeign client generator.

* Converted templates intendation to spaces.

* Added the new sample folder to GH wf so that the CI can test the change.

* Added the missing auto-generated docs/samples files.

* Converted indentation to spaces also in the modified Java class.
2025-04-09 17:40:16 +08:00
William Cheng
86a8e52d08
Add tests for scala sttp client (jsonLibrary: circe) (#21061)
* add tests for scala sttp circe

* use jdk 11

* test with jdk 17

* fix

* test in circleci

* remove finch
2025-04-09 17:19:06 +08:00
Jorge Rodríguez Martín
89f0f7556f
[Java][Spring] Ensure EnumConverterConfiguration.java is generated when interfaceOnly=true in Spring Generator (#21000)
* Ensure EnumConverterConfiguration.java is generated when interfaceOnly=true in Spring Generator

* Add samples
2025-04-09 17:10:39 +08:00
Julian Kalinowski
bf67367fa1
fix: kotlin multiplatform form-data enum params (#21053) 2025-04-09 09:15:28 +01:00
Basil Mironenko
4048942485
[BUG] [scala-sttp] [circe] Generate circe encoder and decoder for inline enumeration (#21028)
* Generate circe encoder and decoder for inline enumeration

* Add missing circe-generic dependency, and the corresponding circeVersion property.

---------

Co-authored-by: Basil Mironenko <basilm@mosaicpower.com>
2025-04-09 16:02:34 +08:00
Nicolas Rodriguez
6bf528950f
[crystal-lang] Various fixes for Crystal client (#21045)
* fix(crystal): allow users to YAML.dump(model) to ease debug

* fix(crystal): make optional parameters truly optional

* fix(crystal): don't send query parameters when parameter is nil

* fix(crystal): implement cookie Auth

* fix(crystal): fix ameba warnings

* fix(crystal): update sample app specs
2025-04-09 15:04:00 +08:00
Enrique Fernández
dcd9463e88
[feat][elixir] use elixir 1.18 built-in json module (#21039)
* feat: replace jason by built-in json encoder/decoder

* chore: update samples
2025-04-08 12:47:37 +02:00
Curd Becker
7a3ea2872a
Fix single quote escaping for python code generator (and its test) (#21021)
Hard to spot, but in Java the strings "'" and "\'" are identical, so
the implementation and its test were broken identically.
2025-04-08 01:10:09 +08:00
david-aeqium
63afd455f7
Fixes mapValues runtime inefficiency in typescript-fetch (#21047)
* fixes mapValues runtime inefficiency in typescript-fetch

* adds regenerated typescript-fetch samples
2025-04-07 10:02:59 +02:00
Tobias
047ceeaa45
Add unity 2019 support and update samples (#21036) 2025-04-07 01:02:14 +08:00
Juan Treminio
6b13ad522f
[PHP] - Add range HTTP code support (#20992)
* [PHP] - Add range HTTP code support

* Adding response body to 200

* Fix diff; update php-nextgen sample

* Working on unit tests

* Removes dangling files

* Finalize tests

* Remove dangling files

* Add tests for no response body exception
2025-04-07 00:50:58 +08:00
Gijs Blanken
5f41acfe79
add #report when handling exceptions in the api (#21023) 2025-04-07 00:46:33 +08:00
Aran Donohue
b2abf36af6
feat: [Rust][client] Add option to use rustls for reqwest instead of openssl (#21001)
* feat: [Rust][client] Add option to use rustls for reqwest instead of openssl

* generated changes

Summary:

  ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
  ./bin/utils/export_docs_generators.sh || exit
2025-04-07 00:42:23 +08:00
Andrew Wilson
9bac31859c
Improving Misk Kotlin Server Generator (#20973)
* first pass

* fixing types

* fixing action

* updating samples

* updating files

* adding guido

* fixing misk

* removing old files

* cleaning generated files

* cleaning generated files

* adding back in license
2025-04-04 15:37:49 +08:00
William Cheng
04169ec29b update crystal samples 2025-04-03 01:39:13 +08:00
Nicolas Rodriguez
c4a6c4a542
[crystal-lang] Various fixes for Crystal client (#21011)
* fix(crystal): fix typos in Crystal templates

* fix(crystal): various fixes for partial_oneof_module.mustache Crystal template

1. `class << self` doesn't exist in Crystal, you must prefix class methods with `self.`
2. use double quotes for String litterals (simple quotes are for Char litterals)
3. global `private` keyword doesn't exist in Crystal, you must prefix private methods with `private`
4. you must specify types when using `each_with_object({})`

* fix(crystal): add isKeyInCookie in Crystal configuration.mustache

* fix(crystal): wrap `rescue` in a `begin`

* fix(crystal): use Spectator shard to run tests (`described_class` is not available in Crystal std lib)

* fix(crystal): dry tests

* fix(crystal): enable some API tests, mark others as pending

* fix(crystal): update samples

* fix(crystal): update sample app specs

* fix(crystal): install development dependencies
2025-04-02 20:19:25 +08:00
Simone Dalcastagné
c761f11a18
feat: avoid warning (#21012) 2025-04-02 10:29:13 +02:00
Tanmay Mohapatra
8375b96535
[julia] fix regex escape on server codegen (#21009)
* [julia] fix regex escape on server codegen

Fixed escaping of regex patterns on julialang server codegen.

* add comment for the escapeRegex method

* simplify
2025-04-02 13:50:30 +08:00
Bodo Graumann
8e329feb6a
[typescript] Use static middleware when calltime options exist but specify no middleware (#20985)
* Keep static middleware when options contain no middleware field

* Regenerate samples

* Fix indentation and quotes

* Extract middleware merge logic into function

* Regenerate samples

* Simplify extracted functions

* Regenerate samples

* Fix: Pass static config when no options are given for inversify

* Fix: Allow overriding http api with options

* Regenerate samples

* Use default parameter for default middlware merge strategy

* Throw exception for failed match within switch block
2025-04-01 20:11:07 +02:00
Bodo Graumann
7881152dc8
[typescript] Avoid code duplication (#20978)
* Update test dependencies to make them run

* Use spaces instead of tabs

* Remove duplicate test

* Remove unused variable

* Add failing test for missing options

* Move config merge logic into shared function

* Regenerate samples

* Move option wrap logic into shared function

* Regenerate samples

* Inline wrapOptions call

* Regenerate samples

* Clean up code formatting

* Regenerate samples

* Separate mergeConfiguration definitions

* Regenerate samples

* Rename parameters

* Regenerate samples

* Add missing semicolon

* Revert inlining wrapOptions call

* Revert format changes in untouched lines
2025-04-01 13:13:54 +02:00
Ivan Vaskevych
a8d56fd8ce
Fixes the non-working query parameter when it's an Enum (#20210)
* Fixes the non-working query parameter when it's a Enum

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

Co-authored-by: Alexey Makhrov <amakhrov@gmail.com>

* Fixes the tags order

* Adds Echo API client tests for typescript: step 1

* Adds Echo API client tests for typescript: step 2

* Updates samples

* Fixes updated samples

* Fixes the fix

* Fixes the example config

---------

Co-authored-by: Alexey Makhrov <amakhrov@gmail.com>
2025-04-01 10:13:27 +02:00
William Cheng
587fcff85c update java samples 2025-04-01 15:05:12 +08:00
Tomschi
4f3726ecfd
#11737 Add package to bean name in converter.mustache for EnumConverterConfiguration.java (#17738)
* Add package to bean name in converter.mustache for EnumConverterConfiguration.java.

* Fix samples for EnumConverterConfiguration.java.
2025-04-01 14:48:14 +08:00
Trent Clever-Nadeau
56dd63525c
[Rust-Axum] Allow use of array query params (#20861)
* [Rust-Axum] Allow use of array query params

* Add sample per PR request
2025-04-01 14:29:21 +08:00
lucy66hw
3b0bb0a73d
[Protobuf Schema] Add Support for Multiple Response (#20989)
* Protobuf Schema Support Multiple Response

* change the supportMultiple response to true

* address build failure

* address build failure
2025-03-31 15:31:07 +08:00
Greg Knox
36287acfd6
[JAVA][BUG] formParams.mustache should contain @FormParam, not @QueryParam (#20991) (#20993)
* formParams.mustache should contain @FormParam, not @QueryParam (#20991)

* updated samples; form parameters are declared using @FormParam, not @QueryParam (#20991)
2025-03-30 22:37:06 +08:00
Juan Treminio
c6e2a5fa94
[PHP] - Removes trailing comma from ::flattenArray() (#20988)
* [PHP] - Removes trailing comma from ::flattenArray()

* Removes "mixed" type

* Missed one mixed
2025-03-30 01:08:52 +08:00
koenlavooij
5e5832d982
Javalin fixes and validation (#20981)
* Fix for problems when a nullable parameter has a default value

When a default value is present the parameter is moved to non-nullable. This works because we could replace the null with a default value. This will actually set the default value.

* Adds (optional) validation to the beans.

Option to set: `useBeanValidation` to `true`. This will insert validation rules from the `jakarta.validation` package much like it does with the spring generator.

Aso sneaked in `JsonProperty` annotations in order to more formally adhere to the name in the spec as opposed to configuring ObjectMappers in order to translate names to match the spec.

* Update samples

* Fix for required headerParams
2025-03-30 00:58:48 +08:00
hackerman
045a9c16b1
fix: support backwards compatible changes in discriminators (#20983)
Closes https://github.com/OpenAPITools/openapi-generator/issues/20982
2025-03-27 17:19:16 +01:00
Bruno Coelho
701b6bd576
[kotlin][client] make kotlinx serialization configurable (#20955)
* [kotlin][client] make kotlinx serialization configurable from outside

* [kotlin][client] make kotlinx serialization configurable from outside
2025-03-26 10:19:24 +00:00
Cameron Koegel
11c56117d2
[typescript-axios] Add Api and Model Docs (#20969)
* [typescript-axios] Add Api and Model Docs

* update templates for no `npmName`

* generate samples
2025-03-26 09:57:52 +01:00
William Cheng
bd9d93db89
minor improvements to kotlin musk generators (#20968) 2025-03-25 23:17:02 +08:00
Nicolas Vervelle
8ca3543436
Issue 20804: Add java nullability annotations (#20806)
* issue-20804: Add nullability annotations to Java generated clients

Motivation:
Be able to use generated clients in code checked by tools like NullAway.

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

Motivation:
Be able to use generated clients in code checked by tools like NullAway.

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

Motivation:
Be able to use generated clients in code checked by tools like NullAway.
2025-03-25 23:01:17 +08:00
Andrew Wilson
d81b5a37d1
#20883 - Add new Misk Kotlin OpenAPI Generator (#20885)
* first pass

* Fix extra new line

* adding generator file

* Run new.sh script

* Fix template directory and ignore failing tests

* fixing up content type

* adding controller impl

* cleanup interface

* typo

* removing bodytype

* adding protos

* fixing 2

* Fix headerParamsSimple

* removing protos etc.

* fixing imports

* removing commented code

* fixing imports

* fixing return

* fixing file

* adding comment

* remove adminapi

* move to jakarta

* reverting break

* fixing httpMethods

* pushing mediaTypes

* Adds gradle mustache templates

* Setup simple build.gradle.kts

* Adds basic model.mustache for model generation

* fixing summary

* fixing summary 2

* Removes unnecesssary line

* fixing return type

* fixing override

* fixing httpcall

* Delete proto folder creation

* fixing return type

* fixing void return type

* fixing space

* removing reactive

* removing imports

* Fixing spacing

* Fixing tabbing

* fixing headers

* add comment

* Adds unit tests

* cleanup

* Correct getHelp() description

* cleanup 2

* removiing pathParams files

* fixup

* fixup 3

* removing more files

* Adds GitHub Workflow generation

* removing form params as not required

* Adds tests for OptionsProvider

* Renamed file to match

* remove whitespace

* remove whitespace

* adding documentation

* adding documentation

* removing swagger annotations

* adding tests

* Adds Guice Module

* Grab OpenAPI title to generate module name

* Revert "Grab OpenAPI title to generate module name"

This reverts commit 9c9b935f5dbee6e0974ebf66b4f611f107df70c2.

* Update sample

* Removes moduleFileName additional property

* adding tests

* adding tests 2

* adding tests 3

* adding tests 4

* added media types

* re-adding tests

* fixing camelcase

* fixing mediatypes

* default mediatype

* adding validation

* adding validation

* removing swagger

* adding gradle dependency

* adding gradle dependency

* fixing types

* fixing return types

* fixing tests

* final fixes

* tweaks

* fixing file etc.

* Update samples/ folder

* fixing jakarta

* fixing jakarta 2

* fixing impl

* Fix unit tests

* fixing jakarta

* fixing jakarta 2

* final final final changes

* Fix initialization of BigDecimal for default values

* update samples, docs

* fixing RequestHeader

* fixing RequestHeader 2

* fixing RequestHeader 2

* add validateSpec=false

* fix pom version

---------

Co-authored-by: Guido Arnau <guido@squareup.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-03-25 22:43:30 +08:00
lucy66hw
c8cfa16a48
Add options to aggregate protos to one file (#20962) 2025-03-25 22:35:48 +08:00
Daniel Schreiber
16552755bf
feat(typescript-angular): update enum definitions to use 'as const' for improved type safety (#20958)
fixes #20809
2025-03-24 17:46:04 +01:00
Simon Podlipsky
07e5a674db
fix: escape operationIds before outputting them (#14475) 2025-03-24 14:19:58 +01:00
DavidGrath
0becb3feb7
[typescript-fetch] to fix incorrect parsing with additional properties (#20923)
* Fix issue #20195

* Ran export_docs_generators.sh

* Generated path separators fixed

* Trigger Build
2025-03-24 14:18:53 +01:00
Calvin Bascom
cd2fbd6ff4
Add support for normalizing bearerAuth (#20860)
The openapi 2.0 spec did not support bearer authentication but it was
added in openapi 3.0. In order to support client generation that
includes support for bearerAuth, this change adds a new feature to the
OpenapiNormalizer so that it can be configured to look for a specific
securityDefinition name and convert it to bearerAuth.
2025-03-24 19:39:40 +08:00
devhl-labs
550e31775d
[csharp][generichost] Fixed subpath (#20896)
* fixed path

* reverted part of change
2025-03-24 15:47:07 +08:00
Simon Podlipsky
62b176e95d
feat(php): drop support for EOLed PHP versions and unify min required version (#17826) 2025-03-24 13:59:01 +08:00
kenji yoshida
7d977b63dc
Update scala version (#20953) 2025-03-24 13:55:46 +08:00
devhl-labs
34c6c583cc
[csharp][generichost] Fixed string formatted as decimal (#20894)
* fixed string formatted as decimal

* build tests
2025-03-23 22:44:12 +08:00
William Cheng
8756ff7596 update samples 2025-03-23 21:50:11 +08:00
Jan van Rhijn
2ec6b53dfa
Fix issue with nullable values not validated when value is null Bug: 20525 (#20549)
* Do not check for token type null

* Update docs

* Fix CS8957 Target-Typed Conditional Expression

* Update samples

* Fix compile errors

* Update docs

---------

Co-authored-by: Jan van Rhijn <jan.vanrhijn1@akzonobel.com>
2025-03-23 21:45:15 +08:00
Dimitar Tomov
08ec37cc10
[kotlin-spring] Generate @Valid annotation on all RequestParts/Params for Multipart requests when useBeanValidation=true (#20864)
* [kotlin-spring] Generate @Valid annotation on all RequestParts/Params for Multipart requests when useBeanValidation=true

* [kotlin-spring] Fix failing test

The test was failing because of the newly added @Valid and an assert which is not correct anymore.
2025-03-23 18:31:18 +08:00
Youri Westerman
73b6b7084f
Drop python 3.8 support python 3.13 in python generator (#20909)
* Drop support for python 3.8 and add support for 3.13 in python generator templates

* Update docs

* Test samples without python 3.8 and with 3.13

* Generate samples
2025-03-23 18:10:32 +08:00
kenji yoshida
c749919812
fix deprecated old sbt build file syntax (#20949) 2025-03-23 18:03:29 +08:00
kenji yoshida
866558f9e7
Update sbt version (#20948) 2025-03-23 13:13:30 +08:00
kenji yoshida
24d2083684
update scala-akka-http-server generator (#20924) 2025-03-22 16:53:03 +08:00
Pavel
868074212a
[Java] Extend JavaSpring apiClient.mustache with option to override contextId for FeignClient (#20943) 2025-03-22 11:36:30 +08:00
lucy66hw
f3999109cb
protobuf import format (#20946) 2025-03-22 10:00:01 +08:00
martin-mfg
f39675b41a
cleanup (#20937) 2025-03-21 15:15:50 +08:00
Bruno Coelho
22b678764c
[Swift][client] fix parameters encoding (#20934)
* [Swift][client] fix parameters encoding

* [Swift][client] fix parameters encoding
2025-03-20 12:29:58 +00:00
takashno
6e3b1996ed
[java][spring] add useSpringBuiltInValidation option to disable @Validated at class level (fix #20899) (#20901)
* [java][spring] add useSpringBuiltInValidation option to disable @Validated at class level (fix #20899)

* Add sample and github workflow maintenance.
2025-03-20 17:41:02 +08:00
Juan Treminio
a4072c5ea9
[PHP] Bring PSR-18 composer.json inline with main (#20897)
* [PHP] PSR-18 composer.json to use composerPackageName

* Bring PSR-18 composer.json inline with main
2025-03-20 17:39:50 +08:00
Mihály Verhás
20db1e1590
Fix src/main/resources/JavaSpring/pojo.mustache to generate @Deprecated annotation unrelated to description. (#20905)
Co-authored-by: Verhas Mihaly <mihaly.verhas@intuitech.studio>
2025-03-20 13:54:08 +08:00
lucy66hw
1996d7e8fc
[protobuf-schema] Add flag to handle complex type (#20915)
* Wrap Complex Type

* update

* Add java doc and update test

* change default wrapComplexType to true

* add protobuf-schema-config-complex to CI

* add service proto to address CI failure
2025-03-20 13:22:40 +08:00
Enric Pou
a2ee3a7cfc
[dart-dio][timemachine] Bugfix: Ensure closing bracket when adding serializers (#20908)
* Ensure closing bracket when adding serializers

* Added samples
2025-03-20 01:30:51 +08:00
Juan Treminio
8f24df4165
[PHP] Fix converting objects to formdata (#20888)
* Output of CLI commands per PR comments

* Rebuilding PHP examples, PSR-18

* Rebuilding PHP examples

* Adds explanation for ::flatten_array(); optimized array_is_list pollyfill

* [PHP] Fix converting objects to formdata

* flatten_array -> flattenArray to match code style

* Adds unit test

* Revert "Output of CLI commands per PR comments"

This reverts commit 2eaa93731c354c9cb64a41187ba25a1b271cfdea.

* Includes php-nextgen; tightens up ::toFormValue()

* Missing ArrayAccess import

* Adds test for refactored ObjectSerializer::toFormValue()
2025-03-19 15:39:57 +08:00
William Cheng
8a8bacd0d5
udpate global setting tests (#20925) 2025-03-19 15:29:39 +08:00
dependabot[bot]
69e4336f67
Bump actions/setup-dotnet from 4.3.0 to 4.3.1 (#20916)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.3.0...v4.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-18 13:15:49 +08:00
Bruno Coelho
298d6c2200
[Swift][client] make alamofire version more flexible and build projects on CI before running unit tests (#20913)
* [Swift][client] CI first build the projects then run the unit tests

* [Swift][client] make alamofire version more flexible
2025-03-17 21:05:43 +00:00
Bruno Coelho
4c1257a2b6
[Swift][client] add identifier to each request (#20890)
* [Swift][client] add identifier to each request

* [Swift][client] add identifier to each request

* [Swift][client] CI first build the projects then run the unit tests
2025-03-17 21:05:21 +00:00
Lennard Sprong
31c1a86736
[swift6] Change JSONEncodable protocol to always return String (#20906)
* [swift6] Change JSONEncodable protocol to always return String

* [swift6] Upgrade Alamofire

* Add missing @Sendable attributes

* Fix APIHelperTests

* Fix URLSessionImplementations
2025-03-17 15:53:22 +00:00
Lennard Sprong
1eb8c58446
[swift6] Add typed throws to Validation functions (#20903) 2025-03-17 15:11:25 +00:00
Robinsstudio
02307dbf0c
fix: #20826 Update urllib3 requirement for Python generator (#20845)
* fix: #20826 Update urllib3 requirement for Python generator

* Fix test to use localhost instead of petstore.swagger.io
2025-03-17 18:26:57 +08:00
cagliostro92
995c6c5a88
fix(openapi-generator): fixes GlobalSettings (#20744)
* fix(openapi-generator): fixes GlobalSettings class to avoid ClassCastException when GlobalSettings#log is invoked

* fix(openapi-generator): sets GlobalSettings log level to debug
2025-03-16 22:03:03 +08:00
Yobyn Roetz
191eba4afa
replace all UriComponentsBuilder.fromHttpUrl() with UriComponentsBuilder.fromUriString() because UriComponentsBuilder.fromHttpUrl will be removed in the near future. (#20893) 2025-03-16 16:04:04 +08:00
Jarangutan
b1f572e116
[go-server] move errMsg helpers to helpers file (#20876) 2025-03-15 21:27:56 +08:00
dependabot[bot]
1c1365513f
Bump @babel/helpers from 7.20.13 to 7.26.10 in /website (#20867)
Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.20.13 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 23:26:24 +08:00
dependabot[bot]
a3fb8f59f8
Bump dorny/test-reporter from 1 to 2 (#20862)
Bumps [dorny/test-reporter](https://github.com/dorny/test-reporter) from 1 to 2.
- [Release notes](https://github.com/dorny/test-reporter/releases)
- [Changelog](https://github.com/dorny/test-reporter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dorny/test-reporter/compare/v1...v2)

---
updated-dependencies:
- dependency-name: dorny/test-reporter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 18:47:34 +08:00
Pietro Bongiovanni
5c51ee49a2
[Rust Server] Bump up env_logger to 0.11 (#20865)
* Bump up env_logger to 0.11

* regenerate examples

* regenerate examples
2025-03-13 18:45:50 +08:00
William Cheng
3ab495a0aa
Fix operationId mapping (#20846)
* fix operationId mapping

* add tests

* minor change
2025-03-12 20:28:18 +08:00
William Cheng
e40f9e3801 update C# samples 2025-03-12 18:18:16 +08:00
Jacob Ilsø
7f40ce0dd8
Use interfaces for Polly retry policies (#20821)
This enables use of ResiliencePipelineBuilder which returns the
interface when calling AsSyncPolicy / AsAsyncPolicy
2025-03-12 16:49:03 +08:00
Josh Keighley
7d9e1ecc22
Bump feign version to 13.5 from 10.12. (#20849) 2025-03-12 16:35:36 +08:00
Daniel Schreiber
8ead4b6e3f
[typescript-angular] fix: correctly serialize query params objects (#20850)
fixes #20799
2025-03-12 09:22:49 +01:00
William Cheng
0e34d39833
add tests, option for useVirtualHooks (csharp) (#20837) 2025-03-11 00:02:30 +08:00
mahmoud_ zeyada
21be5f5abc
fix(typescript-nestjs): handle query params serialization properly (#20755)
* fix(typescript-nestjs): handle query params serialization properly

* fix(typescript-nestjs): updated the samples for param serialization fix
2025-03-10 16:07:21 +01:00
Jarangutan
4ad76cc86c
[go-server] Moved helper code from router and updated logger for chi (#20823)
* [go-server] Moved helper code from router and updated logger

* [go-server] fixed imports for mux and chi

* [go-server] fix go-api-server sample test
2025-03-09 15:47:11 +08:00
Sam Ward
e8ae249cad
[csharp] Add useVirtualForHooks option (#20705) 2025-03-08 17:30:58 +08:00
Brian Ferri
cde0f551fc
[PHP-NEXTGEN] make allowable values enum getter static (#20820)
* [PHP-NEXTGEN] make allowable values enum getter static

* [PHP-NEXTGEN] make allowable values enum getter static
2025-03-08 16:39:48 +08:00
William Cheng
7f64246b20
use nim own petstore test spec (#20819) 2025-03-07 15:35:50 +08:00
lucy66hw
b528e4a7a7
[protobuf-schema] Support oneOf and AnyOf (#20798)
* handle primitive oneof

handle anyof

* Add oneof and anyof test in petstore
2025-03-07 15:10:07 +08:00
martin-mfg
74e49ac1d2
use java.io.Serializable (#20815) 2025-03-07 00:17:06 +08:00
Daniel Schreiber
ce0c0dcab0
[typescript-angular] fix: update basePath initialization to use template variable (#20816)
fixes #20760
2025-03-06 17:05:20 +01:00
David
ba2e50519d
improve documentation for RESOLVE_INLINE_ENUMS (#20812)
related to #20790
2025-03-06 18:28:45 +08:00
jpfinne
ffa196e6a9
Add x-implements for java enums (#20778) 2025-03-06 01:59:55 +08:00
Tyler Mairose
36b72052e6
Add tag and method filters during generation (#20801)
* Add Filter by tag and method under OpenAPINormalizer

* Update message for invalid filters

* Update customization documentation with new filters

* Add comment for new code block
2025-03-06 01:49:47 +08:00
Julien Debon
123119c076
Add the dependencies in the generated Opam file (#20805) 2025-03-05 19:38:41 +08:00
William Cheng
890c758fd8
Add github workflow for OCaml samples (#20802)
* add github workflow for ocaml sample

* trigger build

* test with 5

* install dune

* install yojson

* install others

* install

* add name

* trigger build failure

* Revert "trigger build failure"

This reverts commit be35b26a83a1c961315d53b474658fbd5ff5fa62.

* test with 5

* pin versions
2025-03-05 18:07:44 +08:00
sabra
f2bbb9e0a2
[java] generateClientAsBean for restclient and webclient (#20754)
* [java] generateClientAsBean for restclient and webclient

Added possibility to generate restclient and webclient as a @Component in the same fashion as resttemplate.

Fix #17885
Fix #19229

* - Samples
2025-03-05 17:50:24 +08:00
Jakob Warkotsch
efc53f5d47
[JavaScript] Avoid undefined headers with skipDefaultUserAgent enabled (#20792)
Prior to this commit, a JS client generated with skipDefaultUserAgent
enabled results in a src/ApiClient.js file that doesn't define
this.defaultHeaders. This breaks because this.defaultHeaders is later
directly passed to a superagent request which expects an object and not
undefined.

Fixes #20791.
2025-03-05 17:36:07 +08:00
Julien Debon
0f13dfedb9
[OCaml] Fix default optional list (#20789)
* Cleanup the existing model template

* `{{^isContainer}}foobar{{/isContainer}}{{^isContainer}}` is equivalent to `{{^isContainer}}foobar`
* Add indentations to make it easier to read the template. The generated code is
uglier, but it is ok since users are encouraged to reformat anyway

* Add a default value for non-required lists

Closes https://github.com/OpenAPITools/openapi-generator/issues/20777
2025-03-05 01:41:21 +08:00
lucy66hw
c96d3088c5
[protobuf-schema] Use snake_case for protobuf fields, UPPER_SNAKE_CASE for enums. (#20696)
* protobuf enum prefix use upper underscore

Add json name parameters and change parameter field name to snake case

* rerun generate-samples.sh

* Add CI test

* rebase master

---------

Co-authored-by: xil <xil@uber.com>
2025-03-04 17:18:07 +08:00
Julien Debon
90de8dcd75
[OCaml] Add key to each model field (#20766)
* Add key to each model field

Add a `[@key "someField"]` annotation to each model field, to avoid mismatches when the JSON field is not in snake_case.

Closes https://github.com/OpenAPITools/openapi-generator/issues/20765

* update ocaml samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-03-04 16:49:27 +08:00
martin-mfg
a018c10c70
fix Maven plugin tests (#20782)
* fix maven test

* fix another maven test
2025-03-04 10:42:44 +08:00
Ron Reynolds
2cff152e2a
adding Intellij style xml and applied to all java code (#20734)
* added intellij-codestyle.xml and sample of it being applied to some java code-gen classes

* code-format changes ONLY

* few more format changes since last merge with master

* applied code-style to all java one last time
2025-03-04 01:44:48 +08:00
William Cheng
3ad5303f99 update samples 2025-03-03 19:29:07 +08:00
martin-mfg
2b8d496c80
[#19921] Add RFC 3339 compatible Jackson module for java.time types, regenerate samples (#20700)
Co-authored-by: Christian Beikov <christian.beikov@gmail.com>
2025-03-03 17:42:18 +08:00
Ron Reynolds
5cef0803b8
Java client enhanced Configuration with ApiClient Supplier (#20738)
* enhanced Configuration.mustache (thread-safe, lazy-eval, plugable factory

* removed comment in Configuration.mustache

* fresh samples
2025-03-03 13:52:10 +08:00
sandwoodK
e0b6b2bbc7
Fix nim code generation (#20752)
Same variable name declared multiple times in the same scope.
=> nim generated code does not compile.
2025-03-03 13:50:19 +08:00
Iurii Ignatko
af536f6205
Finalize [this-escape] warnings fixes in apache-httpclient (#20774) 2025-03-03 13:01:08 +08:00
Han van Venrooij
ecdd8b5442
Upgrade plexus-build-api (#20759) 2025-03-03 10:33:18 +08:00
Simone Dalcastagné
70df1170cc
fix: authorization values in Java modules (#20644) 2025-03-02 23:39:37 +08:00
Ross Sullivan
85ab65c4ca
Fixed allOf with only one model (#20716) 2025-03-02 23:33:00 +08:00
William Cheng
a79aad8420
Prepare 7.13.0 (#20758)
* Revert "v7.12.0 release"

This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.

* set version to v7.13.0-SNAPSHOT

* update samples

* update doc
2025-02-28 13:48:36 +08:00
William Cheng
afc27ef4bc
v7.12.0 release (#20757) 2025-02-28 12:12:26 +08:00
William Cheng
6e9a0559a8
[csharp] Set generichost as default (#20748)
* set generichost as default

* revert a java change

* comment out a java test

---------

Co-authored-by: devhl <shawnkanyer@gmail.com>
2025-02-27 18:06:27 +08:00
William Cheng
1c3eade94d
[java][spring] Add option optionalAcceptNullable to accept null values (#20746)
* add option to rollback accept null values

* update doc

* update tests
2025-02-27 17:21:51 +08:00
David Gamero
fc00a663e1
[typescript] middleware import file extension in api types (#20745)
* middleware import extension fix

* fix file extension

* remove laravel lib
2025-02-27 09:22:38 +01:00
David Gamero
b3f11963c3
[typescript] add call-time middleware support (#20430)
* add call-time middleware

* update dependencies to run on current tsc

* exclude middleware from inversify

* update samples

* update service

* space

* inversify exclude

* braces

* import in objectparamapi

* add integration test for middleware

* switch to configuration options merge

* enable options on non inversify builds

* remove unused middlware export

* remove merge strategy from inversify

* gen samples

* remove old middlware imports

* tab to space

* separate promise and observable options

* gen samples

* use allmiddleware var across inversify

* generate encode samples again

* add middleware call-order tests for default typescript build

* type refactor

* add semicolons, default replace, let to const

---------

Co-authored-by: david <david@dmba.local>
2025-02-26 11:33:21 +01:00
Mattias Sehlstedt
60bae732d3
SingleRequestParameter setter parameter construction (#20679)
* Add so that the singleRequestParameter can be constructed one parameter at a time

* Replace the lombok EqualsAndHashcode with a mustache implementation

* Remove equals and hashcode from oneRequestParameter model

* Remove the final keyword from variables in the oneRequestParameter class
2025-02-26 17:27:30 +08:00
jeremytrips
275107e3f1
Updated BaseService and service arguments in the mustache files to fix #20732 (#20736)
* Updated BaseService property

* removed unused depencies

* Add test files
2025-02-26 10:18:13 +01:00
wandi34
fb7aa580bf
[Java][RestClient] Enable access token refresh (#20733) 2025-02-26 17:05:50 +08:00
Elric Milon
481c69063d
[Rust] Fix enum variant name generation (#20689)
* Regression test for enum Name generation in oneOf

where variants would end up having the same name.

* Fix enum variant name generation

Datatypes like `Vec<foo::bar::Baz>` would end up as `Baz` instead of `VecOfBaz`
2025-02-26 16:57:43 +08:00
Michael Munch
57b1c91d17
Added support for Cookie parameters (#20729)
Co-authored-by: Michael Munch <mmu@bankdata.dk>
2025-02-26 16:52:12 +08:00
Sergey Yelin
c529b16600
Fix crash on escaped type in erlang-server handler (#20735) 2025-02-26 16:34:37 +08:00
Sergey Yelin
32573f7464
[erlang] erlang-server generator fixes (#20717)
* Improve perfomance for map updates

* Fix key authorization crash

* Update samples
2025-02-26 16:19:11 +08:00
abrevet-dev
8040e9aae9
Add openapi-normalizer rule to set tags to vendor extension (#20713) 2025-02-26 16:18:17 +08:00
Fabian Buchenberger
5581a2dd2c
[csharp][generichost] fix syslib1045, use GeneratedRegex for .net7+ (#20695)
* [csharp][generichost] fix SYSLIB1045 for ClientUtils

 * make JsonRegex private

 * on net7 and above use GeneratedRegex for JsonRegex

 * remove unused SanitizeFilename-Method

* [csharp][generichost] regenerate samples
2025-02-26 16:07:43 +08:00
micolous
30787a16fb
[Python] Add ca_cert_data parameter (#20697)
* Add `ca_cert_data` parameter to Python client.

This lets a client validate a server's CA certificate chain using a
variable/constant containing PEM (`str`) or DER (`bytes`) data, rather than
needing to reference a file on disk.

* python: Fix `ca_cert_data` on Python 3.8
2025-02-26 16:04:32 +08:00
Sander Jochems
5757def39b
Implement GetActualInstanceValue method (#20663) 2025-02-26 15:54:41 +08:00
Maksim Kosolapov
09df01501a
[kotlin][client] Explode query param properly (#20714) 2025-02-26 15:52:03 +08:00
Daniel Schreiber
5f92de4785
[typescript-angular] refactor service classes for reduced bundle sizes. (#20681)
This reduces bundle sizes of ESM bundles on the order of 20%.
2025-02-25 13:07:14 +01:00
moznion
9537a7fb46
[typescript] Prevent generating invalid enum code due to empty variable names (#20699)
* [typescript] Prevent generating invalid enum code due to empty variable names

After sanitizing all characters (e.g. multibyte characters), the enum variable name may become an empty string.
Since an empty string would cause a syntax error, this patch pads the pseudo variable name (`STRING`) to avoid that issue.

For example, given the following OpenAPI definition:

```yaml
openapi: "3.0.0"
info:
  title: Sample project
  version: '1.0'
  description: 'Sample API Check "API Key" '
  license:
    name: Apache 2.0
    url: 'https://www.apache.org/licenses/LICENSE-2.0'
paths: {}
components:
  schemas:
    Greeting:
      type: string
      enum:
        - 'こんにちは'
        - '你好'
        - '안녕하세요'
```

The current logic generates the following code for Greeting:

```typescript
export enum Greeting {
     = 'こんにちは',
    2 = '你好',
    3 = '안녕하세요'
}
```

This code is invalid. With this patch, the generated code becomes:

```typescript
export enum Greeting {
    STRING = 'こんにちは',
    STRING2 = '你好',
    STRING3 = '안녕하세요'
}
```

Signed-off-by: moznion <moznion@mail.moznion.net>

* Remove unnecessary imports

Signed-off-by: moznion <moznion@mail.moznion.net>

* Use new sanitizer for TypeScript symbol which takes wider variety characters for enum var name

Signed-off-by: moznion <moznion@mail.moznion.net>

---------

Signed-off-by: moznion <moznion@mail.moznion.net>
2025-02-25 12:58:27 +01:00
William Cheng
a06a2b4c7b update samples 2025-02-23 20:55:18 +08:00
Gus Costa
a56d032edf
docs(nodejs-express-server): fix default port number in README (#20706)
Update README to correctly show 8080 as the default port instead of 3000.
This matches the actual server configuration in config.js where the
server listens on port 8080 by default.
2025-02-23 20:51:45 +08:00
William Cheng
db6709fdb3
Update readme (#20712)
* update author list

* add links to blog posts

* update
2025-02-23 18:44:16 +08:00
Ross Sullivan
670e9d7099
[rust] Fixed discriminator causing duplicate enum variants (#20711)
* Fixed discriminator

* Added testcase and updated samples
2025-02-23 17:50:04 +08:00
Ruslan Khasanshin
79145dc633
[kotlin-spring] Adds 'suspend' modifier for reactive List endpoint with useFlowForArrayReturnType = false (#16130) (#20710) 2025-02-23 17:35:08 +08:00
William Cheng
b80461373a update nodejs express server samples 2025-02-23 17:32:16 +08:00
Gus Costa
86a293e0b6
fix(nodejs-express-server): update express-openapi-validator to v4 (#20704)
Update express-openapi-validator from v3 to v4 to support Node.js versions >14.
This includes:
- Upgrade express-openapi-validator dependency in package.json
- Modify server startup code to accommodate v4 API changes
- Update controller implementation to handle breaking changes

The changes ensure compatibility with modern Node.js versions while maintaining
the generator's functionality.
2025-02-23 17:27:33 +08:00
William Cheng
cea3c5ba09 update nodejs express server samples 2025-02-22 23:15:00 +08:00
Gus Costa
f83b049fe6
fix(nodejs-express-server): remove unused axios dependency (#20707)
Remove axios from package.mustache as it's not used in the starter build.
This eliminates potential security vulnerabilities (ReDos & SSRF) from
the dependency tree without affecting functionality.
2025-02-22 23:10:46 +08:00
Ross Sullivan
28c7b9b956
[rust] fixed compiler errors for decimal types (#20708) 2025-02-22 22:58:26 +08:00
Sylvain Joubert
0ff8c46595
[Python] Fix mustache tag syntax in github worklow (#20701) 2025-02-21 17:43:17 +08:00
Ron Reynolds
13111077d4
Java client codegen cleanup (#20691)
* made Configuration.defaultApiClient volatile so that if it's changed the new value is immediately visible to all other threads

* made no-arg api ctor use Configuration.getDefaultApiClient() instead of creating new ApiClient every time

* replaced all use of URLEncoder.encode with ApiClient.urlEncode; just code cleanup; no functional changes

* disabled AbstractJavaCodegenTest.testGeneratedExampleValues as it fails, possibly due to timezone (Locale.ROOT) of local system

* replaced thread-unsafe SimpleDateFormat with DateTimeFormatter and re-enabled unit-test

* removed unused import

* ran the generate-sample scripts and generated a HUGE number of changes!

* some code cleanup and adding booleans to processOpts to remove lots of duplicate FOO.equals(getLibrary()) checks; also using isLibrary() wherever possible

* added missing import of Configuration to api.mustache (and, thus, all native samples)

* added missing import for ApiClient to anyof and oneof model mustaches

* rolled back formatting of cliOptions block (too many changes for a simple PR)

* use toLowerCase with locale

* reverted supportedLibraries reordering and format changes to reduce diff noise

* updated comment

* rolled back Slf4j change due to failing arch-unit test; also rolled back serialization-lib setting code due to unit-test failure (still a mystery)

* moved lib* booleans AFTER super.processOpts() the library can be changed (as shown by unit-test)
2025-02-20 18:16:40 +08:00
Christian Munier
73079c2ef6
Fix #20692 [typescript-angular] Support enumDescription / x-enum-descriptions (#20693)
* #20692 [typescript-angular] Added x-enum-descriptions to "composed-schemas" example.

* #20692 [typescript-angular] Respect x-enum-descriptions / enumDescription in modelEnum mustache template.

* #20692 [typescript-angular] Regenerated samples.
2025-02-20 11:04:00 +01:00
Erik VanderWerf
9374dbd030
Add option to skip merging spec files (#19396)
Introduced a new property `inputSpecRootDirectorySkipMerge` to conditionally skip the merging step of the specification files. Updated the logic to honor this new property, ensuring merging only occurs if it is explicitly not skipped. Enabled configuration via Gradle build file.
2025-02-19 17:28:03 +08:00
Jonathan Martens
890c37fd77
fix: display of markdown in notes section (#20534)
* fix: display of markdown in notes section

* update samples

* skip blank lines

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-02-19 17:15:29 +08:00
Dragos Vingarzan
c2884b7b1a
[BUG][Go-server] attempt to fix the controller-api mustache template for a nullable bodyParam (#20478)
* go-server: attempt  to fix the controller-api mustache template for a nullable bodyParam

* added to petstore an example to trigger the issue which this PR fixes
2025-02-19 17:09:32 +08:00
Alex
cd7cdb1e24
Add option to generate a fully sealed model in the JavaSpring generator (#20503)
* Generated sealed interfaces for oneOf

* Add generated data

* Add also  modifier

* Allow sealed for everything

* Fully seal model

* Disable html escaping

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

* Update docs

* Check all oneOf scenarios

* Fix failed scenario

* Fix comments

* Remove unused import

* Adapt pom.xml also

* Add comment and remove unused function

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-02-19 15:15:09 +08:00
Victoria Casasampere Fernandez
d5866feb2d
[Rust-Axum] Implement support for Basic and Bearer auth in Claims (#20584)
* Implement a custom error handler for unhandled or generic endpoint errors

* Pass in method, host and cookies to error handler

* Update axum to 0.8

* Make API methods take references instead of ownership

* Rebase error handler

* Rebase with updated error handler

* Update deps

* Fix capture group syntax

* Rebase rust-axum-error-handling

* Update docs

* Multipart is also part of the axum update

* Update samples

* Update docs
2025-02-19 14:48:28 +08:00
Ron Reynolds
eb668b6a76
reuse Configuration.defaultApiClientin no-arg Api ctors and make ref volatile (fixes issue #20633) (#20635)
* made Configuration.defaultApiClient volatile so that if it's changed the new value is immediately visible to all other threads

* made no-arg api ctor use Configuration.getDefaultApiClient() instead of creating new ApiClient every time

* replaced all use of URLEncoder.encode with ApiClient.urlEncode; just code cleanup; no functional changes

* disabled AbstractJavaCodegenTest.testGeneratedExampleValues as it fails, possibly due to timezone (Locale.ROOT) of local system

* replaced thread-unsafe SimpleDateFormat with DateTimeFormatter and re-enabled unit-test

* removed unused import

* ran the generate-sample scripts and generated a HUGE number of changes!

* added missing import of Configuration to api.mustache (and, thus, all native samples)

* added missing import for ApiClient to anyof and oneof model mustaches
2025-02-19 14:47:55 +08:00
Yuji Hanamura
c349270c7a
[Ruby] Fix ruby client generator to generate setter methods with not null validation (#20672)
* fix: Fix ruby client generator to generate setter methods with not null validation

Not null validation was missing for required and non-nullable properties when
no other validation was present.

* fix: Fix an issue where the initialize method did not accept attributes defined in its parent class
2025-02-19 14:46:44 +08:00
William Cheng
61ae569149 update doc 2025-02-19 14:37:12 +08:00
lucy66hw
4883de51c1
enum zero index is UNSPECIFIED suffix (#20473)
Co-authored-by: xil <xil@uber.com>
2025-02-19 14:30:53 +08:00
Ross Sullivan
2722fdcdc8
[RUST] chore: Clean up Rust reqwest and model templates (#20674)
* Cleaned up rust-reqwest-trait api template

* Cleaned up rust-reqwest api template

* Cleaned up rust model template
2025-02-18 16:58:12 +08:00
William Cheng
8fb81ea554 update python samples 2025-02-18 16:51:17 +08:00
Joost Sijm
5687edcf02
[python] Encode list query parameters for python pydantic v1 client (#20614)
* Fix url escape quote in python pydantic v1 client

* Fix sample
2025-02-18 16:46:14 +08:00
Gijs Blanken
65df3c22b9
Rewrite the PHP Laravel generator (#20526)
* remove legacy laravel generator

* initial setup of my vision for the laravel generator

* update the php laravel samples

* update php laravel docs

* moved api validation into controller and handle edge cases presented by sample generation

* updated samples

* added php-laravel to github workflow php8 and removed php7 workflow as it only contained old laravel

* preemptive work to support union types as soon as php serde supports them

* updated samples

* update templates in accordance to samples output

* fix pipelines and update samples

* correct serde version

* fixed phpunit execution and updated samples

* added named routes

* remove

* readd samples

---------

Co-authored-by: gijs.blanken@futureof.finance <gijs.blanken@finly.nl>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-02-17 21:50:13 +08:00
Karsten Leonhardt
c5863629c0
Bugfix #17149: Asciidoc generator sets not defined example values wrongly to the string value "null" instead of the expected not set value (#20670)
Co-authored-by: Karsten Leonhardt <karsten.leonhardt@commerzbank.com>
2025-02-17 21:18:37 +08:00
Carlos Chacin
a6280d9b58
[java][client] fix: Add static modifier to inner class in Java when useSingleRequestParameter=true (#20590)
* fix: Add static modifier to inner class

* Apply suggestions from code review

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

* fix: Remove unintended whitespace

* fix: Add default=false for useSingleRequestParameter

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-02-17 20:02:01 +08:00
Ross Sullivan
4ba87ae0e7
[rust] Added support for text/plain to reqwest clients (#20643)
* [rust] Added support for text/plain to reqwest-trait client

* Updated samples

* [rust] Added support for text/plain to reqwest client

* Updated samples

* cleanup

* reduced compiler warnings

* fixed text/plain content with charset

* Only deserialize text/plain if the API produces it
2025-02-17 20:00:43 +08:00
Maxime Vincent
515c8827b2
Ruby fix typhoeus api client multiple call with file return type (#20615)
* [Ruby] fix Typhoeus api client multiple call with file return type

* update samples
2025-02-17 19:58:53 +08:00
Trent Nadeau
c5fb60b5f2
[Rust-Axum] Fix rustfmt error due to ordering (#20653) 2025-02-17 19:55:20 +08:00
mohamuni
07b5c5fc70
Handle query param encoding issues in .net9 (#20651) 2025-02-17 19:30:56 +08:00
João Brilhante
8167aa1852
[java][feign] Fix model combining properties and additional properties (#19713) 2025-02-15 02:16:46 +08:00
João Brilhante
c3c2e7aeca
[java][webclient] Fix model combining properties and additional properties (#19711) 2025-02-15 00:15:22 +08:00
João Brilhante
a5c9c6d531
[java][resttemplate] Fix model combining properties and additional properties (#19706) 2025-02-15 00:13:13 +08:00
William Cheng
dd67423c8c
update samples (#20647) 2025-02-12 17:57:18 +08:00
zaenk
3eddc9af85
[JavaSpring, kotlin-spring] attach sources when maven and interfaceOnly=true is used (#20640)
* [JavaSpring] attach sources when using maven and interfaceOnly=true

Closes #15659

* [kotlin-spring] attach sources when using maven and interfaceOnly=true

Closes #15659
2025-02-12 17:41:14 +08:00
Ross Sullivan
9ed15a1c97
[Rust] Fixed Rust default isAnyType causing compiler issues. (#20631)
* Fixed Rust default `isAnyType` causing compiler issues.

* Added tests for Rust isAnyType's

* Fixed thread_test.rs
2025-02-11 12:55:57 +08:00
Elric Milon
21bf477da3
[Rust] Bump axum and axum-extra (#20548)
* Bump axum and axum-extra to latest version.

 - This bump requires fixing path parameters due to matchit transitive dependency
changes (See https://github.com/tokio-rs/axum/pull/2645).

 - The `Host` extractor has been moved from `axum` to `axum-extra`.
 - Axum now ships multipart extractor support, switch to that.

* Update rust-axum samples
2025-02-10 22:01:15 +08:00
Michael Faille
aeb7caf9b1
Fix: Resolve Dart 3.5+ and json_serializable 6.9.0+ compatibility issues in generated dart-dio clients (#20460)
This commit fixes compatibility problems between the generated dart-dio code, json_serializable 6.9.0+, and Dart SDK 3.5 or later.

Changes:

- Updated `pubspec.mustache`:
    - Set the minimum SDK constraint for the generated package to `>=3.5.0 <4.0.0`, reflecting the language version used in the generated code.
    - Bump `json_annotation` dependency to `^4.9.0`.
    - Bump `json_serializable` dependency to `^6.9.0`.

These changes ensure that the generated code:

- Is compatible with `json_serializable` 6.9.0+ and Dart SDK 3.5+.
- Avoids Dart 3.5+ specific syntax that causes errors on older SDKs.
- Maintains existing functionality and type safety.

Resolves: #16117, #14863
2025-02-10 19:39:16 +08:00
Andriy Slobodyanyk
cdfa7fee77
Using Optional.ofNullable() at the fluent setters to prevent NPE (#20406)
* * Uses Optional.ofNullable() at the fluent setters to prevent NPE
* Fixes issue #17538

* updates samples
2025-02-10 18:23:01 +08:00
Ross Sullivan
79f70dcc8b
feat: [rust] Dynamically add uuid crate only if used (#20619) 2025-02-10 11:04:09 +08:00
Zemke
c2c161eb26
format date in codegen (#20516) 2025-02-10 00:11:01 +08:00
develop-gby
af6be6adee
Solution.mustache file modified (csharp generator) (#20621) 2025-02-09 23:13:07 +08:00
Dominik Broj
6f19741927
update jackson-threeten to 2.18.2 (#20530)
* update jackson-threeten to 2.18.2

* update threeten versions in test templates

* update to jackson 2.18.2

* bump jacoco to improve compat with newer java versions
2025-02-09 22:39:58 +08:00
William Cheng
61262e939a
[csharp] Fixed discriminator (#20624)
* fixed discriminator

* build samples

* minor refactors

* build samples

* replaced boolean with protected method

---------

Co-authored-by: devhl <shawnkanyer@gmail.com>
2025-02-09 22:32:17 +08:00
Philip Standt
97c805f0e0
[php][php-nextgen] enumUnknownDefaultCase true now return the correct value for unknown values (#20594) 2025-02-09 22:10:47 +08:00
Blake Lassiter
53f7e471c4
unity error message and code cleanup (#20595) 2025-02-09 21:56:00 +08:00
Blake Lassiter
055605b075
SortModelPropertiesByRequiredFlag - simplified comparison to order boolean false first (#20602) 2025-02-09 21:55:41 +08:00
Ross Sullivan
e1130c343a
Added HTTP method+path to JavaDocs in kotlin clients (#20618)
* feat: Added HTTP method+path to JavaDocs in kotlin OkHTTP client

* feat: Added HTTP method+path to JavaDocs in kotlin Ktor client

* feat: Added HTTP method+path to JavaDocs in kotlin retrofit2 client

* feat: Added HTTP method+path to JavaDocs in kotlin vertex client

* feat: Added HTTP method+path to JavaDocs in kotlin volley client
2025-02-09 21:55:23 +08:00
Victoria Casasampere Fernandez
adbbe68d4d
[Rust-Axum][Breaking Change] Implement a customizable error handler (#20463)
* Implement a custom error handler for unhandled or generic endpoint errors

* Pass in method, host and cookies to error handler

* Update axum to 0.8

* Make API methods take references instead of ownership

* Multipart is also part of the axum update

* Prevent replacing path names with the same name as a dynamic path parameter

* Use status code name instead of number

* Rollback axum update

* Forgot paths
2025-02-09 21:54:01 +08:00
martin-mfg
ba0456aa91
remove error message (#20623) 2025-02-09 21:52:51 +08:00
devhl-labs
01fa58a763
[csharp] Replaced property from allOf (#20578)
* replaced inherited property

* removed a comment
2025-02-09 21:43:50 +08:00
Dimitar Tomov
c74dfa3b3e
[kotlin-client][jvm-spring-restclient] Extract data from PartConfig for multipart/form-data requests (#20598) 2025-02-06 07:43:59 +00:00
Jimmy Praet
9a9c1087be
Add config option to disable generation of @JsonCreator constructor (#20570) 2025-02-05 16:00:03 +08:00
Ian Asaff
248a78b894
fix outer enum number bug elixir generator (#20592) 2025-02-05 15:04:26 +08:00
Ross Sullivan
cba193666e
feat: Added doc comments to Rust reqwest-trait template (#20591) 2025-02-05 14:43:51 +08:00
Ian Asaff
8998d83f99
[elixir] fixes outer enum bug #16412 (#20587) 2025-02-04 10:52:20 +01:00
David Wittman
68e7d49456
[typescript-axios] Conditionally set user-agent (#20571)
The change in #20067 has caused some issues with clients which run in a
Browser. This commit replaces that change, leaving the default
User-Agent for axios unmodified, and only sets the User-Agent if the
`http-user-agent` parameter is provided during generation time.
2025-02-03 16:00:18 +01:00
Ross Sullivan
5ecde555ab
chore: Bumped Rust reqwest-middleware crate to 0.4 (#20577) 2025-02-03 01:18:36 +08:00
devhl-labs
3ee7886345
removed a model (#20573) 2025-02-02 14:00:32 +08:00
Alejandro Ramirez
e553180c06
[swift][bug] Fix generation of multiple cases with associated values, fix #20560 (#20568)
* Cases previously generated as "case type[Int]([Int])" become "case typeArrayOfInt([Int])"
2025-02-01 22:35:50 +00:00
devhl-labs
187af2ec4e
removed a using statement (#20541) 2025-01-31 17:23:35 +08:00
dependabot[bot]
8b52b0afe3
Bump actions/setup-dotnet from 4.2.0 to 4.3.0 (#20563)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.2.0...v4.3.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>
2025-01-31 15:36:58 +08:00
Gregory Merlet
8c337f05be
Add optional AxiosRequestConfig parameter to typescript-nestjs service functions (#20222)
* feat: add options to service functions

* fix: fix type error

* refactor: change options parameter

* chore: update samples

* fix: fix options use order

* refactor: rename options

* refactor: import type
2025-01-29 11:12:25 +01:00
devhl-labs
f1c1567aa9
[csharp][generichost] Fixes de/serialization (#20540)
* fixed json serializer

* build samples
2025-01-26 22:18:11 +08:00
William Cheng
b033219c54
Add ClickIT as bronze sponsor (#20542)
* add ClickIT as bronze sponsor

* update url
2025-01-26 21:48:40 +08:00
Tanmay Mohapatra
561a707afc
[julia] fix enum default vals, add api validations (#20520)
- Fix enum default value generation. Default values were falling back to the default code generator and were being generated improperly for Julia.
- Add more validations to client and server API call handlers. These validations were already being generated for models, but were missed out for API calls.
2025-01-24 15:17:25 +08:00
Abraham Olaobaju
95a74c804c
allow PHP generator to accept modelNameMapping (#20533) 2025-01-24 15:16:57 +08:00
Julian Vennen
a68ad56ea9
[php-*] Explicitly declare nullable parameters (#20524)
* [php-nextgen] Explicitly declare nullable parameters explicitly

* Fix some deprecation warnings in other php generators

* [php-nextgen] Fix PHP 8.4 deprecation warnings with nullable/optional array parameters
2025-01-23 18:06:15 +08:00
William Cheng
ad8de61143 update go samples 2025-01-22 22:07:02 +08:00
Charles Treatman
8cbba7334d
[Go] skip validator import if oneOf discriminator lookup is enabled (#20497)
* move validator import into GoClientCodegen

* add new example for oneof discriminator lookup

* regenerate samples

* add validator.v2 to go.mod if it is imported

* regenerate samples
2025-01-22 19:36:56 +08:00
Iurii Ignatko
bc70f04848
Additional [this-escape] warnings fixes (#20515) 2025-01-22 01:05:54 +08:00
David Riddervold Marconis
c75fbb312e
[csharp][java] Fix enum discriminator default value (#19614)
* Fix enum discriminator default value

* Remove system out call

* Add case when discriminator type is ref

* Use correct schema

* Handle different use cases of mappings

* Add missing enum type Lizzy

* Make it more robust

* Add missing test for Sedan

* Refactor some code to make it cleaner

* Initialize discriminator enum field

* Don't override existing default value

* Fix issue with finding discriminators

* Move setIsEnum back to its original location

* Be smarter about figuring out the model name

* Fix final warnings

* Add javadocs to introduced methods
2025-01-21 16:09:17 +08:00
William Cheng
1fa07bf46c
Prepare 7.12.0 (#20512)
* Revert "v7.11.0 release (#20508)"

This reverts commit a7240eeefeedeefe7fc80ef22747dfc67e126324.

* prepare 7.12.0 snapshot version

* update samples

* update readme
2025-01-21 00:10:09 +08:00
William Cheng
a7240eeefe
v7.11.0 release (#20508) 2025-01-20 21:35:30 +08:00
Iurii Ignatko
fa3e38a4b7
[JAVA] Address [rawtypes] and [this-escape] warnings in generated API clients (#20466)
* Address [rawtypes] and [this-escape] warnings in generated API clients

* Commit updated sample files
2025-01-18 15:00:16 +08:00
William Cheng
98ccf95e43
[ASPNETCORE] Add support for central package version management (#20401)
* Added useCentralPackageVersionManagement option for aspnetcore

* Removed debug code from template

* Added option to opt out of centralized version management

* Added sample for centralized version management

* Removed changes for .net9

* Updated template file for model project

* Code formatting

* Corrected sample config for aspnetcore

* Regenerated Samples

* update samples, docs

* Fixed models project mustache file

* Regenerated samples and docs

* Regenerated smaples and doc

* Changed options to enum WIP

* fix option

* [ASPNETCORE] Add support for central package version management #20192 (#20403)

* Fixed default value for usePackageVersions

* Regenerated docs

* update workflow

* add props file

---------

Co-authored-by: Urganot <ballingsimon@googlemail.com>
2025-01-18 14:52:41 +08:00
William Cheng
9e66c4f516
Add more net9 samples (#20491)
* add restsharp net9 samples

* add httpclient net9 samples

* add unity net9 samples

* update workflow

* comment out unity test
2025-01-17 14:14:11 +08:00
William Cheng
ce56a83ae4
Update openapi spec 3.1 support message (#20492)
* update spec 3.1 support message

* update faq
2025-01-17 13:15:35 +08:00
William Cheng
4c73faf737
[go-server] Add tests for primitive types in request/response (#20474)
* add test for primitive request/response

* add new files
2025-01-15 16:56:16 +08:00
Dragos Vingarzan
dcf472a034
ISSUE: #17373 [BUG] [Go-server] invalid composite literal type string (#20467)
* modules/openapi-generator/src/main/resources/go-server: alternative initialization of variable, to avoid extra checks and custom code

* propagated changes to samples
2025-01-15 16:36:33 +08:00
William Cheng
5785743695
Update bug_report.md with up-to-date URL for online validator (#20470) 2025-01-15 01:31:03 +08:00
William Cheng
760d5e8168
[normalizer] Better handling of schema with just description (any type) (#20461)
* better handling of schema with just description

* update
2025-01-14 22:04:23 +08:00
Juuso Alasuutari
4259e92776
[C][Client] Make custom CMAKE_C_FLAGS work (#20432)
* [C][Client] Generate CMakeLists.txt for all C sample clients

The sample client defined in bin/configs/c.yaml has CMakeLists.txt in
its .openapi-generator-ignore. It's is the only C client that doesn't
(re-)generate CMakeLists.txt, the remaining two seem fine regardless.

* [C][Client] Allow user-defined CMAKE_C_FLAGS

* [C][Client] Remove useless message() calls from CMakeLists.txt

find_package() prints success/failure messages, no need to do it twice.
2025-01-14 15:01:36 +08:00
Pascal Bachor
61bdc6bf84
[Python] adjust multi-constraint dependency syntax to comply with PEP 508 (#20458)
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2025-01-14 12:44:46 +08:00
Marcel Märtens
78ea8afa84
[Rust] harden against name collisions while generate cleaner rust code, fix #20337 (#20396)
* prevent all name clashes by using a prefix for all parameters, this way they CANNOT clash with anything locally, as our hardcoded stuff in mustache files doesnt start with "p_" ,
when using the grouped option, we just use the params directly and dont unpack the variables at all, prevending furthur name clashes.

* get rid of "local_var" prefix, now that we no longer clash with paramater names

* fix a typo and remove the r# generated to the paramName when we create the identifier

* java code formatting and added a fake-endpoint parameter test

* update rust samples
2025-01-13 17:43:13 +08:00
William Cheng
09530b4781
Set removeEnumValuePrefix to false by default (#20452)
* set removeEnumValuePrefix to false by default

* update tests
2025-01-13 16:25:10 +08:00
devhl-labs
479cd522e0
[csharp] Removed .net6 and .net7 (#20449)
* removed .net6 and .net7

* build docs

* build docs
2025-01-13 15:22:30 +08:00
Junfeng Qiao
1bc5eae034
Fix Julia template for binary string (#20355)
* Fix Julia template for binary format

* Update julia samples

* fix missing check for the isBinary flag

Fix missing check for the isBinary flag in some places of the templates for julialang. The code would now be generated as Vector{UInt8} uniformly for binary strings. Binary strings that are also marked as files get generated as `String` data type on the client. That is because the Julia client expects a file name to be passed there.

* Fix Julia template for file

* Update julia samples

---------

Co-authored-by: tan <tanmaykm@gmail.com>
2025-01-11 20:31:53 +08:00
William Cheng
066a840dd8
Revert "fix ref to allOf wrapper, add tests (#19986)" (#20446)
This reverts commit 48e8375166d3ef4475450c97a61d0845c7d3ee00.
2025-01-11 19:17:21 +08:00
William Cheng
121c82f8fe
fix sbt setup in workflow (#20447) 2025-01-11 19:16:01 +08:00
William Cheng
a6cfef53fe
clean up kotlin spring samples (#20445)
* clean up samples

* use 3.0 petstore test spec

* update samples

* better code format
2025-01-11 17:00:54 +08:00
Ruslan Khasanshin
358e8af2bf
[kotlin-spring] Adds useFlowForArrayReturnType option for reactive mode (#16130) (#20409)
* [kotlin-spring] Adds useFlowForArrayReturnType option for reactive mode (#16130)

* [kotlin-spring] Replaces manual doc change with generated one (#16130)

* [kotlin-spring] Fixes errors (#16130)

* [kotlin-spring] Adds samples (#16130)
2025-01-11 15:53:04 +08:00
William Cheng
522b134cd9
rename variable in html2 (#20443) 2025-01-11 15:52:46 +08:00
John Vandenberg
eb47b9d836
Fix typos (#20442) 2025-01-11 15:44:42 +08:00
Victoria Casasampere Fernandez
29f7c2ea0b
[Rust-Axum] Update tests to not use templates (#20427)
* Update tests to not use templates

* Wrong filename
2025-01-10 12:13:29 +08:00
martin-mfg
d30220b8df
[Spring] Resolve default value issue with Lombok Builder (#19855)
* merge PR 18690

* update samples
2025-01-09 15:40:50 +08:00
William Cheng
9fcbdb95d9
[C#] avoid duplicated header in csharp client (restsharp) (#20421)
* avoid duplicated header in csharp client

* set env

* install openssl

* switch to windows
2025-01-09 15:36:49 +08:00
Julian Vennen
3d2ff493e6
Use conditional access for enumref query params (#20418) 2025-01-09 13:22:43 +08:00
Juuso Alasuutari
40d4703950
C overhead fixes (#20402)
* [C][Client] Remove redundant casts

Don't explicitly cast void pointers as it's unnecessary in C, but
leave printf arguments untouched to avoid setting off -Wformat.

* [C][Client] Cosmetic: remove unnecessary parens, align some lines

* [C][Client] Reduce number of unnecessary strlen() calls
2025-01-09 12:01:06 +08:00
Mark Doliner
536519c0ec
Update python options in the generators README.md (#20417)
- Remove the dead link to a python-legacy client generator.
- Add a link to the python-pydantic-v1 client geneator.
- Add a link to the python-fastapi server generator.
2025-01-09 11:55:21 +08:00
Yousef Haggy
7a23ac7615
[Python] Bug Fix - model_generic templates to have valid imports for polymorphism (#20273)
* fix model_generic python templates to have valid imports for polymorphism

* update samples

* update samples

---------

Co-authored-by: yugi <yugi-big@proton.me>
2025-01-09 11:40:47 +08:00
Victoria Casasampere Fernandez
3d65786117
[Rust-Axum][Breaking Change] Improve the oneOf model generator (#20336)
* Improve the implementation of oneOf

* Fixed 2.0 schemas; possible freeze present

* Fix generate-samples.sh freezing

* Fix validation of primitive types

* Move oneOf handling to its own method

* Fix formatting and add comments

* Remove allOf based discriminator handling

* Implement a test for v3 oneOf

* Implement oneOf tests for rust axum

* Fix circle CI

* Fix pom path, ensure cargo is present

* Implement untagged test

* Add final and fix double underscore typo
2025-01-08 17:38:23 +08:00
Jimmy Praet
eb96380928
[Java] Remove bean validation annotations on builder (#19580)
* Revert #18724

Make JAX-RS spec BuilderImpl class final again

* Remove bean validation annotations from builder

* Also update other java generators

* Introduce removeAnnotations lambda

* Undo import changes to JavaHelidonClientCodegen

* Add javadoc comment, examples and test for AbstractJavaCodegen.removeAnnotations()
2025-01-07 21:36:19 +08:00
Jakub Lipiński
00c76de2a9
Bump Ktor to 3.0.3 for Kotlin client. (#20410) 2025-01-07 21:34:53 +08:00
Andriy Slobodyanyk
cba756ffa6
Adds @Nullable annotation to Spring Boot generator (#20345)
* Adds @Nullable annotation to Spring Boot generator

* issue-14427: [REQ][spring] Null-Safety annotations
* issue-17382: [REQ] spring generator add Nullable annotations

Motivations:
* Have Spring Boot generator client properly annotated for nullability to be able to check code using them with tools like NullAway
* As it is related to Spring then the `org.springframework.lang.Nullable` annotation was chosen to avoid discussion which `@Nullable` one is true one
* `@NonNull` wasn't used as I didn't see much benefit of it. Anyhow, an empty constructor and/or setters allow to put a `null` value there

Modifications:
* Adds nullableAnnotation template to handle nullability annotation on vars
* Adjust pojo templates to use the nullability template
* Adapts tests

Modifications:
* Runs export_docs_generator.sh script to update samples

* samples update

* excludes Spring @Nullable from java-camel

* ones with defaults shouldn't be annotated as @Nullable

* updates samples

* adds AllArgConstructor generation tests

* adds container tests
2025-01-06 20:08:01 +08:00
AntoineDuComptoirDesPharmacies
4b5dfc430e
#20390 : (#20391)
Manage colon converting to underscore on sanitize
2025-01-06 19:43:05 +08:00
Ernesto Fernández
e154903743
Fix a few issues with the C generator (part 8) (#20378)
* [C] Deprecate *_create() to avoid *_free() confusion

The behaviour of *_free() doesn't match *_create(), so the user should
avoid using them together. But they still need *_free() to clean up
library-allocated objects, so add a _library_owned flag to each struct
as an attempt to tell them apart. This isn't perfect though, because the
user may neglect to zero the field, but they would still see a warning
once in a while so it serves its purpose.

To prevent the new deprecation warnings (intended for the user) from
showing up during the library build itself, define a new family of
*_create_internal() functions, and turn *_create() into simple wrappers.

* Update samples

* add eafer to c technical committee

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-01-06 10:53:36 +08:00
William Cheng
85c81bee5b
[python] Close test API clients (#20400)
* close api client

* update samples

* update python pydantic v1 test files

* update python disallow additional property tests

* update python tests

* update python tests

* update python aiohttp tests

* update python pydantic aiohttp tests

* update python pydantic v1 tests

* revert sync teardown

* update python disallow tests

* update FILES

* update python echo api tests

* update python tests

---------

Co-authored-by: Huan-Cheng Chang <changhc84@gmail.com>
2025-01-04 17:08:29 +08:00
Juuso Alasuutari
43f59bab81
[C][Client] Remove broken intToStr() macro, update samples (#20383)
Note: this does not fix anything else; for example all numerical
types, including float and double, are still incorrectly cast to
to long int before string conversion.
2025-01-02 22:25:06 +08:00
dependabot[bot]
46260ee6f9
Bump s4u/setup-maven-action from 1.17.0 to 1.18.0 (#20392)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.17.0...v1.18.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>
2025-01-01 23:25:10 +08:00
William Cheng
8f4cfa3955
[swift] fix typos, minor code format enhancement (#20387)
* fix typo in swift option, minor code format enhancement

* fix uuid typo in swift codegen and template

* fix typo minium
2024-12-31 16:51:18 +08:00
Jonas Reichert
93158ea4dc
Fixes URLSessionImplementations template for swift generator (#20381) 2024-12-30 21:24:25 +00:00
William Cheng
25283d46a7
Fix typo in various generators, templates (#20389)
* fix typo in various generators, templates

* update samples
2024-12-30 18:52:18 +08:00
William Cheng
c5ac7d485f
Various enhancements, bug fixes to default codegen and maven plugin (#20388)
* fix typos in docs

* minor fix in default codegen

* fix more typos
2024-12-30 16:42:26 +08:00
devhl-labs
8fa8530cd0
bump version to .net8 (#20384) 2024-12-30 13:48:24 +08:00
William Cheng
bd8cd8bf9f update python samples 2024-12-30 11:54:55 +08:00
OM HASE
de41fd27d1
Fix(Python): Add custom exceptions for HTTP status codes 409 (Conflict) and 422 (Unprocessable Entity) #20244 (#20251)
* Update exceptions.mustache

* Fix(Python): Add custom exceptions for HTTP status codes 409 (Conflict) and 422 (Unprocessable Entity) #20244
2024-12-30 11:53:12 +08:00
dependabot[bot]
45aeae3d43
Bump actions/setup-dotnet from 4.1.0 to 4.2.0 (#20379)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.1.0...v4.2.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-12-27 18:37:36 +08:00
Makoto Aoyama
bf9c9a59d2
Add access control to the properties of validation rules (#20380) 2024-12-27 10:36:15 +00:00
William Cheng
6d2f2c9ced update gradle.properites to use 7.11.0 snapshot for testing 2024-12-27 00:56:38 +08:00
Ernesto Fernández
812d89cbe5
Fix a few issues with the C generator (part 7) (#20366)
* [C] Test nullable booleans in form data

* [C] Ban implicit int to pointer conversions

* [C] Declare valueForm for bool as char *

* Update samples
2024-12-27 00:27:38 +08:00
DavidRV00
357a708ebb
Fix package name in FastAPI README (#20371) 2024-12-27 00:27:06 +08:00
Lewis Hazell
ff0fe26890
Fixes body of FormParameters in multipart/form-data requests without files sent by generated C# (RestSharp) (#20351)
* fix: set RestRequest flag to force multipart/form-data when given as Content-Type

* fix: removed serialization of FormParameters for multipart/form-data

* updated csharp-restsharp samples
2024-12-22 23:28:37 +08:00
William Cheng
ab8d359dc3
add option to skip setting user agent in js client (#20367) 2024-12-22 23:11:54 +08:00
devhl-labs
5ba608ff8a
[csharp] add .net9 support (#20270)
* add .net9 support

* fixed path of new sample

* comment out manual test that does not exist

* comment out manual test that does not exist

* comment out manual test that does not exist
2024-12-22 22:06:33 +08:00
Brian Ferri
401c8d0feb
[FIX][PHP-NEXTGEN] Missing tagged union discriminator literal (#20343) (#20356)
* fix: https://github.com/OpenAPITools/openapi-generator/issues/20343

* chore: apply correct formatting
chore: build and package

---------

Co-authored-by: Christian Ascone <ascone.christian@gmail.com>

---------

Co-authored-by: Christian Ascone <ascone.christian@gmail.com>
2024-12-22 21:51:34 +08:00
jbrugge
4ea7f6088e
[Java] Avoid ambiguous references for date and time classes (#18416) (#20230) 2024-12-21 16:50:01 +08:00
Ernesto Fernández
77e9c1f03a
Fix a few issues with the C generator (part 6) (#20332)
* [C] Fail build on implicit function declarations

* [C] Complete changes from patch 34c3f8c7aa84

* Update samples

* [C] Fail build for global functions with no declaration

* [C] Use "static" for apiClient.c internal functions

* Update samples
2024-12-21 15:59:23 +08:00
William Cheng
8790f7c8b1
Update logback core to newer version v1.5.13 (#20363)
* update logback to newer version

* update java inflector samples

* update logback to newer version

* fix auto-generated tests
2024-12-21 15:56:27 +08:00
Julian Vennen
eceef28850
[PHP][php-nextgen] Improve method parameter typing (#20361)
* Fix #20354 - Nullable mixed type is not allowed

* Add parameter types for request and asyncWithHttpInfo functions
2024-12-21 15:53:51 +08:00
Julian Vennen
806b99e43a
[PHP][php-nextgen] List all possible return types (fix #17113) (#20335)
* [PHP][php-nextgen] List all possible return types (fix #17113)

* Switch to LinkedHashSet
2024-12-21 15:50:40 +08:00
DavidGrath
6180fea305
Add gradle wrapper v8.1.1 to kotlin-spring (#20341)
* Added code and tests for generating the gradle wrapper for kotlin-spring

* Added generated samples

* Changed Gradle wrapper version to 8.1.1

* Added generated samples

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-12-20 19:56:52 +08:00
William Cheng
b143313cf7
Update readme with pip installation procedure (#20353)
* add pip install to readme

* add a few links to blogs
2024-12-19 17:03:18 +08:00
haruna
7f0efe74a7
Add PyPI installation to docs (#20350) 2024-12-19 14:12:36 +08:00
David Gamero
74044c3427
remove unused url-parse package to complete WHATWG migration (#20344) 2024-12-18 09:00:55 +01:00
Cameron Koegel
289425b8ee
[typescript-axios] Add User-Agent Header to Default Axios (#20067)
* [typescript-axios] Add User-Agent Header to Default Axios

* fix if `npmVersion` doesn't exist

* generate samples

* single line solution

* move user agent header to config

* generate samples

* splat for headers as well

* samples

* move headers above baseOptions

* samples

* commas are hard

* samples again
2024-12-17 17:36:04 +01:00
Jorge Fernandez
9fec13af85
[Kotlin][Tests]: Add test for kotlin-jvm-okhttp (#20338)
* feat(issue-20231): add echo_api client for kotlin okhttp

* build(issue-20231): sync files
2024-12-17 21:50:00 +08:00
loic-seguin
b01c8be47f
bugfix: generate correct setup.pi when no paths are specified (#20098) 2024-12-17 10:58:26 +08:00
Julian Vennen
e87c4ea6c0
[PHP][php-nextgen] Fix usage of enums in parameters (#20294) 2024-12-16 19:19:24 +08:00
Ross
47891245e9
[Rust] Fixed rust keyword params in reqwest-trait library (#20333)
* Fixed rust keywords in reqwest-trait lib

* Update tests and samples
2024-12-16 18:58:47 +08:00
William Cheng
ea2ba0c349
[java][native] fix empty response body (#20334)
* [Java][Client] (#13968)

* update

* update

* update slack url

---------

Co-authored-by: András Gábor Kis <andras-gabor.kis@telekom.com>
2024-12-15 22:32:46 +08:00
Simon
9b3484cc99
[php] Set $multipart to true if content-type is multipart/form-data (#5536) (#18991)
* [php] Set $multipart to true if content-type is multipart/form-data (#5536)

Related: https://github.com/OpenAPITools/openapi-generator/issues/5536

* [php] Use isMultipart variable

---------

Co-authored-by: Simon Hammes <simonhammes@users.noreply.github.com>
2024-12-15 17:29:12 +08:00
Dan Čermák
cdfab4eee3
[python,aiohttp] Don't create persistent aiohttp.ClientSession in __init__ (#20292)
aiohttp's `ClientSession` & `TCPConnector` used to obtain an event loop in
__init__ (via `asyncio.get_event_loop`). However, as of https://github.com/aio-libs/aiohttp/pull/8512 both
classes now obtain the running event loop and won't potentially create one. This
makes it impossible to create `ClientSession` and `TCPConnector` objects outside
of coroutines, as `get_running_loop` must be called from a coroutine.

Thus we defer the creation of a `ClientSession` into the actual request and
cache it for later usage. Thereby we pay only a very small price on the first
request, but subsequent requests will not be any more expensive.
2024-12-15 17:11:35 +08:00
martin-mfg
d87a70dd93
update sample tests, fix Java tests (#20300)
* replace removed forkMode

* remove junit runner where it's not needed

* update samples without skipping test files, but skip files named "FILES"

* revert overwriting custom tests, add custom java tests to list

* add one sample to CircleCI, fix various Java tests
2024-12-15 17:09:58 +08:00
Kirill Romanov
4e5a828c12
feat: add option to support non-ascii headers in kotlin client (#20331) 2024-12-15 16:46:42 +08:00
Nicklas Wiegandt
07d19baf89
feat (#19407 JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient (#19827)
* chore (JAVA SPRING WEBCLIENT): Remove comments used for debugging

* feat (JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient

* feat (JAVA SPRING WEBCLIENT): Generate samples and docs

* fix (JAVA SPRING WEBCLIENT): Fix missing return error & Fix JDK17 action webclient useSingleRequestParameter test path

* fix (JAVA SPRING WEBCLIENT): Fix code indention

* fix (JAVA SPRING WEBCLIENT): Fix code indention again

* fix (JAVA SPRING WEBCLIENT): Update samples

* feat (JAVA SPRING WEBCLIENT): Regenerate after pull rebase
2024-12-15 15:28:38 +08:00
William Cheng
cc40f40ead
remove kotlin-server-deprecated resource folder (#20328) 2024-12-14 17:02:49 +08:00
William Cheng
b16144094d
[kotlin-server][ktor2] fix isKtor, update samples (#20327)
* fix isKtor, update samples

* fi dockerfile

* fix dataclass

* add new files

* fix template

* regenerate samples
2024-12-14 16:11:57 +08:00
Aleksei Tirman
f766f445da
[Kotlin Server] Update Ktor to the next major version 3 (#20245)
* [Kotlin Server] Update Ktor to version 3

* [Kotlin Server] Clean up

* [Kotlin Server] Fix problems

* [Kotlin Server] Fix Ktor and modelMutable samples

* [Kotlin Server] Fix the string value for serialization key

* [Kotlin Server] Remove setting Kotlin serialization flag to true

* [Kotlin Server] Remove setting Kotlin serialization flag to true

* [Kotlin Server] Remove the option to enable Kotlin serialization

* [Kotlin Server] Use query parameters
2024-12-14 15:06:27 +08:00
William Cheng
3e6f8753e9
update crypto dep to newer versions in go server (#20326) 2024-12-14 15:04:11 +08:00
Tim Quinn
d55a41e985
Fix bug in common path prefix calculation (#20310)
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
2024-12-14 14:12:26 +08:00
Ernesto Fernández
1a3d7d4ae6
Fix a few issues with the C generator (part 5) (#20313)
* [C] Default to requiring valid SSL

* Update samples

---------

Co-authored-by: Sam Bingner <sam@corellium.com>
2024-12-14 13:53:32 +08:00
William Cheng
2f03c70403
[rust] Add tests for path parameters (#20325)
* add tests for path parameter in rust client

* add tests and update samples
2024-12-14 13:50:11 +08:00
Ross
3a09ebbb7b
Added path param normalization for Rust clients (#20309) 2024-12-14 13:37:15 +08:00
Doug Gish
8aa8e3892d
Depend on jackson-jakarta-rs-json-provider when useJakartaEe is true (#20322)
In the build.gradle template for the Java generator's resttemplate library, change dependency to com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider instead of com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider when useJarkartaEe is enabled. This makes it consistent with the pom template file.
2024-12-14 11:56:52 +08:00
Ernesto Fernández
b7c7ed087f
Fix a few issues with the C generator (part 4) (#20289)
* [C] Deal with binary api parameters

With this change, the bodyParameters array can also be binary, so pass
its length around instead of relying on strlen().

* [C] Fix a few remaining enum issues

* [C] Install headers and include any_type.h header

* [C] Don't require C++ to compile C code

* [C] Test binary bodies and path enums in schemas

* Update samples

---------

Co-authored-by: Sam Bingner <sam@corellium.com>
2024-12-13 02:01:04 +08:00
William Cheng
24ddb33d0b add ktor2 library option to kotlin server generator 2024-12-13 01:15:03 +08:00
Daniel Åkerlund
b218e238f4
Improve handling of pekko versions in scala-akka-http-server generator (#20277)
* Fix issue 20275 Improve handling of pekko versions

* Generated docs

* Use version 1.1.0 as default version of pekko-http.

* Updated sample
2024-12-11 12:31:22 +08:00
dependabot[bot]
e7b5f348e7
Bump nanoid from 3.3.4 to 3.3.8 in /website (#20284)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.4 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.4...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 16:27:41 +08:00
Ernesto Fernández
f4271faf3b
Fix a few issues with the C generator (part 3) (#20269)
* [C] Clear the response code from previous api calls

Before making an api call, reset apiClient->response_code to zero. That
will protect us from checking stale values if the curl request fails.

* [C] Check that string arguments are not null

Check early on that the arguments are not null, to prevent crashes on
strdup() calls.

* [C] Don't attempt to fill in a type with error info

Check if the api call returned an error before attempting to parse the
reply as the expected type.

* [C] Handle binary and integer return types

* [C] Update test schemas with binary and integer return types

* Update samples
2024-12-10 12:23:29 +08:00
dependabot[bot]
0a7e784c8c
Bump s4u/setup-maven-action from 1.16.0 to 1.17.0 (#20283)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.16.0...v1.17.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-12-10 12:22:55 +08:00
Jorge Fernandez
a447b5988d
[Kotlin] fix #20231, OkHttp client can handle a field with a list of files (#20274)
* feat(issue-20231): Kotlin okhttp client handles correctly fields that are optional with multiple files.

* docs(issue-20231): add docstrings

* feat(issue-20231): Remove unnecessary test spec

* feat(issue-20231): Kotlin okhttp client handles correctly fields that are optional with multiple files.

* docs(issue-20231): add docstrings

* feat(issue-20231): Remove unnecessary test spec

* feat(issue-20231): Remove unnecessary if condition
2024-12-09 20:00:05 +08:00
Ingars Ribners
dc175c5335
Added PostgreSQL schema generator (BETA) (#20255)
* Initial version of PostgreSQL schema generator 'postgresql-schema' (based on 'mysql-schema' generator code)

* PostgreSQL schema generator. Initial version.

* Tested. Fixed errors. Documentation updated.

* Samples for 'postgresql-schema' updated.

* Removed current date/time from mustache templates for postgresql-schema generator.
Re-created samples.

* Re-created docs file for postgresql-schema generator.

* Removed unecessary LocalTime computing code and imports for postgresql-schema generator.

* Errors fixed for postgresql-schema generator. Samples recreated.

* Docs updated.
2024-12-07 22:52:59 +08:00
Jakub Lipiński
e025a7ddfa
Bump Ktor to 3.0.2 for Kotlin client. (#20265) 2024-12-07 16:21:13 +08:00
Nate Todd
35df38de38
[Elixir] Use string headers (#19759)
* Use string headers in Elixir request builder

* Add samples

* Update add_param spec

* Updated samples with spec changes

* Convert header values and keys to strings in add_param/4
2024-12-07 14:58:36 +08:00
BryanAldrich
f62aa5bd95
Add auth token refresh to csharp (#20234)
* quick edit to allow tokens to refresh if they specify an expires_in and created fields. Also supports refresh_token if that is passed.

* update samples

* fix compile error for projects without default using statement.
make the created date nullable.

* fix nullable de-reference on Created.

* fix to remove nullable reference types (the ! to remove the warning) and add documentation comments to the public members.
2024-12-07 13:52:35 +08:00
Alexander Brandon Coles
3a37ba33a7
Fix typo "bellow" (#20268)
* Fix typo in constant name: s/BELLOW/BELOW/

* Fix typo ('bellow') in docs, comments and strings
2024-12-06 16:18:08 +00:00
ASterdyniak
d29196a1f0
[typescript-fetch] [BUG] Fix duplication of ModelNamePrefix in import statements (#20109) 2024-12-06 11:02:18 +01:00
Hiromi Hishida
474307675b
[php] Follow PHP8.4 update: declared nullable parameters explicitly (#20243)
* explictly declared nullable to parameters with "null" default value

* generated php sample

* fixed unnecessary "?"

* re-generated sample
2024-12-06 14:33:55 +08:00
drewble
ba5ecbccde
Improved Elixir Atom Generation (#20229)
* Update ElixirClientCodegen.java

* Refine the regular expression for atoms

The original regex incorrectly matched `@atom` (unquoted atoms
cannot begin with @). However, through testing with `iex`, it also turns out that the atom
`:@` is legal.

The following atoms will now be quoted that would have been
incorrectly not quoted:

- `:@type`

* Add model to petstore client to test new atom creation regex pattern
2024-12-06 14:26:39 +08:00
Ernesto Fernández
52b5b8fb76
Fix a few issues with the C generator (part 2) (#20227)
* [C] Don't convert post body strings to JSON

If the body provided for the api request is a just a string itself,
don't try to convert it to JSON, simply submit the string.

* [C] Implement BearerToken authentication

* [C] Handle nullable fields correctly

* [C] Fix implementation of FromString for enums

* [C] Update the test schemas to cover the changes

* Update samples

* Fix the updated samples

* [C] Add the new samples folder to the CI workflow
2024-12-06 01:32:34 +08:00
Daniel Owens
387fd9986c
[typescript-fetch] fix API signature return type for empty 20x responses (#20249)
* typescript-fetch: fix promise return type for optional responses

* Remove unnecessary change
2024-12-05 13:44:08 +01:00
Jan Holy
f603f04bc4
[Kotlin] fix 20228 - spring-kotlin insert override modifier to interface if it is needed (#20246) 2024-12-05 10:01:02 +00:00
William Cheng
8035da8639
Revert "[Kotlin] fix #20231, OkHttp client can handle a field with a list of…" (#20257)
This reverts commit 71ccc88037216d973b0df12d4b6c618ae00b355b.
2024-12-05 17:04:42 +08:00
William Cheng
6ba311e85c
add a test for generateParameterId (#20256) 2024-12-05 12:59:26 +08:00
Jean-Pierre Portier
b2507777e6
fix (DefaultGenerator): Handle "$ref" parameter reference to identify parameter ID (#20239) (#20240) 2024-12-05 12:16:17 +08:00
William Cheng
f406f78978
[cpprestsdk] Better code format (#20237)
* remove blank lines

* fix summary, add line break bwtween vars

* update
2024-12-05 12:07:14 +08:00
Kirill Romanov
05d4aa9f62
[kotlin][client] support text/plain in okhttp (#20250)
* refactor: simplify application/octet-stream check

* feat: support text/plain in kotlin okhttp client

* refactor: remove redundant always-false condition

content is ByteArray is checked earlier
2024-12-05 11:51:10 +08:00
Thibaud Sowa
8a07557865
fix(typescript-angular): fix new angular dependency cli option usage (#20247)
Co-authored-by: Thibaud SOWA <thibaud.sowa@equasens.com>
2024-12-04 21:52:08 +01:00
Jorge Fernandez
71ccc88037
[Kotlin] fix #20231, OkHttp client can handle a field with a list of files (#20232)
* feat(issue-20231): Kotlin okhttp client handles correctly fields that are optional with multiple files.

* docs(issue-20231): add docstrings

* feat(issue-20231): Remove unnecessary test spec
2024-12-04 22:41:37 +08:00
Francesco Saverio
0183620854
[cpprestsdk] Implement Enum inside Objects (#19919)
* Fix #19566 implemented the missing definition of declared methods inside openapi-generator/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache, have also be added two missing body of methods definitions

* Regenerated cpp-restsdk client samples

* Fixed shared_ptr creation

* [cpprestsdk] Implement enum inside objects
2024-12-04 16:06:45 +08:00
Nate Todd
4a6dbace73
[elixir] Update dialyzer spec (#20024)
* Update evaluate_response spec to support returning a list of structs

* Update elixir samples
2024-12-04 15:25:24 +08:00
Fionn O'Connor
e131d52ad0
[kotlin-spring] Handle arrays of files correctly using MultipartFile (#20108)
* [kotlin-spring] Fix no List being used for an array of files using multipart/form-data

* [kotlin-spring] Use Spring's MultipartFile class for incoming Files instead of Spring's Resource class.

* [kotlin-spring] Add test to ensure that return type for files is `org.springframework.core.io.Resource`

* [kotlin-spring] Ensure Array is used for lists of files in generated Api class

* Update samples

* [kotlin-spring] Move conditional usage of MultipartFile to optionalDataType.mustache. Update samples

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-12-04 15:24:47 +08:00
William Cheng
b3d172a44f
use elixir petstore spec for testing (#20236) 2024-12-04 15:05:48 +08:00
William Cheng
24cb797a58 update link to join the Slack channel 2024-12-04 11:47:40 +08:00
Thibaud Sowa
423ba6739a
feat(typescript-angular): add support for Angular V19 (#20205)
* feat(typescript-angular): add support for Angular V19

fix #20204

* feat(typescript-angular): add options to override angular deps + refactor deps definition

add tsVersion, rxjsVersion, ngPackagrVersion and zonejsVersion options to override default config if new version of Angular is available but not yet implemented in openapi-generator
refactor Angular dependencies definition in separate readable yaml config file

fix #20204

* feat(typescript-angular): add better angular 19 exemple for ci testing

fix #20204

* feat(typescript-angular): unify tsVersion param

fix #20204

---------

Co-authored-by: Thibaud SOWA <thibaud.sowa@equasens.com>
2024-12-03 17:58:17 +01:00
Gregory Merlet
cf78f1028d
Fix dangerous destructuration in typescript-nestjs services (#20157)
* refactor: remove requestParameters destructuration

* feat: add reserved param names sample

* feat: quote params

* feat: improve with reservedWords

* feat: use vendorExtensions instead of extending CodegenParameter
2024-12-03 11:38:43 +01:00
Kirill Romanov
26609e9ad3
fix: register gson CustomTypeAdapterFactory in kotlin-client if generateOneOfAnyOfWrappers enabled (#20217) 2024-12-03 12:10:41 +08:00
William Cheng
25d780ee6d
update python multipart dep to 0.0.18 (#20225) 2024-12-03 12:08:29 +08:00
DielN
b9f6fe6b1f
[Java] [Microprofile] Add Json-B polymorphism type info annotations (#20164)
* [Microprofile] Add Json-B polymorphism annotations

* [Microprofile] Set openApiNullable in configs to false

* [Microprofile] Bump JSON Bind version to 3.0

* [Microprofile] Only apply JSON-B polymorphism for MP 3.0

* Update samples

* [Microprofile] Update documentation/configs for openApiNullable

* Update docs
2024-12-03 12:02:54 +08:00
Colin Ihrig
06f0b68eee
fix(typescript): remove incorrect file extensions (#20194)
* fix(typescript): remove incorrect file extensions

url, http, and https are Node.js core modules, and form-data
should be loaded using a bare specifier. This commit removes
the file extensions from these imports.

* update samples
2024-12-02 15:51:49 +01:00
Joris Dobbelsteen
1eaa75bd36
Fix python code when receiving JSON data without a property that is a dict to ref/enum causing AttributeError (#20022) 2024-12-02 16:25:23 +08:00
daniel
88be078c68
Trim the input of operationId filter in OpenAPINormalizer (#20186) (#20189) 2024-11-30 23:15:10 +08:00
Ingars Ribners
3f6c3de029
Updated README.mustache template for the Erlang server generator (#20138)
* Updated README.mustache file for the Erlang server generator. Fixed one error and updated the usage instructions

Changes made to the Erlang server generator's user instructions ("README.mustache" file):

1. Corrected the argument in section 4.1 of the user instructions.
   In openapi_server:start/2, the second argument for the generated Erlang code must now be in a different format than proposed in the instructions (see lines 13-16 of the "server.mustache" file).
   Initially, the server failed to start, and after some debugging, I discovered that the argument format did not match the server's expectations, causing the port number not to be passed to cowboy:start_clear/3. This has now been fixed.

2. Reviewed and updated the text of the user instructions to remove any ambiguities.

3. Tested the user instructions for accuracy and completeness.

* erlang-server sample recompiled

* README fix

* Fixed README.mustache template markdown for erlang-server. Re-generated erlang-server sample.

* Update README.mustache

* Sample 'erlang-server' re-generated

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-30 17:31:56 +08:00
William Cheng
878148e66d
update kotlin option description to clarify the support (#20211) 2024-11-30 13:32:15 +08:00
jops-wtakase
2aa49227b0
Bugfix: #1666: Change requestBody argument name to 'body' (#20207)
Since Connexion defaults to using 'body' as the argument name for the requestBody, the controller's argument name is adjusted accordingly.
2024-11-30 10:20:06 +08:00
Cedric Ziel
706c0a177e
fix: close quotes in cargo manifest (#20209) 2024-11-30 10:12:15 +08:00
William Cheng
711e53a90c
[Java] Add option to fallback to legacy enum naming (#20172)
* add option to fallback legacy enum naming (java)

* fix tests
2024-11-29 17:12:12 +08:00
Thomas Ville
34bd02109e
[rust][reqwest] support binary type for download (#20031)
* [rust][reqwest] support binary type for upload and download

* [rust][reqwest] support binary download in supportMultipleResponses contexts

* [rust][reqwest] support binary responses that don't have any return type
2024-11-29 17:07:30 +08:00
Timon Borter
326f100f0e
fix(#20201): static access to normalizeMediaType in typescript object serializer (#20202)
accessing `normalizeMediaType` should be done static in `ObjectSerializer`, as described
in https://github.com/OpenAPITools/openapi-generator/issues/20201.

fix applies only to the `typescript` generator.
2024-11-28 11:01:37 +01:00
William Cheng
25cfac0523
Update r petstore client test script (#20196)
* update R build and test script in petstore samples

* update
2024-11-28 17:20:37 +08:00
Matt Pollock
e3e06af5f4
[R] fix to-list and to-json functionality (#20132)
* [r client] fix to-list and to-json functionality

* fix type of json string

* wip

* refactor pr

* regenerate samples

* update to-dataframe example to use non-superceded tidyverse functions

* fix typo
2024-11-28 16:31:21 +08:00
Ernesto Fernández
037cb12f34
Tests for recent C fixes (#20200)
* [C] Add test schemas for the recent changes

The recent commit 47665aaa97cb ("Fix a few issues with the C generator
(part 1 version 2) (#14434)") didn't include any test schemas. Add them
now, as requested:

  https://github.com/OpenAPITools/openapi-generator/pull/14434#issuecomment-2497497110

* Update samples

* Fix sample update with missing files

* More fixes for sample updates
2024-11-28 16:27:42 +08:00
Nelson Vides
f8ca36b97e
Erlang server – minor fix to return type and generated doc (#20197)
* erlang-server: add jesse to app.up release

* erlang-server: remove dialyzer errors that might not be related to the program

* erlang-server: minor fixes to return types and generated docs
2024-11-27 22:09:21 +08:00
Ernesto Fernández
47665aaa97
Fix a few issues with the C generator (part 1 version 2) (#14434)
* C: add a template for an empty any_type.h header

Some generated C apis fail to build because the source files get
'#include "any_type.h"' lines, but no such header gets generated. As a
simple fix, add a new template for an empty file with that name. This is
enough to fix the problem for us, because all the generic type stuff is
handled by object_t.

* C: fix enums

I'm guessing that enums have not been used much with the C generator
before, because they always seem to produce code that doesn't build, or
that tries to free them after use. This patch fixes all the problems
we've encountered so far, except for those that need checking the return
type. I'll come back to that later.

* C: fix confusion of 'classname'/'classFilename'

* C: fix issues with returned enums

Currently, the C templates never check if a function returns an enum
inside mustache, so when that happens the generated code has broken
return types and doesn't build. I originally tried to fix this by
extending CodegenOperation to implement a 'returnTypeIsEnum' check, but
William Cheng suggested[1] that I use the existing 'returnProperty'
instead:

  https://github.com/OpenAPITools/openapi-generator/pull/14379#discussion_r1064636735

So do that.

* C: update the samples

As required for a pull request, run the generate-samples.sh script and
commit the changes.

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-27 18:16:10 +08:00
Per Hallgren
8a94fc667e
[BUG][GO] use value receiver for JSON marshal (#19962)
* chore(go): add failing test for JSON marshalling

Adds a small schema (FruitJuice) which contains a required gmFruit,
which inherits using AnyOf. This fails to correctly marshal as JSON.

* fix(go): use non-pointer receiver for JSON marshal

In the case of a required anyOf property, JSON marshalling would has
been incorrect.

Required properties are not nullable, and thus always use value
receivers. For the single case of anyOf models, a pointer receiver was
used for MarshalJSON. All other instances of json marshalling use value
receivers.

This change is simply to use a value receiver instead of a pointer
receiver in the template for `MarshalJSON` on anyOf models.

---------

Co-authored-by: Per Hallgren <perhallgren@users.noreply.github.com>
2024-11-27 18:09:11 +08:00
Qluxzz
705261978d
[Elm] Fix not compiling all elm files in test suite (#20191)
* Fix not trying to compile all elm files

* Validate that changes to pipeline works
2024-11-27 15:44:21 +08:00
jops-wtakase
7b35613cfc
[python] Encode list query params (#20148)
* Bugfix: #17688: Encode list query params

* Test: #17688: Update validation error message tests for Pydantic 2.10+

Pydantic 2.10+ introduced changes to validation error messages,
requiring updates to the affected test cases.
2024-11-26 23:53:12 +08:00
Victoria Casasampere Fernandez
7072009ab5
[Rust-Axum] Support quotes in string literals (#20176)
* Allow quotes in string literals

* Update samples
2024-11-26 21:36:11 +08:00
Linh Tran Tuan
19e21416ed
[Rust-Axum] BugFix: handling non-lowercase Header in Request/Response (#20178) 2024-11-26 18:39:29 +08:00
Qluxzz
ed211050f1
[Elm] Fix not sanitizing param name (#20171)
* Add failing example

* Sanitize param name

* Regenerate fixed sample

* Override toParamName instead
2024-11-26 17:30:04 +08:00
Lennard Sprong
55f02e995b
[swift6] Change Response to struct (#20185) 2024-11-26 08:30:50 +00:00
Lennard Sprong
af89ed8043
[swift5] Add Identifiable conformance to supported models (#20179) 2024-11-25 17:43:51 +00:00
Victoria Casasampere Fernandez
a7cacce30e
[Rust-Axum] Dynamically set the types of integer literals (#20133)
* Dynamically set the types of integer literals

* Change the literal limits from i32 to adaptive limits

* Remove length literal types
2024-11-26 00:24:06 +08:00
Lennard Sprong
4c5a57fe7b
[swift6] Add Identifiable conformance to supported models (#20166) 2024-11-24 22:35:17 +00:00
Bragolgirith
8ce332a540
[Java] Fix compilation for Map of InnerEnum (#19401) 2024-11-25 00:40:44 +08:00
altro3
cdafa5a0cc
Deprecate micronaut openapi generator (#20107)
* Deprecate micronaut openapi generator

* update get help message

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-24 23:26:37 +08:00
Kevin
5ae8c03e6f
Ensures a JsonCreator annotated constructor is present if there are required fields, and ensure the getters and setters are properly annotated with required=true / required=false for jaxrs-spec generator. (#19578) 2024-11-24 22:15:55 +08:00
Matt Pollock
6399a7a97e
[R] improve binary/text response handling (#20131)
* [R client] better support for binary/compressed responses

* cleanup

* revert change after PR review

* update samples

* fix R tests

* move private api methods to api-client, revert breaking method name change
2024-11-24 22:12:39 +08:00
dmnlk
c33d3aaae9
add PHP8.4 CI (#20168) 2024-11-24 18:27:49 +08:00
dmnlk
c831983866
PHP8.4 comptible, php-symfony resources (#20162)
* matrix php build

* NullableTypeForNullDefaultValue

* update sample
2024-11-24 16:00:35 +08:00
William Cheng
093a51ee21
Resolve inline schemas in webhooks (#20165)
* resolve inline schemas in webhooks

* update samples
2024-11-24 15:59:05 +08:00
Qluxzz
1ba18a09a1
[Elm] Add missing operation summary (#20147)
* Add missing operation summary

* Regenerate samples

* Print notes and or summary if any exists

* Regenerate clients
2024-11-22 21:29:08 +08:00
Ross
23aa2e2cb2
Added default headers to ServerError<T> for Kotlin OkHTTP generator (#20161) 2024-11-22 13:10:22 +00:00
Lennard Sprong
2b891f6da9
[swift6] Add checked Sendable conformance to Validation structs (#20150) 2024-11-21 11:23:54 +00:00
Lennard Sprong
c06db15750
[swift6] Add conditional Hashable conformance to NullEncodable (#20149) 2024-11-21 11:22:05 +00:00
Benjamin Einaudi
18b01ca455
fixes(java/restclient) Force usage of custom converter (#20112)
* fixes(java/restclient) Force usage of custom converter

Insert custom converter at the beginning of the 'RestClientBuilder' converter list so as not to use default 'MappingJackson2HttpMessageConverter' 

Close #20111

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-19 16:15:51 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
William Cheng
12dfe8fe74
prepare 7.10.0 release (#20128) 2024-11-18 18:59:21 +08:00
William Cheng
6b9f6bd2b1 update java samples 2024-11-18 18:47:40 +08:00
Christian Beikov
4185782ddc
[#20125] Remove unnecessary model package import to avoid ambiguous class references (#20124)
* Remove unnecessary model package import to avoid ambiguous class references

* Regenerate JSON files
2024-11-18 17:43:14 +08:00
jasonjyu
51a0bd00b7
Replaced deprecated 'summary' attribute with recommended 'caption' element (#19961) 2024-11-18 17:34:55 +08:00
William Cheng
1a58d31a81 update gdscript samples, docs 2024-11-17 10:55:57 +08:00
Antoine Goutenoir
959cf1c3c9
[GdScript] Templates for GdScript (Godot 4) (#19267)
* feat(gdscript): sketch implementation of gdscript target language

This does not really work yet, but it's a start.
Results are not denormalized, no support for enums nor datetimes,
and thousands of other features are missing.

I still don't know how we are going to denormalize JSON+LD
without writing a whole GDScript lib for it…

* feat: add an exhaustive list of keywords reserved in GDScript

I've also provided the small python script I used to generate the list.

* refacto(gdscript): start using partials in templates

Whilst I'm racking my brains trying to figure out integration testing…

* test(gdscript): prepare a demo and integration testing

* fix(gdscript): do not use subclasses, use plain POGO

(plain ol' godot object)

One: I don't know how they work under-the-hood.
Two: I'm very confused over-the-hood.
Tri: We do not need them.

* refacto(gdscript): move demo files to their own directory

I know I'm making a lot of commits for not much,
but now I'm opening the sample files with Godot as well,
and doing unholy things with filesystems,
so I'm not taking any chances.

It's all going to be squashed anyway.  :)

* fix(gdscript): sample as a Godot project

It works !  I can now write integration tests in GDScript.
The real work starts now.

/spend 25h

* feat(gdscript): serialize and send body params

The test suite is now past its first hurdle, the 415 HTTP status code,
and went straight into an unexpected error 500.

I suspect the server does not like me trying to set the pet id at 0,
because that's what we're trying to do right now.

Godot is crashing a lot, mostly because I don't know how to make Callable.NOOP
and my current solution hints at optional on_success and on_failure,
yet if we omit them the engine will ragequit.

* feat(gdscript): check request body for required yet missing properties

Now we'll get a nice error when we forget to set a required property.

The demo is now able to:
- connect
- create a user
- login as that user
- create a pet

* feat(gdscript): namespace core classes as well with apiPrefixName

This makes our usage of `class_name` a little more acceptable.

* feat(gdscript): support prefixes and suffixes for class names

This will crutch namespacing well enough for most uses.

* feat(gdscript): handle enums, naively

* feat(gdscript): support basic API endpoint param constraints

- minLength
- maxLength
- minItems
- maxItems
- minimum
- maximum
- pattern (no flags)

* feat(gdscript): handle header params and header customization

We also support serializing to application/x-www-form-urlencoded now.

Next up: DateTimes !

* feat(gdscript): handle Date and DateTime like Strings

There's no timezone support in Godot for DateTimes.

* feat(gdscript): support plain text responses

* feat(gdscript): support collections of models

Those are Arrays, not custom collection objects.

* feat(gdscript): configure default host from OAS

* feat(gdscript): some documentation and better config

We don't need no factories nor singletons ; config is enough.

* docs(gdscript): document usage a little

* feat(gdscript): add more reserved words, skip jsonld models and configure features

We can now generate a client for an OAS server running ApiPlatform (PHP).

* feat(gdscript): improve logging with a configurable log level

* feat(gdscript): add support for Basic Bearer and Header ApiKey

(but I can't find the `description` template handler)

* fix(gdscript)

Too late to amend >.<

* fix(gdscript)

dangsarnit

* chore(gdscript): clean up a sprint artifact

* fix: don't forget the HTTP error code when relevant

* feat: use Resource as base class for models

* fix. Default string values now with "quotes"

* temporary remove settings as godot api have changed

* kick ci

* docs: review gdscript java class

* feat: support for TLS, some refacto, some review

There's still a lot of holes, TODOs and FIXMEs.

* feat: experimental support of Request inline objects

The inline response objects are still not supported.

* feat(gdscript): support inline request and response objects

* chore(gdscript): review the templates

* fix(gdscript): unexpected nulls in default values

{{#if defaultValue}} evaluates to true for null if we call super here.

* refacto(gdscript): replace "bee" prefix by "bzz", use a constructor

Now we pass the config and the client via the constructor.
This reduces the area of the public surface a bit, for the better I think.
This commit also cleans up the class name shenanigans.

* fix(gdscript): add missing file

* test(gdscript): refactor the test project to use the generated lib as addon

Since there is no singleton in the generated client, the addon need not be enabled in the project configuration to be usable.

The --headless mode is broken for now, as things changed in Godot 4 since the beta.

* docs(gdscript): document petstore server ADR

* test(gdscript): add GUT and an integration test

We used the latest stable GUT, but a feature we're going to need was merged today, so we'll need to update it either to master or to the next release at some point.

* refacto(gdscript, breaking): use an ApiResponse object in success callbacks

/spent 6d since the beginning

* test(gdscript): update integration tests

/spend 2h

* docs(gdscript): explain the new ApiResponse

Also moving core templates to their own subdir, for clarity.

/spend 10m

* chore(gdscript): review, document, clean up

/spend 2h

* test(gdscript): test the delete operation as well

/spend 7m

* feat(gdscript): update GUT and exit with appropriate code

/spend 2h

* docs(gdscript): add Gdscript's PI

Hire me while I'm available !  :D
I'd rather code than make a CV.

* feat(gdscript): support reserved keywords

Also adding some more assertions,
and using our own OAS file now.

/spend 3h

* refacto(gdscript): use "base" instead of "bee"

/spend 1h

* feat(gdscript): improve descriptions

/spend 1h

* fix(gdscript): await before polling

Contributed by @jchu231

* docs(gdscript): review the template files

* docs(gdscript): review and generate docs

---------

Co-authored-by: Bagrat <b.saatsazov@gmail.com>
2024-11-17 10:48:19 +08:00
Nelson Vides
86a18bfb62
erlang-server: add jesse to app.up release (#20120)
* erlang-server: add jesse to app.up release

* erlang-server: remove dialyzer errors that might not be related to the program
2024-11-17 10:07:03 +08:00
Tim
66908020e0
[python-pydantic-v1] Fix bug in serialization for SecretStr by applying changes from #18023 (#20102)
* Apply changes of #18023

* Regenerate samples

---------

Co-authored-by: tweber2 <tim.weber@vector.com>
2024-11-16 21:48:11 +08:00
dependabot[bot]
7087104741
Bump cross-spawn from 7.0.3 to 7.0.5 in /website (#20116)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-16 18:04:04 +08:00
William Cheng
02847e9323
Update minimum supported version of python in docs to 3.8+ (#20118)
* Update minimum supported version of python in docs

* update samples, docs

---------

Co-authored-by: Hugo Posnic <hugo.posnic@protonmail.com>
2024-11-16 18:01:50 +08:00
Alexander Fetisov
b44ba666aa
adding support for @ResponseStatus annotation into spring-http-interface java spring generator (#20071)
* adding support for useResponseEntity into spring-http-interface java spring generator

* adding samples for @StatusResponse into spring-http-interface java spring generator

* additional changes to sample
additional changes to samples jdk17

* adding sample files

* extra adjustments

* fixing generator version

* fixing status code in samples

* some rollback

* some rollback 2
2024-11-16 15:52:11 +08:00
Victoria Casasampere Fernandez
d7a23a9fcf
[Rust-Axum] Fix compilation error when validate is used on Nullable values (#20100)
* Fix compilation error when validate is used on Nullable values

* Update samples

* Switch Nullable Into Option trait implement to From

* Update samples from rebase
2024-11-15 22:03:59 +08:00
Bruno Coelho
293524785e
[swift][client] rename api client to api configuration (#20103)
* [swift][client] rename api client to api configuration

* [swift][client] rename api client to api configuration

* [swift][client] rename api client to api configuration

* [swift][client] rename api client to api configuration

* [swift][client] rename api client to api configuration

* [swift][client] rename api client to api configuration

* Update modules/openapi-generator/src/main/resources/swift6/api.mustache

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>

* [swift][client] rename api client to api configuration

* Update modules/openapi-generator/src/main/resources/swift6/api.mustache

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>

* Update modules/openapi-generator/src/main/resources/swift6/api.mustache

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>

* Update modules/openapi-generator/src/main/resources/swift6/api.mustache

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>

* Update modules/openapi-generator/src/main/resources/swift6/api.mustache

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>

* Update modules/openapi-generator/src/main/resources/swift6/api.mustache

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>

* Update modules/openapi-generator/src/main/resources/swift6/api.mustache

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>

* [swift][client] rename api client to api configuration

---------

Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
2024-11-15 09:35:51 +00:00
Jan Škrášek
96adf2f8f5
Fix explicit KSerializer's name & generation when used in container (#20093)
* [kotlin][client] properly reference the same custom serializer name

* [kotlin][client] properly use correct type when enum in container
2024-11-14 14:11:08 +00:00
Jan Škrášek
d442fc9a65
[kotlin][client] do not generate Serializable(forClass) annotation as the serializer is already defined (#20092) 2024-11-14 14:10:07 +00:00
William Cheng
1ceb36f182 update java samples 2024-11-14 15:13:46 +08:00
William Cheng
344a2102e8 Merge branch 'master' of https://github.com/openapitools/openapi-generator 2024-11-14 14:50:10 +08:00
DielN
216ba30172
[JAVA] Add missing dependencies in templates (#20075)
* Add commons-lang3 dependency for useReflectionEqualsHashCode

* Fix feign-no-nullable config/sample

* Add commons-lang3 dependency to jersey2

* Add & update mutiny dependency for microprofile

* Regenerate samples
2024-11-14 14:08:26 +08:00
Linh Tran Tuan
ee698f1e6d
[Rust-Axum][Breaking Changes] Extracting Claims in Cookie/Header (#20097)
* [Rust-Axum][Breaking Changes] Extracting Claims in Cookie/Header

* Update

* Update
2024-11-14 14:05:30 +08:00
William Cheng
57d567e0d0 update slack invite url in homepage 2024-11-13 21:31:05 +08:00
William Cheng
975f4d4679 update slack url 2024-11-13 21:29:29 +08:00
William Cheng
301af6050b
fix allOf with properties for ref as parent rule (#20083) 2024-11-13 21:27:19 +08:00
Nelson Vides
a95ea1f519
erlang-server: Extend provided return and make the type available (#20088) 2024-11-12 22:27:37 +08:00
Nelson Vides
20b5059aa5
Erlang server (#20087)
* erlang-server: Extend provided return

* Regenerate erlang-server handlers
2024-11-12 21:26:58 +08:00
William Cheng
85f711236c update scala samples 2024-11-11 18:54:20 +08:00
Aaron Pritzlaff
6792218775
Scala Cask oneOf support (#20051)
* added support for 'oneOf' types represented as unions

also updated libs and an 'errors' field rename to address
name clashes with likely/popular field names

* Created cask-specific petstore example which 
Includes a oneOf and allOf example
2024-11-11 18:46:27 +08:00
0xNF
bfcfc6ff25
[Dart2] Added better double handling to 'mapValueOfType<T>', which previously would fail when deserding doubles (#17808) 2024-11-11 18:33:08 +08:00
William Cheng
6bc8e0bffc
Fix duplicated operationId with new rule in normalizer (#19872)
* fix duplicated opeationId with new rule in normalizer

* update workflow

* update samples

* update samples

* update java samples
2024-11-11 18:12:46 +08:00
qirex
e8c9722d6b
[typescript-angular]: replace hasRequiredVars with hasRequiredParams for angular generator (#20077)
Co-authored-by: qirex <qirex@gmx.net>
2024-11-11 09:59:30 +01:00
DielN
2a17134628
Add equals and hashCode methods to Microprofile (#20011)
* Add equals and hashCode methods to microprofile

* Add missing import

* Update samples

* Add missing dependency for reflection equals
2024-11-10 17:43:19 +08:00
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
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
William Cheng
8f7d9f7467
update samples (#19882) 2024-10-16 15:55:57 +08:00
James Ring
c487a6ea18
Fix missing serverConf variable (#19859)
Previously, if an operation had a 'servers' block, the template would
emit code requiring a `serverConf` local variable. Unfortunately, the
template would not emit this variable, because it was looking for a
`servers` variable in the wrong context.

This change makes the template emit an anonymous block containing a
unique server configuration for each operation.

I did not test this change beyond a simple code inspection, there are
other problems with the code generator which prevent it from running on
my API definition.
2024-10-16 15:45:18 +08:00
William Cheng
21a8e4e623
[python-fastapi] Update fastapi, starlette to newer versions (#19880)
* update fastapi, starlette dep to newer verions

* update samples
2024-10-16 14:17:38 +08:00
Peter Storch
b1dd6b262e
fix Api Interface for kotlin-spring with spring-cloud library (#19877) 2024-10-15 18:41:48 +01:00
Jazzco
1214ad7492
Update HttpRequest.cpp.mustache - use stable 4-parameter connect (#18893)
* Update HttpRequest.cpp.mustache

Use stable 4-parameter connect

* add generated files

* Revert "add generated files"

This reverts commit 1d4e78aa0d42208b576354276c274000c29863f9.

* changed from 3- to 4-parameter connect for api-body for stable connection (see warning [clazy-connect-3arg-lambda])

* ran step 3 from Linux

* fixed missing braces and additional 3par issues

* add step 3 generated file

* activate trace for more info about link issue

* Update .github/workflows/samples-cpp-qt-client.yaml

Co-authored-by: Martin Delille <martin@delille.org>

* Update .github/workflows/samples-cpp-qt-client.yaml

Co-authored-by: Martin Delille <martin@delille.org>

* Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp

Co-authored-by: Martin Delille <martin@delille.org>

* Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp

Co-authored-by: Martin Delille <martin@delille.org>

* Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp

Co-authored-by: Martin Delille <martin@delille.org>

* Update samples/client/petstore/cpp-qt/client/PFXPetApi.cpp

Co-authored-by: Martin Delille <martin@delille.org>

* rebuild examples

* Update modules/openapi-generator/src/main/resources/cpp-qt-client/api-body.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* removed braces and updated examples

* rebuild samples

* remove false generated changes

---------

Co-authored-by: Martin Delille <martin@delille.org>
2024-10-16 00:08:40 +08:00
William Cheng
4ddfb6fc41
update generator faq (#19869) 2024-10-15 16:50:39 +01:00
William Cheng
3b3f9a770a
refacot is null schema check (#19873) 2024-10-15 17:17:28 +08:00
Bruno Coelho
2354d402a8
[swift6] promote to beta and improve documentation (#19856)
* [swift6] promote to beta

* [swift6] format code

* [swift] authentication docs

* [swift] update docs

* [swift] update docs

* [swift] update docs

* [swift] update docs

* [swift] update docs

* [swift] update docs

* [swift] update docs

* [swift] update docs

* [swift] update docs

* [swift] update docs
2024-10-14 12:55:25 +01:00
Alec Petersen
b5b760a8a2
[csharp] Address obsolete build warnings in ApiClient (#19847)
* Stop using obsolete MaxTimeout

* Convert timeout to a timespan, rather than update the configuration object

* Use async overload of RestClientExtensions.Deserialize

* Update samples

* Fix typo

* Undo timeout change
2024-10-14 15:44:12 +08:00
Daniel Simon
8849156d29
Remove further Qt support before Qt 5.15.2 (#19824)
* Remove further Qt support before Qt 5.15.2

This is a follow-up pull request for [#19164] (https://github.com/OpenAPITools/openapi-generator/pull/19164), which removes the further handling of older Qt versions.

* Updates samples to match the mustach config files.

---------

Co-authored-by: Daniel Simon <mail@dlins.de>
2024-10-14 11:09:58 +08:00
William Cheng
2838b9584b
add logic in normalizer to auto fix self-reference schemas (#19849) 2024-10-12 16:39:48 +08:00
William Cheng
d1ca82cb8b auto fix self-reference schemas 2024-10-12 16:12:23 +08:00
Bruno Coelho
462f450366
[kotlin] Map file and binary to ByteArray (#19840)
* [kotlin] Map file and binary to ByteArray

* [kotlin] Map file and binary to ByteArray
2024-10-11 08:59:16 +01:00
Bruno Coelho
185c0639c0
[swift6] simplify authentication (#19839) 2024-10-11 08:36:35 +01:00
William Cheng
715f6b634e
add @e5l to kotlin technical committee (#19843) 2024-10-11 15:09:28 +08:00
Leonid Stashevsky
7f899dff97
[Kotlin Server] Update Ktor to latest version; move config to kts (#19727)
* [Kotlin Server] Update Ktor to latest version; move config to kts

* Bump gradle version for kotlin server samples

* Replace deprecated gradle API

* Bump gradle to 7.6.4
2024-10-11 11:44:53 +08:00
Ben Meyrick
368b9b7e37
[TypeScript - Angular] Add syntax highlighting to code blocks and correct heading levels in README.mustache (#19837)
* Improve typescript-angular README.mustache

- Add syntax highlighting to code blocks
- Correct heading levels

* Add space between heading and convert bare url to angle brackets link

* Update samples
2024-10-10 17:57:16 +02:00
Marvin Sommer
a84946bdb3
[Java Spring] Fix copyOf inheritance using empty object instead of passed value (#19426)
* Fix copyOf inheritance using empty object instead of passed value

* Generate new samples
2024-10-10 16:52:38 +08:00
William Cheng
d9cdecf3c3
commnet out gh pages publish (#19831) 2024-10-10 15:38:22 +08:00
William Cheng
b357744048
Fix python-fastapi signature of parameters for method (#19830)
* Fix python-fastapi signature of parameters for method

* update

---------

Co-authored-by: Diorcet Yann <diorcet.yann@gmail.com>
2024-10-10 15:36:22 +08:00
vcutrona
45fa4384e7
[python] Check if the given input is a container (Array or Map) when validating enum values (#19316)
* checks if input is Array or Map in validate_enum

* update samples
2024-10-10 14:57:04 +08:00
William Cheng
ea4b17c32f add missing semi colon in travis.yml 2024-10-10 14:55:59 +08:00
martin-mfg
b730e36937
[JAVA] fix several anyOf/oneOf problems (#19817)
* erasure duplicates

* sanitize beanValidation

* oneOf maps

* anyOf

* update samples
2024-10-10 14:50:18 +08:00
jops-wtakase
43fd18935c
[python-flask] Fix #19487 SyntaxWarning (#19489)
* Bugfix: #19487: Fix SyntaxWarning

* Fix a bug which generates SyntaxWarning

* Chore: #19487: Generate sample
2024-10-10 14:48:02 +08:00
William Cheng
30e6612558 minor fix to travis.yml 2024-10-10 14:28:05 +08:00
Norman Schimmrich
d14eab8446
[kotlin-client][jvm-spring-webclient] Extract data from PartConfig for multipart/form-data requests (#19811) 2024-10-10 13:41:55 +08:00
William Cheng
627c0f43cd
uncomment workflow to publish doc (#19821) 2024-10-09 13:07:41 +08:00
Aaron Pritzlaff
31be9b9207
scala-cask fix: Added support for 'additionalProperties:true' (#19767)
* Added support for 'additionalProperties:true' to scala-cask generator

additionalProperties means the request can contain arbitrary
additional properties, and so this change adds an 'additionalProperties'
field to request objects which is a json type.

* fixed warning in example scala-cli project

* updated samples

* addressed codegen comments
2024-10-09 11:15:25 +08:00
martin-mfg
d60200de38
improve java enums (#19815) 2024-10-09 10:46:17 +08:00
Alex Wallen
22b8c47b93
feat: add middleware for create actions (#19793)
* feat: add middleware for create actions

* chore: update samples

* chore: update typescript sample?
2024-10-09 10:38:22 +08:00
Hui Yu
ba169342a1
[C][Client] Add gcc predefined macros to reserved keywords (#19791) 2024-10-09 01:38:12 +08:00
Joscha Feth
b3b3f46ee2
docs: release links and list (#19810)
references #19809

cc @wing328
2024-10-08 19:20:20 +08:00
William Cheng
25b834131c update k6 samples 2024-10-08 17:32:41 +08:00
MrRober
7c84177e65
Remove calculateRequestOrder Function and fix bug (#19685)
* Remove calculateRequestOrder Function

This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue #19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.

* delete import java.lang.*;

* delete import java.lang.*;

* Remove calculateRequestOrder Function

This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue #19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.

* delete import java.lang.*;

---------

Co-authored-by: rmarqmo <rmarqmo@mercadona.es>
2024-10-08 17:27:39 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
William Cheng
4145000dfe
prepare 7.9.0 release (#19808) 2024-10-08 10:30:09 +08:00
CaptainAye
a82475ed4e
Fix java rest client's ApiClient constructors to make sure objectMapper parameter is used in the client (#19667) (#19795) 2024-10-08 09:47:16 +08:00
dependabot[bot]
7cf84e2daf
Bump s4u/setup-maven-action from 1.14.0 to 1.15.0 (#19807)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.14.0...v1.15.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-10-08 09:34:58 +08:00
Kunitsyn Oleg
4ff8c3aaef
[Python][Client] Allow all content-types with text/ prefix (#19802)
* ODM-12108: allow all content-types with text/ prefix

* ODM-12108: Update deserialization tests

---------

Co-authored-by: Oleg Kunitsyn <you@example.com>
2024-10-08 09:34:36 +08:00
roelwuytens-androme
7d1e9997d0
[Kotlin] Allow other content-types when only interested in status-code / Unit (#19801)
* Allow Unit response

* Updating samples

* Improve comment for Unit shortcut
2024-10-07 13:18:51 +01:00
Bruno Coelho
9a0fc5900f
[swift6] urlsession interceptor (#19797)
* [swift6] alamofire interceptor

* [swift6] alamofire interceptor

* [swift6] urlsession interceptor

* [swift6] urlsession interceptor

* [swift6] urlsession interceptor
2024-10-07 12:16:18 +01:00
Bruno Coelho
4c81563708 Update PHP samples 2024-10-07 11:27:35 +01:00
kruegge82
5902af4e75
in case of defined status codes > 299 switch will have no effect. issue 7788 (#19483)
* in case of defined status codes > 299 switch will have no effect. As described in issue 7788

so we get only an error if statusCode is not defined AND not between 200 and 299

https://github.com/OpenAPITools/openapi-generator/issues/7788

* in case of defined status codes > 299 switch will have no effect. As described in issue 7788

so we get only an error if statusCode is not defined AND not between 200 and 299

https://github.com/OpenAPITools/openapi-generator/issues/7788
2024-10-07 16:01:36 +08:00
Bruno Coelho
39fb51062b
[swift6] alamofire interceptor (#19796)
* [swift6] alamofire interceptor

* [swift6] alamofire interceptor
2024-10-07 08:37:03 +01:00
Nelson Vides
77e8346fd7
[Erlang Server] Add more type information and fix minor bugs (#19792)
* Add type information about classes and operation-ids

* Remove unused logger included header

* Bugfix badmatch in delete_resource handler

* Bugfix: respect original indentation of operation_ids

* Bugfix json schema correct refs

* Add a bit more documentation

* Regenerate erlang-server handlers
2024-10-07 15:28:14 +08:00
Francesco Saverio
9163e00932
Implemented missing definitions of declared methods inside modelbase-header.mustache, added two missing body of methods definitions (#19569)
* Fix #19566 implemented the missing definition of declared methods inside openapi-generator/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache, have also be added two missing body of methods definitions

* Regenerated cpp-restsdk client samples

* Fixed shared_ptr creation
2024-10-07 14:06:06 +08:00
William Cheng
2f3f25dee2 update samples 2024-10-07 11:17:52 +08:00
devhl-labs
28ae69dafd
[windows] Fixed missing output (#19715)
* 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
2024-10-07 10:58:05 +08:00
Alec Petersen
6745340c64
Make DateOnly nullable in the csharp client codegen (#19333) 2024-10-07 10:49:17 +08:00
Alec Petersen
c7d9857c8d
[csharp] Output DateOnly paramater in the correct default format (#19728) (#19729)
* Output DateOnly in the correct default format

* Only add conditional if we are net60 or later

* Update samples
2024-10-07 10:48:50 +08:00
devhl-labs
fce8bb9604
support formatting date only (#19785) 2024-10-07 10:23:00 +08:00
William Cheng
c8fad42324 update samples 2024-10-07 08:53:30 +08:00
Joscha Feth
2f73582d82
fix(core): single value enums (const) are not generated correctly in 3.1 specs (#19696)
* fix(core): single value enums (`const`) are not generated correctly in `3.1` specs

* fix: const enums

* chore: update samples

* chore: update samples
2024-10-06 23:16:48 +08:00
Joscha Feth
899ddecdbd
feat(avro)/refactor(core): unify *_POST_PROCESS_FILE behaviour and reuse code (#19761)
* feat(avro)/refactor: unify `*_POST_PROCESS_FILE` bahviour and code

* refactor: use existing function

* test: add simple test for post processor execution

* test: restrict concurrency to 1

* docs: add explanation to method
2024-10-05 17:25:17 +08:00
William Cheng
98468aba5c
minor improvemetns to new scala client generator (#19786) 2024-10-05 17:15:37 +08:00
William Cheng
fbebfeb774 update doc 2024-10-05 17:08:14 +08:00
Jenny G. L.
9791e6f537
[Scala][Client]Add Http4s scala3 client codegen (#19658)
* fix attemp

* use java.time.Instant

* fix client gen

* Tweeks

* header and form

* use scala 3 enum

* more tweeks

* add additional properties; add auth

* add form media type

* add modelsOnly

* add unit tests

* add petstore samples

* add doc

* add new samle to .github/workflows/samples-scala.yaml

* update build.sbt template

* simply the baseclient

* add None to optional field

* tweek auth model and format

---------

Co-authored-by: Jenny Leahy <jennyleahy@JENNYLEAHY.localdomain>
2024-10-05 17:00:19 +08:00
Viacheslav Pivovarov
e5dee54797
[R][client] Make enum parameters with required: false optional to request arguments (#19654)
* ODM-11697: Adding null check in R-api

* bin/generate-samples.sh executed

---------

Co-authored-by: Kunitsyn Oleg <114428801+genestack-okunitsyn@users.noreply.github.com>
2024-10-05 15:12:30 +08:00
William Cheng
77eb192414 update php samples 2024-10-05 15:02:54 +08:00
Imants Horsts
5e7cf1cfdd
By default should use static configuration class instance, otherwise new instance is created every time (#19775) 2024-10-05 14:57:08 +08:00
William Cheng
ad6c2dd2b7
[normalizer] bug fixes (isNullTypeSchema, handling of primitive types with oneOf) (#19781)
* better handling of primivitype type with oneOf

* fix null check, add tests

* add check for properties
2024-10-05 13:57:11 +08:00
Bruno Coelho
8e10dd7be7
[swift6] add samples that test upload files as data (#19780)
* [swift6] upload files as data

* [swift6] upload files as data

* [swift6] upload files as data

* [swift6] upload files as data

* [swift6] upload files as data

* [swift6] upload files as data
2024-10-04 15:52:48 +01:00
Bruno Coelho
66cde8b5f4
[swift6] make async await the default response library (#19776)
* [swift6] make async await the default response library

* [swift6] make async await the default response library

* [swift6] make async await the default response library
2024-10-04 08:05:05 +01:00
Joscha Feth
cfe6520283
fix(avro-schema): fix NPE for null enum values (#19771) 2024-10-04 12:56:11 +08:00
Pascal Bachor
817da39124
[Python] Restore required dev dependency + Adjust generated Github workflow (#19773)
* Restore required python client dev dependency pytest-cov

* Harmonize python client workflow definitions

---------

Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2024-10-04 00:39:45 +08:00
Beppe Catanese
67942aa478
[Typescript-Node] Mark deprecated endpoints (#19770)
* Add @deprecated tag for deprecated operations

* Add test helper to verify a given line

* Add test to verify deprecated method

* Regenerate samples

* Delete tmp files after test

* Remove assertFileContains on specific line

* Update modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache

Co-authored-by: Joscha Feth <joscha@feth.com>

* Correct indentation

* Regenerate samples

---------

Co-authored-by: Joscha Feth <joscha@feth.com>
2024-10-03 17:45:04 +02:00
Bruno Coelho
06d914dd0f
[swift6] useSPMFileStructure by default (#19772)
* [swift6] useSPMFileStructure by default

* [swift6] useSPMFileStructure by default

* [swift6] useSPMFileStructure by default
2024-10-03 16:23:43 +01:00
William Cheng
5f345c0213 update php samples 2024-10-03 21:10:30 +08:00
Bruno Coelho
c9a9ae0aa8
[swift6] move infrastructure file inside infrastructure folder (#19765)
* [swift6] replace AnyCodable with JSONValue

* [swift6] create infrastructure folder

* [swift6] replace AnyCodable with JSONValue

* [swift6] create infrastructure folder

* [swift6] replace AnyCodable with JSONValue

* Try to fix CI
2024-10-03 14:06:18 +01:00
Markus Holstein
2437d7fa97
[PHP-Client] Allow Content-Type merge-match+json for encoding (#19479)
* Allow Content-Type merge-match+json for encoding

* Changes JSON recognition to more flexible regex

* Removes now useless JSON format list

* Removes empty spaces

* Adds explanatory PHPDoc comment

* Moves Json-detection to class HeaderSelector
2024-10-03 20:53:15 +08:00
Beppe Catanese
d521cddc3b
Remove unnecessary files (#19769) 2024-10-03 13:56:35 +02:00
Bruno Coelho
c48ef148c0
[swift] remove unused lenientTypeCast option (#19764)
* [swift6] remove unused lenientTypeCast option

* [swift6] remove unused lenientTypeCast option

* [swift5] remove unused lenientTypeCast option
2024-10-03 12:11:16 +01:00
Bruno Coelho
74100e44cb
[swift6] replace AnyCodable with JSONValue (#19763) 2024-10-03 10:58:06 +01:00
William Cheng
577483c2e2 update rust axum samples 2024-10-03 16:10:27 +08:00
faro-dr
d193050a35
Fix rust axum doc tests (#19538) (#19539) 2024-10-03 16:01:29 +08:00
Syd Besco
9f2bd313ff
[POWERSHELL] fix: keep array context when converting to json (#19535) 2024-10-03 15:57:21 +08:00
WouterBaeyens
6686c4d02f
[BUG] HandlebarsEngineAdapter.java failed to use custom FieldValueResolver causing IllegalAccessException for maps (#19634)
* Update HandlebarsEngineAdapter.java

The old MY_FIELD_VALUE_RESOLVER.INSTANCE is equivalent to FieldValueResolver.INSTANCE, which is assigned `new FieldValueResolver();` so our custom class was never used.

* Add test verifying partial template works; Extract accessAwareFieldValueResolver; Add test verifying priority fo values extracted from object
2024-10-03 15:56:53 +08:00
Bruno Coelho
c84af35e7b Revert "[swift6] remove unused lenientTypeCast option"
This reverts commit 171b98e06ceda9881faf876da93a8803113da71a.
2024-10-03 08:45:42 +01:00
Bruno Coelho
171b98e06c [swift6] remove unused lenientTypeCast option 2024-10-03 08:42:10 +01:00
Nelson Vides
83f6d592a2
Erlang server validation bugfixes and capability extensions (#19750)
* Bugfix: exclusiveMinimum/Maximum must be booleans

* Add support for validating and decoding base64 byte strings

* Add support for validating RFC3339 datetime

* Simplify validate function for performance

* Regenerate erlang-server handlers
2024-10-03 14:24:00 +08:00
Pascal Bachor
619e4d9653
Harmonize python client dependency versions (#19694)
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2024-10-03 14:09:39 +08:00
Joscha Feth
0371799857
fix(core): relative path sorting (#19726) 2024-10-03 14:08:47 +08:00
William Cheng
2111713117
Fix anyOf/oneOf normalization for 3.1 spec (#19758)
* fix anyOf/oneOf normalization for 3.1 spec

* update samples
2024-10-03 14:06:42 +08:00
Bruno Coelho
fad33dfebf
[Swift6] better configuration (#19732)
* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements

* [swift6] general improvements
2024-10-02 23:25:46 +01:00
Bruno Coelho
673cd15e72
[swift6] oneOf-default-case (#19754) 2024-10-02 21:30:36 +01:00
Alex Wallen
43ce2a8e10
[zapier] add response middleware (#19760)
* feat: add zapier response middleware

* chore: add samples
2024-10-03 01:02:25 +08:00
Beppe Catanese
168a1d5d1f
[Typescript-Node] Mark deprecated model attributes (#19756)
* Add @deprecated tag for deprecated fields

* Add tests

* Generate samples from OpenAPI 3.0 file

* Revert to generate with previous OpenAPI 2.0 file

* Add new config 3.0 and generate samples

* Regenerate samples
2024-10-02 17:14:42 +02:00
Bruno Coelho
90bc1000bd
[swift5] rename unknownDefault to unknownDefaultOpenApi to match the enums unknown case (#19753) 2024-10-02 11:45:49 +01:00
Nikita Erokhin
f409bf1440
add oneOf-default-case option for swift5 (#19094)
Co-authored-by: erokha <dev@erokha.com>
2024-10-02 10:56:04 +01:00
William Cheng
1cdd7b7ff2
add joscha to TS technical committee (#19745) 2024-10-02 13:47:31 +08:00
Joscha Feth
c5060a2318
feat(core): add info.summary to additionalProperties for 3.1 specs (#19723) 2024-10-02 13:40:48 +08:00
Maxime Vincent
c6eb9e0e09
fix_ruby_documentation_apikey_name (#19742) 2024-10-01 22:10:54 +08:00
Maxime Vincent
2544fa2928
[Ruby-client] Use secuirtyScheme Key for api_key (#19740)
* replace name by keyParamName in apiKey configuration

* update configuration generated in sample
2024-10-01 19:45:27 +08:00
William Cheng
d7ac1e4337
[OpenAPI 3.1] Avoid NPE when handling prefixItems (#19735)
* avoid npe when handling prefixItems in 3.1 spec

* update samples
2024-10-01 17:36:11 +08:00
RyosukeFukushima
60d0888898
[typescript-fetch] support "x-enum-descriptions" (#19559)
refs OpenAPITools#1693
2024-10-01 11:33:07 +02:00
skstrifork
2322a99bba
[Java][microprofile] enumUnknownDefaultCase true now returns correctly in fromValue (#19677) 2024-10-01 17:30:19 +08:00
William Cheng
5f39bd230e
update undertown to 2.3.17.FINAL (#19734) 2024-10-01 16:54:49 +08:00
nvivot
8ef3118005
[rust][client][auth] token source option (#19647)
* feat: add token source support for rust async client

* chore: fix + regen samples

* chore: doc gen

* chore: missing generated sample files
2024-10-01 15:05:39 +08:00
Nelson Vides
7e1ebe6404
Erlang server (#19722)
* Add documentation to server and handlers

* Respond to at least one path-server

* Let url servers override base path

* Handle reading bigger bodies in cowboy

* Improve json error handling

* Regenerate erlang-server handlers

* Rework API module for performance and completion

* Regenerate erlang-server handlers
2024-10-01 14:51:12 +08:00
winkler-pixop
2551689ec6
Fix #19683 : Generated code fails to build with x86_64-linux-gnu-g++-13 (#19684)
* Add C++ header for cpp-pistache-server to fix breaking CMake build of generated code.

* Sort includes of system C++ headers for cpp-pistache-server.

* Add samples generated from fixing bug #19683.
2024-10-01 14:00:38 +08:00
Alex Wallen
241f51c56b
zapier: create a search action predicate (#19670)
* feat: implement createAction predicate rather than negating isSearchAction predicate

* chore: update samples
2024-10-01 11:34:09 +08:00
Joscha Feth
849b3e8e17
fix(typescript): export types (#19725)
* Fix export type for typescript interfaces in all platforms (#6805)

* Generated samples and docs

* chore: update samples

---------

Co-authored-by: Kevin Broja <kevin.broja@gus-group.com>
2024-09-30 17:29:21 +02:00
jaqxues
af2ed1c7a6
[kotlin] enforce fields in data classes (#19526)
Fix #14710
2024-09-30 14:51:46 +01:00
Stefan Koppier
df22ca6dcc
[BUG] Kotlin wiremock query params are incorrect (#19720) 2024-09-30 11:44:08 +01:00
Joscha Feth
d68a186c5e
test(OpenAPINormalizer): nullability normalization for 3.1 specs (#19714)
* test(OpenAPINormalizer): nullability normalization for 3.1 specs

* chore: samples
2024-09-30 09:49:49 +08:00
Joscha Feth
2d57255817
fix(core): nullable array types in 3.1.x specs (#19687)
* fix: nullable array types in 3.1.x

* fix: pass on on `getNullable` value

* chore: add generated marker

* chore: add generated marker

* Delete out
2024-09-30 00:00:48 +08:00
William Cheng
ea6b1c6612
Update README.md with new release date of 7.9.0 2024-09-29 23:28:02 +08:00
devhl-labs
9300a68ad7
[csharp][generichost] Fix local var (#19642)
* fix local var

* revert one unneeded breaking change

* revert one unneeded breaking change
2024-09-29 23:11:06 +08:00
devhl-labs
fb5e69f83a
[csharp][generichost] Fix invalid key name (#19633)
* fix invalid key name

* fix comment
2024-09-29 23:09:37 +08:00
Joscha Feth
0b32c5025e
chore: update github workflow checkput plugin references (#19676) 2024-09-29 21:23:02 +08:00
Joscha Feth
4223be77f8
feat(typescript): write minimum, maxmimum and default to JSDoc (#19707)
* feat(typescript): write `minimum`, `maxmimum` and `default` to JSDoc

* feat(typescript): express optional params in JSDoc
2024-09-29 12:42:55 +02:00
Deepika Sridhar
b01dd41ce3
bugfix: openapi code generator to consider schema changes (#16735)
* bugfix: added schema location property

* fix: #16723 open api schema refresh issue

* Update modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt

Co-authored-by: David Morris <dave@code-fish.co.uk>

---------

Co-authored-by: dsridhar <deepika.sridharr@aexp.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: David Morris <dave@code-fish.co.uk>
2024-09-27 17:35:48 +08:00
Joscha Feth
36367e79e7
style(typescript): use Headers type (#19697) 2024-09-27 08:41:03 +02:00
Joscha Feth
5e2af7203a
feat(typescript): generate .gitattributes file (#19698)
* feat(typescript): generate `.gitattributes` file

* sample generation

* highlight the gitattributes mustache template

* highlight the gitattributes mustache template

* Revert "highlight the gitattributes mustache template"

This reverts commit 95119979833c2835f004db27805506b76785385a.

* highlight the gitattributes mustache template

* Revert "highlight the gitattributes mustache template"

This reverts commit 0f67ec2e4fec30fad209fae20ace97ea7f9d4eea.

* Revert "highlight the gitattributes mustache template"

This reverts commit 1f68b42368c959bc63dff76db791e4149280283a.
2024-09-27 08:39:59 +02:00
Joscha Feth
1b247e75a9
feat(typescript): improve docs generation (#19699) 2024-09-27 08:36:04 +02:00
Bruno Coelho
911455d206
[swift] small improvements (#19675)
* [swift] small improments

* [swift] small improments

* [swift] small improments

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass
2024-09-27 13:11:08 +08:00
Poolmann
76aca6618f
[Javascript] Add initialization of default vars to constructor (#19692)
* Add initialization of default vars to constructor

* Update samples
2024-09-27 13:03:25 +08:00
Joscha Feth
645626d2f5
style(typescript): add missing semi (#19689) 2024-09-26 16:06:56 +02:00
Luke Zappia
29c3b020e6
[R] Update R6 object documentation (#19679)
* Remove @export and titles from R6 methods

* Remove redundant methods docs from R api.mustache

* Build project
2024-09-26 13:56:22 +08:00
Simon Abbott
a6581e8e4c
[typescript][typescript-node] Serialize/deserialize maps and nullable types correctly (#19362)
* Remove deprecated suppressImplicitAnyIndexErrors property from templates

* Add encoding / decoding tests for the typescript generator

* Add encoding / decoding tests for the typescript-node generator

* [Typescript][Typescript Node] fix deserializing complex types

This fixes deserializing of models that are composed with null,
undefined, or are inside of a map.

* Use more sensible `startsWith` implementation

* Remove use of magic number offsets

* Fix endsWith bounds checking

* Regenerate samples
2024-09-25 20:21:11 +02:00
William Cheng
9147e998ff
update spring web in resttemplate to 6.1.13 (#19671) 2024-09-25 17:10:39 +08:00
Bruno Coelho
7f6b1306ed
Add swift6 generator (#19621)
* [Swift6] create Swift6 generator

* [Swift6] create Swift6 generator

* Update vapor integration

* Update bitrise stack to Xcode 16

* [Swift6] tryped throws

* [Swift6] tryped throws

* [Swift6] combine deferred and api static method

* [Swift6] update readme

* [Swift6] fix some errors

* [Swift6] fix some errors

* [Swift6] fix some errors

* [Swift6] update docs

* [Swift6] update docs

* Use multiline comments for examples in csharp generator (#19079)

* multi

* gen

* Uncomment File::deleteOnExit (#19624)

* [Core/Rust Server] Check references in additionalProperties correctly when checking freeForm status (#19605)

* Check references in additionalProperties correctly

Handle references in additionalProperties correctly when determining free-form status

* Update samples

* [Rust Server] Handle arrays in forms (#19625)

* [Rust Server] Handle arrays in forms correctly

* [Rust Server] Add tests

* Update samples

* [Swift6] fix CI

* [Swift6] fix CI

* [Swift6] fix CI

* [Swift6] fix CI

---------

Co-authored-by: Liri S <reallyliri@gmail.com>
Co-authored-by: Beppe Catanese <1771700+gcatanese@users.noreply.github.com>
Co-authored-by: Richard Whitehouse <git@richardwhiuk.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-09-25 16:57:25 +08:00
Joscha Feth
17e0b7ca71
[typescript] fix: nullable enums should not serialize a null value to a string (#19540)
* fix: `nullable` enums should not serialize a `null` value to a string

* better solution?

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java

Co-authored-by: Joscha Feth <joscha@feth.com>

* chore: Update circle_parallel.sh

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-09-24 23:46:32 +08:00
Louis Sullivan
e370b8130a
Updated pyyaml and httptools in requirements template (#19666)
Co-authored-by: Louis Sullivan <Louis.Sullivan1@ibm.com>
2024-09-24 23:35:15 +08:00
Wiktor Kwapisiewicz
5732e2758f
rust: Implement Display instead of ToString for enums (#19611)
Rust docs for `ToString` explicitly recommend implementing `Display`:

> This trait is automatically implemented for any type which implements the Display trait. As such, ToString shouldn’t be implemented directly: Display should be implemented instead, and you get the ToString implementation for free.

See: https://doc.rust-lang.org/std/string/trait.ToString.html
See: https://github.com/Nitrokey/nethsm-sdk-rs/pull/33

Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
2024-09-24 21:07:12 +08:00
Sergei Lebedev
7d8eacc197
[cpp-qt-client] New makeOperationsVirtual option (#19613)
* Implementation of new `makeOperationsVirtual` option

* Make new parameter `true` by default

* Fix default value set and regenerate samples
2024-09-24 01:05:07 +08:00
Julian Vennen
78f2f7010f
[PHP] Add missing qualifier for enum parameters (#19567) 2024-09-23 16:17:52 +08:00
William Cheng
98783f8161
use debug instead of warn,error to show less log (#19646) 2024-09-23 13:28:53 +08:00
William Cheng
565af33e24
Make it easier to specify triggers for Zapier (#19645)
* chore: add triggers

* update samples

---------

Co-authored-by: Stephen (Alex) Wallen <wallenstephen@outlook.com>
2024-09-23 12:03:44 +08:00
William Cheng
b42027da5d update aspnetcore samples 2024-09-23 02:00:54 +08:00
Richard Whitehouse
fb36272358
[Rust Server] Handle arrays in forms (#19625)
* [Rust Server] Handle arrays in forms correctly

* [Rust Server] Add tests

* Update samples
2024-09-23 00:20:48 +08:00
Richard Whitehouse
8821cf095e
[Core/Rust Server] Check references in additionalProperties correctly when checking freeForm status (#19605)
* Check references in additionalProperties correctly

Handle references in additionalProperties correctly when determining free-form status

* Update samples
2024-09-23 00:19:27 +08:00
Beppe Catanese
e1a1d7ab5a
Uncomment File::deleteOnExit (#19624) 2024-09-23 00:18:06 +08:00
Liri S
b4edca5ad4
Use multiline comments for examples in csharp generator (#19079)
* multi

* gen
2024-09-22 23:27:47 +08:00
David Riddervold Marconis
eebecc8646
[aspnetcore] Fix issue #19592 regarding swagger xml comments (#19593) 2024-09-19 13:10:14 +08:00
William Cheng
3240c5baf0
update org.springdoc:springdoc-openapi-webmvc-api, ui to 2.6.0 (#19620)
* update springdoc-openapi-starter to 2.6.0

* pre-populate info if its not defined

* update kotlins spring dependencies to newer version
2024-09-19 12:37:56 +08:00
un1024
410113fd6d
[kotlin-spring] fix springdoc dependencies (#19579)
* fix springdoc dependencies for kotlin-spring

* fix suffix core to api.
2024-09-19 11:19:42 +08:00
Joscha Feth
171804eef7
feat(avro-schema): logical type support (#19607)
* feat(avro-schema): logical type support

* style: newline at eof
2024-09-19 09:34:51 +08:00
Joscha Feth
0f561b05cb
chore: pull request template mentions an old current version (#19609)
Replaces `7.6.0` with `7.x.0`
2024-09-19 09:33:02 +08:00
Mike Phillips
34aeb16c5e
Improve urllib3 semver flexibility (#19458) 2024-09-18 16:54:43 +08:00
Jonathan Ballet
40967a3d38
python: test with more modern versions (#19452)
Python 3.12 has been released in October 2023, it should be tested in
the CI.

Python 3.7 is not maintained anymore, removing it from the minimum
required version in `pyproject.toml` files.
2024-09-18 16:53:51 +08:00
William Cheng
b3e72feaa9 update java samples 2024-09-18 16:14:47 +08:00
Samuel Lijin
07787973e8
fix: make generated java readme use correct package (#19563) 2024-09-18 16:03:33 +08:00
Richard Whitehouse
d03c90cb97
[Rust Server] Handle additional properties being nullable (#19594)
With:
```
    sampleObject:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/SampleData'
      minProperties: 1
      description: Map of Charging data policy decisions.
```

and
```
    SampleData:
      type: object
...
      nullable: true
```

We currently generate: HashMap<String, SampleData>, which doesn't allow
null charging data entries. This MR changes this to be
`HashMap<String, swagger::Nullable<SampleData>>`, which thus will allow null data entries.

We do this by moving null-handling to the Java code - primarily `getTypeDeclaration()`.

Note, to some extent this is wrong. In this MR (and previously) we are treating
`nullable: true` as an extrinsic property (like required), whereas it should be an
intrinsic property (and thus `HashMap<String, SampleData>` is correct, but `SampleData`
absorbs the nullability.

This would be possible with this code:

```
enum ChargingData = {
   Null,
   Present {
       ...
   }
}
```

Which would remove the usage of https://docs.rs/swagger/2.0.2/swagger/nullable_format/enum.Nullable.html.

I haven't resolved this - and have instead done a more targeted fix.

This, along with some other crude code, creates a scenario where we need to
unpick whether something is null. I've left that, though flagged a TODO to tidy it up at some point.
2024-09-18 15:25:06 +08:00
Richard Whitehouse
f07f8bc997
[Rust Server] Add derive of Hash to enums (#19603)
* [Rust Server] Add derive of Hash to enums

* Update samples
2024-09-18 15:23:27 +08:00
Richard Whitehouse
cf5d17bbfe
[Rust Server] Convert Rust comment to Mustache (#19595)
* [Rust Server] Convert Rust comment to Mustache

The comment about auth types supported by the generator shouldn't be
included in the generated code as it's confusing when the API doesn't
support the same auth types.

As such, we convert it from a Rust comment to a Mustache comment

* Update samples
2024-09-18 15:22:51 +08:00
Joscha Feth
0b084cd75d
[typescript] fixture: broken Array<Array> (#19548)
* [typescript] fixture: broken `Array<Array>`

* Delete samples/client/others/typescript/builds/array-of-lists/models/L.ts

* fix: remove incorrect mapping

* chore: update generated code samples
2024-09-17 15:04:04 +02:00
Rasmus Zweidorff Iversen
fd85359548
[Java] [apache-httpclient] Fix issue with toString causing wrong value with collections (#19576)
* Fix issue with toString causing wrong value with collections

With collections, calling toString will result in the value becoming [a,b] instead of just a,b.

Using the existing apiClient::parameterToString method ensures it gets parsed correctly if it is a collection

* Updated samples

---------

Co-authored-by: Rasmus Zweidorff Iversen <rzi@jysk.com>
2024-09-17 17:57:35 +08:00
dependabot[bot]
30b1a74979
Bump actions/setup-go from 3 to 5 (#19597)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 10:42:21 +08:00
rankoz
ff1fe256d8
Fix dictionary/map deserialization (#19496) 2024-09-16 23:18:04 +08:00
Csaba Kozák
1b30c1995f
[kotlin-client][multiplatform] add support for kotlinx.datetime.LocalTime (#19590) 2024-09-16 16:10:32 +01:00
Julian Vennen
3832cb4eb7
[PHP] Update enum tests (#19591) 2024-09-16 19:48:58 +08:00
Eric
425aa7db44
[Kotlin] Add a new additional property to configure Jackson's failOnUnknownProperties (#19506)
* [Kotlin] Add a new additional property to configure Jackson's `failOnUnknownProperties`

Default to false

* [Kotlin] Unconditionally import `com.fasterxml.jackson.databind.DeserializationFeature`

* [Kotlin] Refactor and add test
2024-09-16 17:59:17 +08:00
Julian Vennen
0c5142a6f6
[php-symfony] Fix #19562 (#19568) 2024-09-16 17:41:49 +08:00
Julian Vennen
a5384d42b4
[PHP] Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions (#19555)
* Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions

* Update php model tests
2024-09-16 17:23:11 +08:00
Eric Rolli
bbafeaed40
[Java Jersey] Update ApiClient.mustache Jersey doesn't allow entities in method DELETE (#19530)
* Update ApiClient.mustache

* Update ApiClient.mustache

Jersey doesn't allow request entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* jersey ApiClient.mustache invoke DELETE without entity if empty

* jersey ApiClient.mustache invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty
2024-09-16 17:03:50 +08:00
Beppe Catanese
cf9de0bf94
Correct package name in test (#19581) 2024-09-16 16:52:19 +08:00
Beppe Catanese
243f501aef
[GO] Go Server: preserve order of the routes as defined in the OpenAPI file (#19550)
* Add skipSortingOperations configuration option

* Skip sorting operations for go-server

* Add test verifyOrder

* Regenerate samples
2024-09-16 16:52:01 +08:00
Beppe Catanese
2f179fe41d
[Go] Verify content of Go server generated files (samples) (#19504)
* Add Python tests to verify generates Go files

* Run Python tests during CI

* Remove Python tests

* Add Go tests

* Update workflow to run Go tests
2024-09-16 16:48:30 +08:00
Vasiliy Ditsyak
7dcaececf8
[BUGFIX][dart-dio] add unknownEnumValue to JsonKey (#19416)
* [BUGFIX][dart-dio] add unknownEnumValue to JsonKey

* review fix

---------

Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
2024-09-15 16:35:24 +08:00
Vasiliy Ditsyak
abf94168e6
[BUGFIX][dart-dio] Align enum and enum_inline generation result (#19510)
* [BUGFIX][dart-dio] Align `enum` and `enum_inline` generation result

* review fixes

* Revert "review fixes"

This reverts commit 9d0b263f5cffdc5c2856bb2ec45f6f0a263f4ee4.

---------

Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
2024-09-15 13:22:09 +08:00
Chirag Jain
740b971074
python-pydantic-v1: Return the primitive type in to_dict for anyOf models (#19488)
* python: Return the primitive type in to_dict for anyOf models

* Regenerate samples

* Update test
2024-09-13 18:50:55 +08:00
Joscha Feth
cd349dc5ea
[avro-schema] fix enum logic (sanitize) (#19549) 2024-09-12 17:00:19 +08:00
Joscha Feth
5c6b8f3b16
docs: add hint about how to attach VSCode to the suspended Java process (#19551) 2024-09-12 16:59:57 +08:00
Nelson Vides
d02aae7469
Erlang Server – cowboy return types improvements (#19561)
* Declare the correct types for cowboy rest requests

* Adding myself to the erlang team
2024-09-12 16:59:06 +08:00
Hidetoshi
ca378b424a
[typescript-axios] fix: enum datatype jsdoc (#19570) (#19571)
* fix: enum dataType JSDoc

* chore: generate samples
2024-09-12 12:59:40 +08:00
Lili Shi
0e763b096e
[swift5] Fix Xcode 16 compilation crash with Extensions.swift generation (#19564)
* Update Extensions template for Swift5 generation

* update samples
2024-09-11 08:59:23 +01:00
Julian Vennen
1658264261
Regenerate php-nextgen-sample (#19556)
* Regenerate php-nextgen-sample

* Add missing changes
2024-09-10 14:32:30 +08:00
Rory Schadler
8171648eb4
fix(python,asyncio): multipart form data serialization (#19302)
* fix: object serialization for multipart requests

This PR is essentially
<https://github.com/OpenAPITools/openapi-generator/pull/18140> but for
the asyncio client.

* fix: int serialization for multipart requests

urllib3 handles serializing ints in post params (ref 1), while asyncio
explicitly does not (ref 2).

ref 1: <9316764e90/src/urllib3/filepost.py (L75-L76)>
ref 2: <https://github.com/aio-libs/aiohttp/issues/920>

* test: new fake multipart endpoint with files and body

* test: regression test for stringified body params

* fix: mypy tweak

* fix: FILES regeneration

* feat: object, int serialization for multipart reqs

Extends previous commits (and #18140) to cover the python-pydantic-v1
client as well.

* fix: use async with in test

* test: regression test for pydantic-v1-aiohttp

* test: add regression test to pydantic-v1

Also brings the second test in line with the first, patching
`urllib3.PoolManager.urlopen`
2024-09-09 17:43:25 +08:00
Evgeny Shichenko
0026e15030
fix kotlin spring boot configuration conflict (#19515) 2024-09-09 11:03:18 +08:00
William Cheng
8511a533d6
add erlang-server-deprecated for fallback after refactoring (#19547) 2024-09-07 17:18:06 +08:00
Nelson Vides
596d446f54
Erlang server overhaul (#19465)
* Upgrade erlang-server code generation and fix is_authorized crashes

* Introduce structured logging

* Improve general formatting

* Update generated files

* Enable erlang server on CI

* Add echo-server testing to CI

* Require OTP27 explicitly in the generated rebar.config file

* Rework handler and API

With this work, json validation becomes optional, fully implemented in
the `_api` module as it was before, but without being forcibly called by
the `_handler`. It is instead left as optional for the user to take
advantage of the exposed callbacks. Jesse also chooses draft-06 as a
default, but these can be chosen manually by the user too, as long as
jesse implements them.

`_handler` also becomes lighter, it now handles all mime types
transparently by forwarding to a user-given module that must implement
`accept_callback/4` and `provide_callback/4` as described in the
`_logic_handler` callbacks. These will simply be the return values of
cowboy_rest's `content_types_accepted` and `content_types_provided`
respectively, and should simply comply with their defined APIs. They
only get two parameters extending the behaviour, so that the user-given
callback can pattern-match on them: the path prefix of the logic
handler, and the operationID of the call.

* Fix return types for provide_callbacks

* Upgrade jesse to incur no dependencies

The less dependencies the built code requires the better.

* Fix dialyzer errors in the generated code

* Apply stronger dialyzer checks
2024-09-07 16:45:42 +08:00
Kresten P. Vester
a98f45b4ac
[Java][Spring]Update dependencies to remove vulnerability in org.springframework:spring-webmvc (#19533)
* Update dependencies to remove vulnerability in org.springframework:spring-webmvc

* Updated samples
2024-09-07 16:26:42 +08:00
Joscha Feth
14e691b9c9
docs: link to existing documentation for snapshot builds and locally built JARs (#19544)
Follow-up from https://github.com/OpenAPITools/openapi-generator/pull/19497 since https://github.com/OpenAPITools/openapi-generator-cli/pull/794 has been merged.
2024-09-07 16:12:24 +08:00
devhl-labs
195438d1e7
version bump (#19545) 2024-09-07 16:10:47 +08:00
William Cheng
a93a6d5a35
Add dotcom-monitor to the sponsor list (#19546)
* add dm to the sponsor list

* update
2024-09-07 16:06:21 +08:00
David Omid
2bc0e5f745
[typescript-fetch] Fixed issue where unique arrays (sets) of primitive values aren't initialized properly (#19521)
* Fix for https://github.com/OpenAPITools/openapi-generator/issues/19520

* Removed redundant Array<any> cast

* Fixed modelGeneric.mustache

* Updated samples
2024-09-05 15:43:34 +02:00
Tero Hagström
2f54a2fb11
Fix for #15736 [TYPESCRIPT-FETCH] Subclassing components using discri… (#19524)
* Fix for #15736 [TYPESCRIPT-FETCH] Subclassing components using discriminators fails to convert subclasses to JSON.
Added similar discriminator handling to ToJSON as was already in place for FromJSON.
The actual files changed are typescript-fetch/modelGeneric.mustache and typescript-fetch/apis.mustache.
Also, adjusted FromJSON a bit in an attempt to support multiple hierarchical levels of discriminators.
And fixed an issue with calling FromJSON from the map() function, which caused the index parameter getting inadvertently passed as the ignoreDiscriminator parameter.
Additionally, fixed failing "mvn integration-test -f samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml"
Moreover, added forceConsistentCasingInFileNames:false into tsconfig.json to make tests compile on OsX.

* Rolled back the changes related to the map() function calls in favor of using ToJSONTyped instead, as that is in line with how FromJSON is already implemented.
2024-09-05 15:29:44 +02:00
William Cheng
e914c4098b update samples 2024-09-04 16:42:41 +08:00
Nicklas Wiegandt
e4112c5aca
feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient (#19430)
* feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient

Closes #19406

* chore (JAVA SPRING RESTCLIENT) 19406: Add new sample to jdk 17 tests

* fix (JAVA SPRING RESTCLIENT) 19406: Fix sample build
2024-09-04 16:17:13 +08:00
Rugal Bernstein
f54b0e25a4
Remove appendRequestToHandler (#19500) 2024-09-04 16:03:31 +08:00
Horace Li
42d98e2526
[Java Libraries] Jakarta Validation API support useJakartaEe flag (#19469)
* Jakarta Validation API support useJakartaEe flag

* Jakarta Validation API support useJakartaEe flag
2024-09-04 15:57:55 +08:00
Joscha Feth
f40f72cea8
[typescript] fix: explode: true should yield appended query params (#19519)
* [typescript] fix: `explode: true` should yield appended `query` params

* fix: object keys should be `set`
2024-09-04 08:16:21 +02:00
Dan Goslen
8678ee8a1f
[Typescript:Axios] Fix withInterfaces and usSingleRequestObjectParam (#19467)
* Support withSingleRequestParameter along with withInterfaces

* Add sample and config for combination

* Re-generate samples
2024-09-03 17:22:11 +02:00
Matteo Molinari
fb1c2f3483
[Bugfix][Java] Fixed jersey clients for multiple file upload (#19476)
* Fixed jersey3 client for multiple file upload

* Updated sample

* Fixed typo

* Fix

* Fix for jersey2
2024-09-02 17:25:54 +08:00
William Cheng
c733bb69a2
[typescript-angular] fix: when model property name is sanitized, use instead original property name within quotes in mustache template (#19508)
* fix: typescript-angular -> when model property name is sanitized, use instead original property name within quotes in mustache template

* fix: updated samples

* chore: added comment for hasSanitizedName

* add original tag, add dummy model for test

* update samples

---------

Co-authored-by: Davide Diaconu <davidediak@gmail.com>
2024-09-02 17:15:58 +08:00
jpfinne
b228133a20
[java] Fix issue #17472 when using schemaMapping for models in collections, not compilable code with @Valid is generated (#19093)
* Fix issue 17472

* Avoid cast exception
2024-09-02 17:03:08 +08:00
William Cheng
1776c000ed
update C# restsharp to 112.0.0 (#19507) 2024-09-02 16:52:54 +08:00
Sobhan Sharifi
0643f526af
Fix ObjectSerializer::isEmptyValue to not consider "0" as "" (#19472) 2024-09-02 16:03:36 +08:00
Chris McEvoy
5b96e85fd5
bugfix: use the correct key when generating auth example in readme (#19492) 2024-09-02 15:38:57 +08:00
Beppe Catanese
4ed8c70a92
Remove unused go-server-required (#19505) 2024-09-02 15:36:42 +08:00
Brenton Bostick
abd19dd253
fix typo woking -> working (#19498) 2024-09-02 15:34:42 +08:00
Joscha Feth
be618ec168
docs: add hints about how to use snapshot version of generator-cli (#19497)
* docs: add hints about how to use snapshot version of `generator-cli`

* docs: simplify

* style: indentation
2024-08-30 16:26:00 +02:00
Joscha Feth
7510e6bbf8
[Typescript] Generate oneOf schemas as type unions (#19494)
* Add oneOf model for Typescript generator

* Update import procces: For oneOfs only import $refs within the oneOf

* Remove new line after description

* Update samples

* Typescript: Update model.mustache

* Typescript: Remove emun from oneOf models

* Update samples

* Typescript oneOf: add discriminator and update deserialize procces

* Typescript: update tests

* Typescript oneOf: move type mapping to models

* Typescript: Update samples

* Typescript: Update type of mappig

* Typescript: Update type of mappig

* Typescript oneOf: update deserializing logic

* Typescript: Update samples

* Revert "[typescript] fix: `enum` can not receive stringified class name (#19481)"

This reverts commit 4238f17322bdb0e968f94b621669b737395a3dc9.

* [typescript] chore: update fixtures

---------

Co-authored-by: ksvirkou-hubspot <ksvirkou@hubspot.com>
2024-08-30 16:20:18 +02:00
Joscha Feth
1518237c25
[typescript] fix: deno: type exports for isolatedModules (#19484) 2024-08-29 13:56:02 +02:00
Joscha Feth
4238f17322
[typescript] fix: enum can not receive stringified class name (#19481)
* fix: `enum` can not receive stringified class name

* chore: update generated code samples
2024-08-29 13:54:57 +02:00
Eric
dfc381c22f
[Java] Add a new additional property to configure Jackson's failOnUnknownProperties (#19271)
* [Java] Add a new additional property to configure Jackson's `failOnUnknownProperties`

* Move `FAIL_ON_UNKNOWN_PROPERTIES` property to JavaClientCodegen

* Template `FAIL_ON_UNKNOWN_PROPERTIES` for other libraries beside retrofit2

* Default `failOnUnknownProperties` to false for all Java Client libraries

* Fix integration tests

Add the `failOnUnknownProperties: true` additional properties to generate the
expected mapper
2024-08-29 13:25:25 +08:00
Joscha Feth
082382cc1e
[typescript] use const for middleware symbol (#19478)
* style: use const for `middleware`

* chore: update generated code samples
2024-08-28 17:52:26 +02:00
Anderson de Borba
85763cdb08
[java] Use @JsonFormat instead of @JsonSerialize for bigDecimalAsString property (#19322)
* [java] Use @JsonFormat instead of @JsonSerialize so that JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN is respected and generates a String using BigDecimal#toPlainString instead of BigDecimal#toString

* Only add Jackson @JsonFormat if properties serializeBigDecimalAsString and jackson are enabled

* Do not verify if jackson is available when mapping imports as the property is not evaluated yet

* Removed unused JsonSerialize and ToStringSerializer
2024-08-28 16:22:13 +08:00
William Cheng
e69fb86957 remove unused file 2024-08-28 15:46:06 +08:00
William Cheng
9579122945
Better handling of parameters in inline model resolver (#19460)
* add tests for parameter ref of oneOf

* update samples

* better handlding of parameters in inline model resolver
2024-08-28 15:31:04 +08:00
JP Moresmau
d6780e7d43
Remove extra bracket to fix compilation (#19464) 2024-08-28 15:30:15 +08:00
Matthias Schwarz
4330b2f46d
[typescript-fetch] Add option to generate validation attributes of model properties (#19448) 2024-08-27 14:13:59 +02:00
dependabot[bot]
aae3ab3154
Bump micromatch from 4.0.5 to 4.0.8 in /website (#19444)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-27 17:19:11 +08:00
condorcorde
fe381e2199
Support multiple files (#19449) 2024-08-26 15:39:15 +08:00
aakash-dev-maersk
f13a11b53c
Add support for global token based auth for k6 script generation (#19348)
* Add global token based auth support (basic, bearer) for k6

* config files and generated code files after the changes

* Handle empty or null auth at path level

* files changed after update with master and run build
2024-08-25 23:40:38 +08:00
Richard Whitehouse
2b40a2c058
[Rust Server] Add auto-generated CLI Client (#19392)
* [Rust Server] Add auto-generated CLI tool

* [Rust Server] Test multiple path parameters

* [Rust Server] Test boolean parameters and apostrophes

* [Rust Server] Test operation with two boolean parameters with same first letter

* [Rust Server] Test apostrophes in operation summary

* Update samples

* [Rust Server] Fix build errors with OpenSSL

* Update samples

* Update samples
2024-08-24 23:57:03 +08:00
ふぁ
69cce249f6
[python] fix content_type deserialize (#19317)
* [Python] fix: #19285

* [python] update sample

* [python] add test

* [python] remove test
2024-08-24 23:40:15 +08:00
Victor Mosin
7a7c8c19ab
[Kotlin][okhttp] replace okhttpclient with callfactory (#19422) 2024-08-22 21:19:32 +01:00
William Cheng
0f294a5129
use gitHost in python pyproject template (#19421) 2024-08-22 16:09:53 +08:00
Martin Boos
ae069e6840
[Python] Update python-pydantic-v1 generator to respect the --git-host argument (#19404)
* Update pyproject.mustache

chore(pyproject): replace static `github.com` with variable `{{{gitHost}}}`

* chore: follow contribution guidelines
2024-08-22 15:52:36 +08:00
mohamuni
deb007b976
fix regex breakage in unmarshaljson function (#19410) 2024-08-22 15:12:54 +08:00
julianladisch
87704b28c0
Upgrade commons-io dependency to latest 2.16.1 (#19414) 2024-08-22 14:59:20 +08:00
Bruno Coelho
b3f74c7c4f
[typescript][angular] move app description from license info to readme (#19397)
* [typescript][angular] move app description from header license info to readme

* [typescript][angular] move app description from header license info to readme
2024-08-21 13:51:39 +02:00
Richard Whitehouse
eda4547f15
[Rust Server] Fix up model generation (#19363)
* [Rust Server] Fix up model generation

- Correctly generate anyOf/oneOf models
- Fix up ToString / FromStr support
- Disable PartialOrd generation for anyOf/oneOf models
- Generate models for inline enums
- Support enums in headers, and vectors of models in headers

* [Rust Server] Add test for anyOf with additional properties

* Update samples

* [Rust Server] Tidy up logging
2024-08-21 15:14:52 +08:00
Rory Schadler
cc98333d87
feat(python): handle multiple file parameters (#19329)
* test: fix broken python test

* fix: handle multiple file parameters

Previously an array of files was not handled correctly, despite the type
annotation implying it was.

* feat: handle filename,filedata tuples in file param

This allows for users to pass filenames with their data in file params,
which is useful for multipart formdata requests. Without this, the list
of files added in the previous commit would have the same filename for
all files (the parameter name).
2024-08-21 15:09:10 +08:00
William Cheng
c2472b03b6 update doc to v7.8.0 2024-08-19 16:19:49 +08:00
William Cheng
91da2fd240
Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"

This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.

* update samples for v7.9.0-snapshot
2024-08-19 16:14:51 +08:00
William Cheng
6bdc452f92
v7.8.0 release (#19385) 2024-08-19 14:01:58 +08:00
William Cheng
fc8b7d92c8
Fix Reactive Spring build.gradle.kts (#19382)
Co-authored-by: Erik VanderWerf <eski787@gmail.com>
2024-08-18 18:34:16 +08:00
Richard Whitehouse
df2b4210c9
[Rust Server] Sort operations so that the ones with fewest params come first (#19368)
* [Rust Server] Sort operations so that the ones with fewest params come first

This resolves things correctly per
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#pathsObject
- "When matching URLs, concrete (non-templated) paths would be matched
before their templated counterparts."

* Update samples

* [Rust Server] Fix tabs vs spaces

---------

Co-authored-by: Rob Day <Robert.Day@metaswitch.com>
2024-08-18 18:01:19 +08:00
Kensuke Taguchi
fd62e3897b
[kotlin-client] Add @JsonEnumDefaultValue annotation to enum class (#19380) 2024-08-18 08:27:43 +01:00
Richard Whitehouse
0a5c99739a
[Rust Server] Allow configuration of multipart/form attachment size limit (#19371)
* [Rust Server] Allow configuration of multipart/form attachment size limit

multipart 0.14+ imposes a 8MB size limit on multipart/form bodies.

This allows that limit to be configured. The default is left as is.

This also improves error messages produced when handling multipart/form bodies.

* Update samples
2024-08-17 16:02:20 +08:00
William Cheng
bb831dad9a
Make the rust hyper client Send so it can be used in rust threads more easily (#19375)
* Add externCrateName property to rust hyper client

This is follows the lead of the rust hyper server generator and provides
an externCrateName. This is because the crate name used for importing
can be different from the package name, because dashes `-` get converted
to underscores `_`.

This allows us to write example code in rustdoc that compiles
successfully.

* Get the rustdoc examples to actually compile

* Make rust hyper client thread safe

* Fix compile time issue with reqwest client test

* Add a test for thread safety

* Generate rust hyper samples

* Use https for petstore api to fix client tests

http://petstore.swagger.io/v2 is 301 redirecting to
https://petstore.swagger.io/v2 and this is breaking posts to the API.
When the client recieves a redirect it does not resend the POST data,
instead it switches to GET. This is in line with how browsers behave
when encountering a 301 redirect on a POST request.

* Make rust hyper client structs `Sync` too

This trait is also helpful in making the api work well with threads.

* Use a getCrateName function instead of adding more state

* update samples

---------

Co-authored-by: Krishna Rajendran <krishna@emptybox.org>
2024-08-17 16:01:11 +08:00
Richard Whitehouse
172fafe674
[Rust Server] Fix server-writing docs for rust-server (#19367)
* Fix server-writing docs for rust-server

Fix broken link in generated README for rust-server.

* Update samples

---------

Co-authored-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
2024-08-17 15:33:58 +08:00
Richard Whitehouse
fbe6c11903
[Rust] Ensure all features build as part of CI / Upgrade to Frunk 0.4 (#19364)
* [Rust] [CI] Build all features as part of CI

* [Rust Server] Update to frunk 0.4

* Update samples
2024-08-17 14:17:36 +08:00
Richard Whitehouse
caeb83c845
[Rust Server] Fix homepage URL in Cargo.toml (#19365)
This fixes a missing quote in Cargo.toml, which causes validation errors
2024-08-17 14:16:25 +08:00
Aleksander Baranowski
ba1d7255d0
fix mixed indent + move do to same line as start of loop (#19373) 2024-08-17 14:15:00 +08:00
William Cheng
a6a75e3501
Better handling of backtick in pattern (#19358)
* use x-go-datatag in go client model template

* add logic to handle backtick
2024-08-16 18:04:47 +08:00
Tim Quinn
cd02426648
Suppress Pattern annotation on property of type byte array (#19346)
* Suppress Pattern annotation on property of type byte array

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>

* Straggler files from generated samples

* Add new format test to workflows

---------

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
2024-08-15 17:09:44 +08:00
Richard Whitehouse
024bbb7784
[Rust Server] Improve RFC 13341 compliance for multipart/related (#19355)
* [Rust Server] Improve RFC 13341 compliance for multipart/related

* Update samples
2024-08-15 17:04:59 +08:00
Richard Whitehouse
be09f8a868
[Rust Server] Use swagger/multipart_related support (#19354)
* [Rust Server] Use swagger/multipart_related support

* Update samples
2024-08-15 17:03:59 +08:00
llendi
38ebf0bb4e
[Java][OkHttp-Gson] fix: free form query parameters for okhttp-gson (#19226) 2024-08-15 17:02:59 +08:00
martin-mfg
05c10934ce
docs: update versions, fix links, remove broken camel.xml, update download counts (#19356)
* manually update version in documentation, remove camel.xml

... because it has the wrong generator version, it has the wrong generator name (should be "java-camel"), the generated code doesn't compile - and then I didn't check further

* improve automatic version updating

* fix one more Readme link

* update docker stats again
2024-08-15 17:02:34 +08:00
Richard Whitehouse
daf52229e3
[Rust Server] Refactor Mustache templates for request/response body handling (#19347)
* [Rust Server] Refactor Mustache templates for request/response body handling

* Update samples
2024-08-14 15:25:08 +08:00
William Cheng
8f7354a2a2
revert gradle extension version (#19351) 2024-08-14 15:22:10 +08:00
Fei Wang
2bf2d9bb56
Include licenseInfo for all the generated java code files (#19273)
* Include license info for all the generated java code files

* Re-base generate
2024-08-14 15:13:42 +08:00
Richard Whitehouse
b8001323f6
[Core] Consolidate Operation ID generation (#19339)
* [Core] Consolidate Operation ID generation

* Update samples
2024-08-14 15:12:26 +08:00
martin-mfg
58dd0305ce
[JAVA] use query parameter apikey if present (#19334)
* Fix #16362

* Update samples

* Undo formatting changes

* Revert whitespace changes in samples

* make it work

---------

Co-authored-by: Jason Boileau <jason@boileau.dk>
Co-authored-by: Jason Boileau <spraot@users.noreply.github.com>
2024-08-14 15:02:37 +08:00
Sylvain Joubert
d55525fbc4
[C++][Pistache] Fix 'unused-parameter' warning on Helpers.h file (#19315) 2024-08-14 14:34:11 +08:00
Sylvain Joubert
8af3ff2828
[C++][Pistache] Add error handlers overload taking the response object (#19314)
This allows overriders to have full access to the response object and
more finely control the error handling behavior.
For example, this enables the specification of a proper Content-Type in
case of custom format responses (application/json, ...)
2024-08-14 14:31:55 +08:00
condorcorde
e70a9564e0
[PowerShell] Fix missing Content-Type header on a 204 response (#19340)
* Allow for binary response content

* AllowNull for $ContentTypes

* Update PSApiClient.ps1
2024-08-13 15:20:46 +08:00
William Cheng
d340e15f1a update dart samples 2024-08-13 15:19:29 +08:00
Brenton Bostick
03d8c30183
fix invalid syntax in gitignore (#19341)
gitignore only supports line comments, not in-line comments
2024-08-13 15:11:30 +08:00
GeorgeFkd
2107e9ef8f
Added support for openapi-normalizer in the online version. (#19336)
* Added support for openapi-normalizer in the online version with a minimal test.

* removed comments and formatted code
2024-08-12 17:49:34 +08:00
Gergely Imreh
fdd2dc9651
python-asyncio: update retry factors for actual exponential retries (#19337)
* python-asyncio: update retry factors for actual exponential retries

As per the `aiohttp-retry` library's code[^1], the timeout is

```python
timeout = self._start_timeout * (self._factor ** attempt)
```

This means the previous setting with "start_timeout=0.0" would have
always just retried right away (0 timeout) regardless of the "factor" value,
and also, "factor=0.0" would never have increased the timeout, rather it
would have resulted in a 0 timeout regardless of the value of "start_timeout".

This double-zeroing effectively rendered exponential backoff to nothing (rather than
"retries" number of retries in quick succession.

The update is a quick fix to set the same default as in `aiohttp-retry`. In
the future this should likely be configurable (through extra Configuration settings perhaps?),
as not all APIs are created equal, but this works as a quick fix for making retries more effective.

[^1]: ba2169891f/aiohttp_retry/retry_options.py (L38-L65)

* updated example
2024-08-12 17:35:00 +08:00
Franck Arnulfo
d1b9f9284a
Fix issue https://github.com/OpenAPITools/openapi-generator/issues/19326 (#19328)
Try to fix issue https://github.com/OpenAPITools/openapi-generator/issues/19326
2024-08-12 15:26:11 +08:00
devhl-labs
5166765724
changed default sorting of samples (#19335) 2024-08-12 15:04:50 +08:00
devhl-labs
ad8a7d2a3c
[csharp] Change sorting default (#18942)
* change sorting default

* implement sorting options for all libraries

* rebuild tests

* build samples
2024-08-12 00:33:18 +08:00
condorcorde
6da3dc5c10
Allow for binary response content (#19331) 2024-08-11 22:48:03 +08:00
Tim Quinn
07baddfe12
Minor change to Helidon version handling allowing snapshot versions (#19320)
* Minor change to Helidon version handling

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaHelidonCommonCodegen.java

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

* Review comments: fix typo in comment

---------

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2024-08-09 15:59:57 +08:00
Richard Whitehouse
ad7acc30eb
[Rust/Rust Server] Fix example/test code (#19318)
* [Rust Server] Fix code so examples compile

Zero length arrays don't correctly type infer, so if we have no scopes, we need to not create a empty array

We need an authentication middleware - without it the code doesn't compile.

* Update samples

* [Rust Server] Remove trailing whitespace

* Update samples

* [Rust Server] [CI] Build all targets

* [Rust] Fix reqwest test
2024-08-09 15:54:58 +08:00
William Cheng
4b493358a8 update php samples 2024-08-07 18:09:11 +08:00
Stefan Koppier
aea536027c
[bugfix][kotlin-wiremock] fix problems with range responses (#19309)
* [kotlin] Target correct library in jvm-spring-webclient sample

* [kotlin] Fixed warning in jvm-spring-restclient

* [kotlin-wiremock] fixed issue 7193

* [kotlin-wiremock] fixed wrong implementation of fromResponse

* [kotlin-wiremock] forbidden API

* [kotlin-wiremock] fixed wrong workflow trigger
2024-08-07 18:04:05 +08:00
Pavel Miller
908eddea0b
Issue-19220: processing schema name is added to the list with names checked at recursing processing, so it prevent to endless recursive execution (#19221) 2024-08-07 17:48:14 +08:00
Şerban Ghiţă
539aab05a7
[BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a&param=b vs param[]=a&param[]=b) #19233 (#19236)
* [BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a&param=b vs param[]=a&param[]=b) #19233

* Added tests (replaced old provider data). This looks like a breaking change

* Fix space

---------

Co-authored-by: Serban Ghita <serban.ghita@virta.global>
2024-08-07 17:15:59 +08:00
Lajos Szoke
edc60db531
Add ConfigCat to the Companies/Projects using OpenAPI Generator section (#19304)
* Add ConfigCat to the Companies/Projects using OpenAPI Generator section

* Adding ConfigCat to the users.yml and adding a logo
2024-08-07 17:07:24 +08:00
Bruno Coelho
b803af5ddf
[typescript][angular] move api version from license info to readme (#19310)
* [typescript][angular] move api version from header license info to readme

* [typescript][angular] move api version from header license info to readme
2024-08-07 10:12:57 +02:00
congyuluo
f8a5051d9c
Refactored Identifiers (#19270) 2024-08-05 18:20:54 +08:00
William Cheng
eff3e6df53
[cpp-qt] Add option for download progress, add test (#19297)
* add option for download progress, add test

* add cmake file

* remove test

* update
2024-08-05 16:06:36 +08:00
Jazzco
ffd03b7e51
[cpp-qt-client] Qt progress info (#18950)
* Update HttpRequest.cpp.mustache

Use stable 4-parameter connect

* add generated files

* Revert "add generated files"

This reverts commit 1d4e78aa0d42208b576354276c274000c29863f9.

* catch download progress in HttpRequest and pass it to api

* Update HttpRequest.cpp.mustache - clean mixed in changes

Removed additional changes from other PullRequest

* Update HttpRequest.cpp.mustache - replaced tabs by spaces

* Update api-header.mustache - replaced tabs by spaces

* Update HttpRequest.h.mustache - replaced tab by spaces

* ran step 3 from Linux

* changed downloadProgress to -nickname-DownloadProgress and added it to all regions where execution finish is connected

* ran step 3

* replaced tab by spaces

* ran step 3

* activate tracing to detect link issue

* removed redundant connects and encapsulated changes in {{addDownloadProgress}}

* added generated files from step 3

* remove cli-option for httprequest - this should be always there

* added files from step 3

* improved name

* Update samples-cpp-qt-client.yaml - fix parameter order

* Update samples-cpp-qt-client.yaml
2024-08-05 14:40:14 +08:00
William Cheng
25936b4198
Add route4me to the sponsor list (#19294)
* update samples

* add route4me to the sponsor list
2024-08-05 13:07:56 +08:00
Tim Quinn
8f1d59fb0a
Support Helidon SE 4 generation (clients and servers) (#19150)
* Save work-in-progress

* Incoming param handling generating well exc. for file upload

* Revise generated test for v3 vs v4 differences

* Leave details of multi-part handling to the user for now

* change default version to use the highest version known

* SE client changes for Helidon 4

* A few fixes; add new v4 SE samples

* Fix v3/v4 routing prep

* Improve version handling if web site is inaccessible; add test

* Reworking parameter conversion and required and validation handling

* Add generation of a return value record per response for each operation

* Improvements to the result record generation

* More changes

* Remove change in whitespace in v3 output

* More progress on parameter handling

* WIP - refactor parameter-returning methods to inner class along with return records

* Reorg of op helpers

* Use no-op for handling map in path, query, header, cookie - need to revise later

* Binary form param handling

* Clean-up and consistency check bt useAbstractClass and not

* Improve result builders

* Add new samples files

* Fix a few issues

* Update samples after rebase; add build steps for v3 and v4 uac github actions

* Remove v3 se useAbstractClass test - creates some bad code

* Generated doc updates

* Fix missing newline

* Improve Javadoc for generated Result; add convenience Result.send method

* Add bean val. for body param if needed

* Restructure generated records for declared responses; add Generated annotation selectively

* Fix typo

* In sample generation, force a stable generatorVersion value to avoid confusing builds and up-to-date samples checking

* Fix up white space in older generation

* Generate PartsUtils only with useAbstractClass = true

* Adopt some review comments; more to come

* Review comments; notably, switch to using the first path segment to group operations rather than the tags items

* Improve status handling a bit

* Add new generated sample files

* Add missing new samples files

* Quite a few updates, esp. to generated samples

* New config file for sample

* Updates samples

* Add updates to .openapi-generator/FILES contents
2024-08-04 22:06:30 +08:00
Filipe Silva
af94bde2ce
#19176 fix Task.Result directly blocks thread (#19231)
- async should never be blocked on the ApiClient
 To fix we invert the logic and use Task as base and keep consistency, we expect and wait result only on synchronous calls.
2024-08-04 18:33:33 +08:00
Daniel Seiler
2c2d6905cb
fix: remove "hack" to skip schema-mapped models (#19191)
That method relied on the faulty assumption that toModelFilename does not consider mappings, which is not the case for multiple generators.
2024-08-04 18:16:50 +08:00
keenangraham
aa7c62abb7
[BUG] [Python] Fix autoset constants Python code for default query string value (#19138)
* _query_params is list, not dict

* Add test
2024-08-04 18:13:53 +08:00
27869 changed files with 1475155 additions and 339177 deletions

View File

@ -0,0 +1 @@
RUN apt update && apt install -y maven

View File

@ -10,7 +10,7 @@ assignees: ''
#### Bug Report Checklist
- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))?
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
- [ ] Have you searched for related issues/PRs?
- [ ] What's the actual output vs expected output?

View File

@ -7,9 +7,9 @@
- [ ] 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.
- [ ] 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/configs/*.yaml
./bin/utils/export_docs_generators.sh
./mvnw clean package || exit
./bin/generate-samples.sh ./bin/configs/*.yaml || exit
./bin/utils/export_docs_generators.sh || exit
```
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
Commit all changed files.
@ -17,5 +17,5 @@
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*`.
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.6.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming `7.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] 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.

View File

@ -29,6 +29,8 @@ jobs:
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/java/okhttp-gson-group-parameter
- samples/client/petstore/java/webclient-swagger2
- samples/client/petstore/java/native
- samples/client/petstore/java/native-jakarta
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -45,7 +45,7 @@ jobs:
${{ runner.os }}-gradle-
- name: Setup Maven
uses: s4u/setup-maven-action@v1.14.0
uses: s4u/setup-maven-action@v1.18.0
with:
java-version: ${{ matrix.java }}
maven-version: 3.8.8
@ -87,7 +87,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Maven
uses: s4u/setup-maven-action@v1.14.0
uses: s4u/setup-maven-action@v1.18.0
with:
java-version: 11
maven-version: 3.8.8

View File

@ -11,7 +11,7 @@ jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
- uses: dorny/test-reporter@v2
with:
artifact: surefire-test-results
name: JUnit Test results

View File

@ -142,6 +142,9 @@ jobs:
path: modules/openapi-generator-cli/target
- name: Delete samples that are entirely generated
run: |
rm -rf samples/client/petstore/csharp/generichost/latest/HelloWorld
rm -rf samples/client/petstore/csharp/generichost/latest/Tags
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare

View File

@ -0,0 +1,34 @@
name: Samples C# .Net 8 FastEndpoints Server
on:
push:
paths:
- samples/server/petstore/aspnet/fastendpoints/**
- samples/server/petstore/aspnet/fastendpoints-*/**
pull_request:
paths:
- samples/server/petstore/aspnet/fastendpoints/**
- samples/server/petstore/aspnet/fastendpoints-*/**
jobs:
build:
name: Build .Net 8 FastEndpoints servers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/aspnet/fastendpoints
- samples/server/petstore/aspnet/fastendpoints-useApiVersioning
- samples/server/petstore/aspnet/fastendpoints-useAuthentication
- samples/server/petstore/aspnet/fastendpoints-useProblemDetails
- samples/server/petstore/aspnet/fastendpoints-useRecords
- samples/server/petstore/aspnet/fastendpoints-useResponseCaching
- samples/server/petstore/aspnet/fastendpoints-useValidators
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln

View File

@ -5,10 +5,12 @@ on:
paths:
- 'samples/client/petstore/c/**'
- 'samples/client/petstore/c-useJsonUnformatted/**'
- 'samples/client/others/c/bearerAuth/**'
pull_request:
paths:
- 'samples/client/petstore/c/**'
- 'samples/client/petstore/c-useJsonUnformatted/**'
- 'samples/client/others/c/bearerAuth/**'
jobs:
build:
@ -20,6 +22,7 @@ jobs:
sample:
- 'samples/client/petstore/c/'
- 'samples/client/petstore/c-useJsonUnformatted/'
- 'samples/client/others/c/bearerAuth/'
steps:
- uses: actions/checkout@v4

View File

@ -3,10 +3,10 @@ name: Samples cpp qt client
on:
push:
branches:
- "samples/client/petstore/cpp-qt/**"
- "samples/client/petstore/cpp-qt*/**"
pull_request:
paths:
- "samples/client/petstore/cpp-qt/**"
- "samples/client/petstore/cpp-qt*/**"
env:
GRADLE_VERSION: 6.9
@ -16,6 +16,9 @@ jobs:
name: Build cpp qt client
strategy:
matrix:
sample:
- samples/client/petstore/cpp-qt
- samples/client/petstore/cpp-qt-addDownloadProgress
os:
- ubuntu-latest
- macOS-latest
@ -29,5 +32,5 @@ jobs:
version: "6.7.1"
target: "desktop"
- name: Build
working-directory: "samples/client/petstore/cpp-qt"
run: cmake . && cmake --build .
working-directory: ${{ matrix.sample }}
run: cmake . && cmake --build . --verbose

View File

@ -16,7 +16,7 @@ on:
jobs:
build:
name: Build .Net projects
runs-on: ubuntu-latest
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
@ -28,7 +28,7 @@ jobs:
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: 3.1.*
- name: Build

View File

@ -1,45 +0,0 @@
name: Samples C# .Net 8 Clients
on:
push:
paths:
- samples/client/petstore/csharp/generichost/net8/**
- samples/client/petstore/csharp/httpclient/net8/**
- samples/client/petstore/csharp/restsharp/net8/**
- samples/client/petstore/csharp/unityWebRequest/net8/**
pull_request:
paths:
- samples/client/petstore/csharp/generichost/net8/**
- samples/client/petstore/csharp/httpclient/net8/**
- samples/client/petstore/csharp/restsharp/net8/**
- samples/client/petstore/csharp/unityWebRequest/net8/**
jobs:
build:
name: Build .Net projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/generichost/net8/AllOf
- samples/client/petstore/csharp/generichost/net8/AnyOf
- samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
- samples/client/petstore/csharp/generichost/net8/FormModels
- samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests
- samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests
- samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
- samples/client/petstore/csharp/generichost/net8/OneOf
- samples/client/petstore/csharp/generichost/net8/Petstore
- samples/client/petstore/csharp/generichost/net8/SourceGeneration
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '8.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@ -1,33 +0,0 @@
name: Samples C# .Net 6 Client Echo API
on:
push:
paths:
- samples/client/echo_api/csharp-restsharp/**
pull_request:
paths:
- samples/client/echo_api/csharp-restsharp/**
jobs:
build:
name: Build .Net clients
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/csharp-restsharp/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '6.0.x'
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Build
working-directory: ${{ matrix.sample }}
run: |
dotnet build Org.OpenAPITools.sln
dotnet test Org.OpenAPITools.sln

View File

@ -1,26 +0,0 @@
name: Samples C# .Net 6 Client
on:
push:
paths:
- samples/client/petstore/csharp/restsharp/net6/**
pull_request:
paths:
- samples/client/petstore/csharp/restsharp/net6/**
jobs:
build:
name: Build .Net clients
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/restsharp/net6/ParameterMappings/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '6.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln

View File

@ -25,7 +25,7 @@ jobs:
- samples/server/petstore/aspnetcore-6.0-useSwashBuckle
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '6.0.x'
- name: Build

View File

@ -0,0 +1,33 @@
name: Samples C# .Net 8 Client Echo API
on:
push:
paths:
- samples/client/echo_api/csharp/restsharp/net8/**
pull_request:
paths:
- samples/client/echo_api/csharp/restsharp/net8/**
jobs:
build:
name: Build .Net clients
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/csharp/restsharp/net8/EchoApi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0.x'
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Build
working-directory: ${{ matrix.sample }}
run: |
dotnet build Org.OpenAPITools.sln
dotnet test Org.OpenAPITools.sln

View File

@ -0,0 +1,27 @@
name: Samples C# .Net 8 Client
on:
push:
paths:
- samples/client/petstore/csharp/restsharp/net8/**
pull_request:
paths:
- samples/client/petstore/csharp/restsharp/net8/**
jobs:
build:
name: Build .Net clients
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
- samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln

View File

@ -23,9 +23,10 @@ jobs:
- samples/server/petstore/aspnetcore-8.0-pocoModels
- samples/server/petstore/aspnetcore-8.0-project4Models
- samples/server/petstore/aspnetcore-8.0-useSwashBuckle
- samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0.x'
- name: Build

45
.github/workflows/samples-dotnet8.yaml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Samples C# .Net 8 Clients
on:
push:
paths:
- samples/client/petstore/csharp/generichost/net8/**
- samples/client/petstore/csharp/httpclient/net8/**
- samples/client/petstore/csharp/restsharp/net8/**
- samples/client/petstore/csharp/unityWebRequest/net8/**
pull_request:
paths:
- samples/client/petstore/csharp/generichost/net8/**
- samples/client/petstore/csharp/httpclient/net8/**
- samples/client/petstore/csharp/restsharp/net8/**
- samples/client/petstore/csharp/unityWebRequest/net8/**
jobs:
build:
name: Build .Net projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/generichost/net8/AllOf
- samples/client/petstore/csharp/generichost/net8/AnyOf
- samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
- samples/client/petstore/csharp/generichost/net8/FormModels
- samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests
- samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests
- samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
- samples/client/petstore/csharp/generichost/net8/OneOf
- samples/client/petstore/csharp/generichost/net8/Petstore
- samples/client/petstore/csharp/generichost/net8/SourceGeneration
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

55
.github/workflows/samples-dotnet9.yaml vendored Normal file
View File

@ -0,0 +1,55 @@
name: Samples C# .Net 9 Clients
on:
push:
paths:
- samples/client/petstore/csharp/generichost/latest/**
- samples/client/petstore/csharp/generichost/net9/**
- samples/client/petstore/csharp/httpclient/net9/**
- samples/client/petstore/csharp/restsharp/net9/**
- samples/client/petstore/csharp/unityWebRequest/net9/**
pull_request:
paths:
- samples/client/petstore/csharp/generichost/latest/**
- samples/client/petstore/csharp/generichost/net9/**
- samples/client/petstore/csharp/httpclient/net9/**
- samples/client/petstore/csharp/restsharp/net9/**
- samples/client/petstore/csharp/unityWebRequest/net9/**
jobs:
build:
name: Build .Net projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/generichost/latest/Tags
- samples/client/petstore/csharp/generichost/latest/HelloWorld
- samples/client/petstore/csharp/generichost/net9/AllOf
- samples/client/petstore/csharp/generichost/net9/AnyOf
- samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare
- samples/client/petstore/csharp/generichost/net9/FormModels
# - samples/client/petstore/csharp/generichost/net9/ManualPetstoreTests
# - samples/client/petstore/csharp/generichost/net9/ManualSourceGenerationTests
- samples/client/petstore/csharp/generichost/net9/NullReferenceTypes
- samples/client/petstore/csharp/generichost/net9/OneOf
- samples/client/petstore/csharp/generichost/net9/Petstore
- samples/client/petstore/csharp/generichost/net9/SourceGeneration
- samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate
# restsharp
- samples/client/petstore/csharp/restsharp/net9/EnumMappings
# httpclient
- samples/client/petstore/csharp/httpclient/net9/Petstore
# unity
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '9.0.101'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@ -3,10 +3,12 @@ name: Samples Elm
on:
push:
paths:
- .github/workflows/samples-elm.yaml
- samples/client/petstore/elm/**
- samples/openapi3/client/elm/**
pull_request:
paths:
- .github/workflows/samples-elm.yaml
- samples/client/petstore/elm/**
- samples/openapi3/client/elm/**
jobs:
@ -32,4 +34,4 @@ jobs:
# An .elm file couldn't be compiled
# No .elm files were found
# No elm.json file could be found in the root of the working directory
run: elm make $(find . -name *.elm) --output=/dev/null
run: elm make $(find . -name "*.elm") --output=/dev/null

View File

@ -3,33 +3,33 @@ name: Samples Erlang
on:
push:
paths:
# comment out due to errors
# ===> Compiling src/openapi_pet_handler.erl failed
# src/openapi_pet_handler.erl:278: function is_authorized/2 already defined
#- samples/server/petstore/erlang-server/**
- samples/server/echo_api/erlang-server/**
- samples/server/petstore/erlang-server/**
- samples/client/petstore/erlang-client/**
- samples/client/petstore/erlang-proper/**
pull_request:
paths:
#- samples/server/petstore/erlang-server/**
- samples/server/echo_api/erlang-server/**
- samples/server/petstore/erlang-server/**
- samples/client/petstore/erlang-client/**
- samples/client/petstore/erlang-proper/**
jobs:
build:
name: Build Erlang projects
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
sample:
#- samples/server/petstore/erlang-server/
- samples/server/echo_api/erlang-server/
- samples/server/petstore/erlang-server/
- samples/client/petstore/erlang-client/
- samples/client/petstore/erlang-proper/
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: '22.2'
rebar3-version: '3.14.3'
otp-version: '27'
rebar3-version: '3.23.0'
- run: rebar3 compile
working-directory: ${{ matrix.sample }}

View File

@ -35,3 +35,27 @@ jobs:
- name: Run test
working-directory: ${{ matrix.sample }}
run: go test -mod=mod -v
verify:
name: Verify generated Go files with Go tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/go-api-server/
go-version:
- "1.18"
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install Dependencies
working-directory: ${{ matrix.sample }}
run: |
go mod tidy
- name: Run tests
working-directory: ${{ matrix.sample }}
run: go test ./samples_tests -v

View File

@ -11,11 +11,14 @@ on:
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
- samples/openapi3/client/petstore/java/native**
- samples/client/others/java/okhttp-gson-oneOf/**
- samples/client/others/java/okhttp-gson-oneOf-array/**
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
- samples/client/others/java/webclient-useAbstractionForFiles/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
- samples/client/others/java/resttemplate-list-schema-validation/**
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
pull_request:
paths:
- 'samples/client/petstore/java/**'
@ -26,11 +29,14 @@ on:
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
- samples/openapi3/client/petstore/java/native**
- samples/client/others/java/okhttp-gson-oneOf/**
- samples/client/others/java/okhttp-gson-oneOf-array/**
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
- samples/client/others/java/webclient-useAbstractionForFiles/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
- samples/client/others/java/resttemplate-list-schema-validation/**
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
jobs:
build:
name: Build Java Client JDK11
@ -53,18 +59,25 @@ jobs:
- samples/client/petstore/java/webclient
- samples/client/petstore/java/webclient-nullable-arrays
- samples/client/petstore/java/webclient-swagger2
- samples/client/petstore/java/webclient-useSingleRequestParameter
- samples/client/petstore/java/vertx
- samples/client/petstore/java/vertx-no-nullable
- samples/client/petstore/java/vertx-supportVertxFuture
- samples/client/petstore/java/jersey2-java8-localdatetime
- samples/client/petstore/java/google-api-client
- samples/client/petstore/java/rest-assured
- samples/client/petstore/java/rest-assured-jackson
- samples/client/petstore/java/microprofile-rest-client
- samples/client/petstore/java/microprofile-rest-client-mutiny
- samples/client/petstore/java/microprofile-rest-client-3.0
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
- samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
- samples/client/petstore/java/apache-httpclient
- samples/client/petstore/java/feign
- samples/client/petstore/java/feign-hc5
- samples/client/petstore/java/feign-no-nullable
- samples/client/petstore/java/okhttp-gson-awsv4signature
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
- samples/openapi3/client/petstore/java/native
@ -75,12 +88,14 @@ jobs:
- samples/client/petstore/java/resttemplate-swagger2/
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/
- samples/client/others/java/okhttp-gson-oneOf/
- samples/client/others/java/okhttp-gson-oneOf-array/
- samples/client/echo_api/java/okhttp-gson-user-defined-templates/
- samples/client/others/java/resttemplate-useAbstractionForFiles/
- samples/client/others/java/webclient-useAbstractionForFiles/
- samples/client/others/java/jersey2-oneOf-duplicates/
- samples/client/others/java/jersey2-oneOf-Mixed/
- samples/client/others/java/resttemplate-list-schema-validation/
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -5,12 +5,14 @@ on:
paths:
- samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
- samples/client/petstore/java/restclient-*/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
pull_request:
paths:
- samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
- samples/client/petstore/java/restclient-*/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
jobs:
build:
name: Build Java Client JDK17
@ -25,6 +27,9 @@ jobs:
- samples/client/petstore/java/restclient
- samples/client/petstore/java/restclient-nullable-arrays
- samples/client/petstore/java/restclient-swagger2
- samples/client/petstore/java/restclient-useSingleRequestParameter
- samples/client/petstore/java/restclient-useSingleRequestParameter-static
- samples/client/petstore/java/webclient-useSingleRequestParameter
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -5,10 +5,12 @@ on:
paths:
- samples/client/petstore/java-helidon-client/v3/**
- samples/server/petstore/java-helidon-server/v3/**
- samples/server/others/java-helidon-server/v3/**
pull_request:
paths:
- samples/client/petstore/java-helidon-client/v3/**
- samples/server/petstore/java-helidon-server/v3/**
- samples/server/others/java-helidon-server/v3/**
jobs:
build:
name: Build Java Helidon
@ -21,6 +23,7 @@ jobs:
- samples/client/petstore/java-helidon-client/v3/se
- samples/server/petstore/java-helidon-server/v3/mp
- samples/server/petstore/java-helidon-server/v3/se
- samples/server/others/java-helidon-server/v3/mp-format-test
version: [17]
steps:
- uses: actions/checkout@v4

View File

@ -5,10 +5,12 @@ on:
paths:
- samples/client/petstore/java-helidon-client/v4/**
- samples/server/petstore/java-helidon-server/v4/**
- samples/server/others/java-helidon-server/v4/**
pull_request:
paths:
- samples/client/petstore/java-helidon-client/v4/**
- samples/server/petstore/java-helidon-server/v4/**
- samples/server/others/java-helidon-server/v4/**
jobs:
build:
name: Build Java Helidon
@ -18,7 +20,11 @@ jobs:
matrix:
sample:
- samples/client/petstore/java-helidon-client/v4/mp
- samples/client/petstore/java-helidon-client/v4/se
- samples/server/petstore/java-helidon-server/v4/mp
- samples/server/petstore/java-helidon-server/v4/se
- samples/server/petstore/java-helidon-server/v4/se-uac
- samples/server/others/java-helidon-server/v4/mp-format-test
version: [21]
steps:
- uses: actions/checkout@v4

View File

@ -8,6 +8,8 @@ on:
- samples/client/petstore/java-helidon-client/v3/se/**
- samples/client/petstore/spring-http-interface-reactive/**
- samples/client/petstore/spring-http-interface/**
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity/**
- samples/client/petstore/spring-http-interface-noResponseEntity/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
# servers
@ -23,6 +25,8 @@ on:
- samples/client/petstore/java-helidon-client/v3/se/**
- samples/client/petstore/spring-http-interface-reactive/**
- samples/client/petstore/spring-http-interface/**
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity/**
- samples/client/petstore/spring-http-interface-noResponseEntity/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
# servers
@ -44,6 +48,8 @@ jobs:
- samples/client/petstore/java-helidon-client/v3/se
- samples/client/petstore/spring-http-interface-reactive
- samples/client/petstore/spring-http-interface
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity
- samples/client/petstore/spring-http-interface-noResponseEntity
- samples/client/petstore/java/webclient-jakarta
- samples/client/petstore/java/microprofile-rest-client-outer-enum
# servers
@ -51,8 +57,6 @@ jobs:
- samples/server/petstore/java-camel/
- samples/server/petstore/java-helidon-server/v3/mp/
- samples/server/petstore/java-helidon-server/v3/se
- samples/client/petstore/spring-http-interface-reactive
- samples/client/petstore/spring-http-interface
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -4,14 +4,18 @@ on:
paths:
# clients
- samples/client/petstore/java-helidon-client/v4/mp/**
- samples/client/petstore/java-helidon-client/v4/se/**
# servers
- samples/server/petstore/java-helidon-server/v4/mp/**
- samples/server/petstore/java-helidon-server/v4/se/**
pull_request:
paths:
# clients
- samples/client/petstore/java-helidon-client/v4/mp/**
- samples/client/petstore/java-helidon-client/v4/se/**
# servers
- samples/server/petstore/java-helidon-server/v4/mp/**
- samples/server/petstore/java-helidon-server/v4/se/**
jobs:
build:
name: Build with JDK21
@ -22,8 +26,10 @@ jobs:
sample:
# clients
- samples/client/petstore/java-helidon-client/v4/mp/
- samples/client/petstore/java-helidon-client/v4/se/
# servers
- samples/server/petstore/java-helidon-server/v4/mp/
- samples/server/petstore/java-helidon-server/v4/se/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -30,7 +30,7 @@ jobs:
# Using develop mode to install package so that it is easier to modify the package test files
julia -e "using Pkg; Pkg.develop(\"OpenAPI\");"
cd ~/.julia/dev/OpenAPI
git checkout v0.1.25
git checkout v0.2.0
cd $currdir
rm -rf ~/.julia/dev/OpenAPI/test/client/openapigenerator_petstore_v3/petstore
rm -rf ~/.julia/dev/OpenAPI/test/server/openapigenerator_petstore_v3/petstore

View File

@ -20,6 +20,7 @@ jobs:
sample:
# client
- samples/client/petstore/kotlin
- samples/client/petstore/kotlin-explicit
- samples/client/petstore/kotlin-gson
- samples/client/petstore/kotlin-jackson
- samples/client/petstore/kotlin-model-prefix-type-mappings

View File

@ -19,6 +19,7 @@ jobs:
# clients
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
- samples/client/echo_api/kotlin-model-prefix-type-mappings
- samples/client/echo_api/kotlin-jvm-okhttp
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -2,38 +2,47 @@ name: Samples Kotlin server (jdk17)
on:
push:
branches:
paths:
- 'samples/server/petstore/kotlin-springboot-3*/**'
- 'samples/server/petstore/kotlin-server/javalin/**'
- 'samples/server/petstore/kotlin-server/javalin-6/**'
- 'samples/server/petstore/kotlin-server/**'
- 'samples/server/petstore/kotlin-server-modelMutable/**'
- 'samples/server/petstore/kotlin-springboot-*/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/**
pull_request:
paths:
- 'samples/server/petstore/kotlin-springboot-3*/**'
- 'samples/server/petstore/kotlin-server/javalin/**'
- 'samples/server/petstore/kotlin-server/javalin-6/**'
- 'samples/server/petstore/kotlin-server/**'
- 'samples/server/petstore/kotlin-server-modelMutable/**'
- 'samples/server/petstore/kotlin-springboot-*/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/**
env:
GRADLE_VERSION: 7.4
GRADLE_VERSION: '8.10'
jobs:
build:
name: Build Kotlin server
name: Build Kotlin server (jdk17)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# server
- samples/server/petstore/kotlin-server-required-and-nullable-properties
- samples/server/petstore/kotlin-springboot-3
- samples/server/petstore/kotlin-springboot-delegate-nodefaults
- samples/server/petstore/kotlin-springboot-request
- samples/server/petstore/kotlin-springboot-request-cookie
- samples/server/petstore/kotlin-server/jaxrs-spec
- samples/server/petstore/kotlin-server/jaxrs-spec-mutiny
- samples/server/petstore/kotlin-server/javalin
- samples/server/petstore/kotlin-server/javalin-6
- samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-misk
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/
steps:
@ -58,4 +67,4 @@ jobs:
arguments: wrapper
- name: Build
working-directory: ${{ matrix.sample }}
run: ./gradlew build -x test
run: ./gradlew build -x test

View File

@ -2,24 +2,30 @@ name: Samples Kotlin server (jdk21)
on:
push:
branches:
- 'samples/server/petstore/kotlin-server/javalin-6/**'
paths:
- 'samples/server/petstore/kotlin-server/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
pull_request:
paths:
- 'samples/server/petstore/kotlin-server/javalin-6/**'
- 'samples/server/petstore/kotlin-server/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
env:
GRADLE_VERSION: 8.8
GRADLE_VERSION: '8.10'
jobs:
build:
name: Build Kotlin server
name: Build Kotlin server (jdk21)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/kotlin-server/javalin-6
- samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-server-required-and-nullable-properties
- samples/server/petstore/kotlin-misk
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -1,8 +1,8 @@
name: Samples Kotlin server
name: Samples Kotlin server (jdk8)
on:
push:
branches:
paths:
- samples/server/others/kotlin-server/jaxrs-spec/**
- 'samples/server/petstore/kotlin*/**'
- 'samples/server/others/kotlin-server/jaxrs-spec-array-response/**'
@ -17,11 +17,11 @@ on:
# - samples/server/petstore/kotlin-spring-default/**
env:
GRADLE_VERSION: 6.9
GRADLE_VERSION: 7.6.4
jobs:
build:
name: Build Kotlin server
name: Build Kotlin server (jdk8)
runs-on: ubuntu-latest
strategy:
fail-fast: false
@ -34,10 +34,12 @@ jobs:
- samples/server/petstore/kotlin-springboot-delegate
- samples/server/petstore/kotlin-springboot-modelMutable
- samples/server/petstore/kotlin-springboot-reactive
- samples/server/petstore/kotlin-springboot-reactive-without-flow
- samples/server/petstore/kotlin-springboot-source-swagger1
- samples/server/petstore/kotlin-springboot-source-swagger2
- samples/server/petstore/kotlin-springboot-springfox
- samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-server/jaxrs-spec
- samples/server/petstore/kotlin-server/jaxrs-spec-mutiny
- samples/server/petstore/kotlin-server-modelMutable
@ -45,6 +47,8 @@ jobs:
- samples/server/others/kotlin-server/jaxrs-spec
- samples/server/others/kotlin-server/jaxrs-spec-array-response
- samples/server/petstore/kotlin-spring-cloud
- samples/server/petstore/kotlin-misk
- samples/server/petstore/kotlin-misk-config
# comment out due to gradle build failure
#- samples/server/petstore/kotlin-spring-default
# no build.gradle file
@ -71,4 +75,4 @@ jobs:
arguments: wrapper
- name: Build
working-directory: ${{ matrix.sample }}
run: ./gradlew build -x test
run: ./gradlew build -x test

View File

@ -3,11 +3,11 @@ name: Samples Kotlin WireMock
on:
push:
branches:
- samples/server/petstore/kotlin-wiremock/**
- samples/server/petstore/kotlin-wiremock*/**
- samples/server/echo_api/kotlin-wiremock/**
pull_request:
paths:
- samples/server/petstore/kotlin-wiremock/**
- samples/server/petstore/kotlin-wiremock*/**
- samples/server/echo_api/kotlin-wiremock/**
jobs:
@ -19,6 +19,7 @@ jobs:
matrix:
sample:
- samples/server/petstore/kotlin-wiremock
- samples/server/petstore/kotlin-wiremock-responses
- samples/server/echo_api/kotlin-wiremock
steps:
- uses: actions/checkout@v4

31
.github/workflows/samples-ocaml.yaml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Samples OCaml
on:
push:
paths:
- 'samples/client/petstore/ocaml/**'
pull_request:
paths:
- 'samples/client/petstore/ocaml/**'
jobs:
build:
name: Build OCaml
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/client/petstore/ocaml/'
steps:
- uses: actions/checkout@v4
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
- name: Install
run: opam install . --deps-only --with-test
working-directory: ${{ matrix.sample }}
- name: Build
run: opam exec -- dune build
working-directory: ${{ matrix.sample }}

View File

@ -1,32 +0,0 @@
name: Samples PHP 7.x
on:
push:
paths:
- samples/server/petstore/php-laravel/lib/
pull_request:
paths:
- samples/server/petstore/php-laravel/lib/
jobs:
build:
name: Build PHP projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/php-laravel/lib/
steps:
- uses: actions/checkout@v4
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: php-cs-fixer, phpunit
- name: composer install
working-directory: ${{ matrix.sample }}
run: composer install
- name: phpunit
working-directory: ${{ matrix.sample }}
run: vendor/bin/phpunit

View File

@ -5,10 +5,12 @@ on:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-laravel/**
pull_request:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-laravel/**
jobs:
build:
name: Build PHP projects
@ -16,16 +18,22 @@ jobs:
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
sample:
# servers
- samples/server/petstore/php-symfony/SymfonyBundle-php/
- samples/server/petstore/php-flight/
- samples/server/petstore/php-laravel/
steps:
- uses: actions/checkout@v4
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: "${{ matrix.php }}"
tools: php-cs-fixer, phpunit
- name: composer install
working-directory: ${{ matrix.sample }}

View File

@ -17,7 +17,7 @@ jobs:
# schema
- samples/schema/postman-collection
python-version:
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

39
.github/workflows/samples-protobuf.yaml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Samples Protobuf
on:
push:
paths:
- .github/workflows/samples-protobuf.yaml
- samples/config/petstore/protobuf-schema/**
- samples/config/petstore/protobuf-schema-config/**
pull_request:
paths:
- .github/workflows/samples-protobuf.yaml
- samples/config/petstore/protobuf-schema/**
- samples/config/petstore/protobuf-schema-config/**
jobs:
build:
name: Build Protobuf Client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/config/petstore/protobuf-schema/'
- 'samples/config/petstore/protobuf-schema-config/'
- 'samples/config/petstore/protobuf-schema-config-complex/'
steps:
- uses: actions/checkout@v4
- name: Install Protocol Buffers Compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Generate Protobuf Schema
working-directory: ${{ matrix.sample }}
run: |
mkdir out
protoc --proto_path=. --cpp_out=out models/*.proto services/*.proto
- name: Verify Generated Files
working-directory: ${{ matrix.sample }}
run: |
ls -l out/models
ls -l out/services

View File

@ -18,11 +18,11 @@ jobs:
- samples/client/echo_api/python
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

View File

@ -15,10 +15,11 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
sample:
- samples/openapi3/client/petstore/python-aiohttp
- samples/openapi3/client/petstore/python

View File

@ -17,11 +17,11 @@ jobs:
# clients
- samples/client/echo_api/python-pydantic-v1/
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

View File

@ -19,6 +19,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
sample:
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
- samples/openapi3/client/petstore/python-pydantic-v1

View File

@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
python-version: '3.9'
- name: Test
working-directory: ${{ matrix.sample }}
run: make test-all

View File

@ -34,4 +34,4 @@ jobs:
toolchain: stable
- name: Build
working-directory: ${{ matrix.sample }}
run: cargo build
run: cargo build --all-targets --all-features

View File

@ -0,0 +1,38 @@
name: Samples Scala/sbt (JDK8)
on:
push:
paths:
- 'samples/server/petstore/scala-finch/**'
pull_request:
paths:
- 'samples/server/petstore/scala-finch/**'
jobs:
build:
name: Build scala-finch servers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/scala-finch # cannot be tested with jdk11
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.ivy2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
- name: Build and test
working-directory: ${{ matrix.sample }}
run: sbt -v +test

View File

@ -20,17 +20,18 @@ jobs:
matrix:
sample:
# clients
- 'samples/client/petstore/java/okhttp-gson'
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/scalaz
- samples/client/petstore/scala-pekko
#- samples/client/petstore/scala-sttp # won't pass while the same tests in circleci pass
- samples/client/petstore/scala-http4s
#- samples/client/petstore/scala-sttp
#- samples/client/petstore/scala-sttp-circe
# servers
- samples/server/petstore/scala-lagom-server
- samples/server/petstore/scala-play-server
- samples/server/petstore/scala-akka-http-server
- samples/server/petstore/scala-pekko-http-server
- samples/server/petstore/scalatra
- samples/server/petstore/scala-finch # cannot be tested with jdk11
- samples/server/petstore/scala-http4s-server
- samples/server/petstore/scala-cask
steps:
@ -38,7 +39,9 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
java-version: 11
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@ -5,16 +5,20 @@ on:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
pull_request:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
jobs:
build:
name: Build Java Spring (JDK17)
@ -27,9 +31,11 @@ jobs:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
# servers
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4

View File

@ -45,6 +45,7 @@ jobs:
- samples/server/petstore/spring-boot-defaultInterface-unhandledException
- samples/server/petstore/springboot
- samples/server/petstore/springboot-beanvalidation
- samples/server/petstore/springboot-builtin-validation
- samples/server/petstore/springboot-delegate
- samples/server/petstore/springboot-delegate-no-response-entity
- samples/server/petstore/springboot-implicitHeaders

View File

@ -1,50 +0,0 @@
name: Samples Swift
on:
push:
paths:
- samples/client/petstore/swift5/**
pull_request:
paths:
- samples/client/petstore/swift5/**
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
sample:
- samples/client/petstore/swift5/alamofireLibrary
- samples/client/petstore/swift5/anycodableLibrary
- samples/client/petstore/swift5/asyncAwaitLibrary
- samples/client/petstore/swift5/combineLibrary
- samples/client/petstore/swift5/default
- samples/client/petstore/swift5/deprecated
- samples/client/petstore/swift5/frozenEnums
- samples/client/petstore/swift5/nonPublicApi
- samples/client/petstore/swift5/objcCompatible
- samples/client/petstore/swift5/oneOf
- samples/client/petstore/swift5/promisekitLibrary
- samples/client/petstore/swift5/readonlyProperties
- samples/client/petstore/swift5/resultLibrary
- samples/client/petstore/swift5/rxswiftLibrary
- samples/client/petstore/swift5/urlsessionLibrary
- samples/client/petstore/swift5/validation
# NOTE: disabled as vaporLibrary doesnt build when adding this CI config
#- samples/client/petstore/swift5/vaporLibrary
- samples/client/petstore/swift5/x-swift-hashable
include:
- os: ubuntu-latest
sample: samples/client/petstore/swift5/alamofireLibrary
name: Build Swift samples
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v2
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
swift-version: '5'
- name: Build
working-directory: ${{ matrix.sample }}
run: swift build

44
.github/workflows/samples-swift5.yaml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Samples Swift 5
on:
push:
paths:
- samples/client/petstore/swift5/**
pull_request:
paths:
- samples/client/petstore/swift5/**
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
sample:
- samples/client/petstore/swift5/alamofireLibrary
- samples/client/petstore/swift5/asyncAwaitLibrary
- samples/client/petstore/swift5/combineLibrary
- samples/client/petstore/swift5/default
- samples/client/petstore/swift5/objcCompatible
- samples/client/petstore/swift5/oneOf
- samples/client/petstore/swift5/promisekitLibrary
- samples/client/petstore/swift5/resultLibrary
- samples/client/petstore/swift5/rxswiftLibrary
- samples/client/petstore/swift5/urlsessionLibrary
- samples/client/petstore/swift5/validation
# NOTE: disabled as vaporLibrary doesnt build when adding this CI config
#- samples/client/petstore/swift5/vaporLibrary
include:
- os: ubuntu-latest
sample: samples/client/petstore/swift5/alamofireLibrary
name: Build Swift samples
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v2
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
swift-version: '5'
- name: Build
working-directory: ${{ matrix.sample }}
run: swift build

View File

@ -0,0 +1,37 @@
name: TypeScript Client (Encoding / Decoding Test)
on:
pull_request:
paths:
- samples/client/others/typescript/encode-decode/**
- .github/workflows/samples-typescript-encode-decode.yaml
jobs:
build:
name: Test TypeScript Encoding / Decoding
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/others/typescript/encode-decode/test
node-version:
- 16
- 18
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
working-directory: ${{ matrix.sample }}
run: |
npm run preinstall
npm i
- name: Test
working-directory: ${{ matrix.sample }}
run: npm test

View File

@ -0,0 +1,37 @@
name: TypeScript Node Client (Encoding / Decoding Test)
on:
pull_request:
paths:
- samples/client/others/typescript-node/encode-decode/**
- .github/workflows/samples-typescript-node-encode-decode.yaml
jobs:
build:
name: Test TypeScript Node Encoding / Decoding
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/others/typescript-node/encode-decode/test
node-version:
- 16
- 18
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
working-directory: ${{ matrix.sample }}
run: |
npm run preinstall
npm i
- name: Test
working-directory: ${{ matrix.sample }}
run: npm test

View File

@ -0,0 +1,26 @@
name: TypeScript clients type checks
on:
pull_request:
paths:
- samples/**
- bin/ts-typecheck-all.sh
- .github/workflows/samples-typescript-typecheck.yaml
jobs:
build:
name: Typecheck TypeScript samples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Run type checker
run: ./bin/ts-typecheck-all.sh

View File

@ -39,7 +39,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Setup Maven
uses: s4u/setup-maven-action@v1.14.0
uses: s4u/setup-maven-action@v1.18.0
with:
java-version: ${{ matrix.java }}
maven-version: 3.8.8

1
.gitignore vendored
View File

@ -220,6 +220,7 @@ samples/client/petstore/kotlin*/src/main/kotlin/test/
samples/client/petstore/kotlin*/build/
samples/server/others/kotlin-server/jaxrs-spec/build/
samples/client/echo_api/kotlin-jvm-spring-3-restclient/build/
samples/client/echo_api/kotlin-jvm-okhttp/build/
# haskell
.stack-work

View File

@ -8,6 +8,6 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>2.0</version>
<version>1.12.5</version>
</extension>
</extensions>

View File

@ -37,12 +37,12 @@ services:
# comment out the host table change to use the public petstore server
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
chrome: stable
#apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - g++-5
#chrome: stable
hosts:
- petstore.swagger.io
@ -201,16 +201,19 @@ after_success:
echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME";
fi;
fi;
# publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
#- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
# cd website;
# git config --global user.name "${GH_NAME}";
# git config --global user.email "${GH_EMAIL}";
# echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
# yarn install;
# GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
# fi;
## NOTE; we will do the followign manually instead as the page doesn't need to be updated in every single travis build
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
# - if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
# sed -i "s/Vector{UInt8}/Vector\&#123;UInt8\&#125;/g" docs/generators/julia-client.md;
# sed -i "s/Vector{UInt8}/Vector\&#123;UInt8\&#125;/g" docs/generators/julia-server.md;
# cd website;
# git config --global user.name "${GH_NAME}";
# git config --global user.email "${GH_EMAIL}";
# echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
# yarn install;
# GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
# fi;
#
env:
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5

View File

@ -15,12 +15,22 @@ if [ "$NODE_INDEX" = "1" ]; then
sudo apt-get -y install cpanminus
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
echo "Testing perl"
(cd samples/client/petstore/perl && /bin/bash ./test.bash)
echo "Testing ruby"
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
echo "Testing rust"
(cd samples/server/petstore/rust-axum && mvn integration-test)
elif [ "$NODE_INDEX" = "2" ]; then
echo "Running node $NODE_INDEX to test Go"
# install haskell
@ -80,6 +90,7 @@ elif [ "$NODE_INDEX" = "3" ]; then
(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v17-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v18-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v19-provided-in-root && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
@ -91,6 +102,7 @@ elif [ "$NODE_INDEX" = "3" ]; then
#(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/nullable-enum && mvn integration-test)
(cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test)
(cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test)
(cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test)
@ -99,6 +111,7 @@ elif [ "$NODE_INDEX" = "3" ]; then
(cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test)
(cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
(cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
(cd samples/client/petstore/typescript-axios/tests/with-complex-headers && mvn integration-test)
(cd samples/client/petstore/javascript-flowtyped && mvn integration-test)
(cd samples/client/petstore/javascript-es6 && mvn integration-test)
(cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)
@ -109,14 +122,17 @@ else
(cd samples/client/petstore/scala-akka && mvn integration-test)
(cd samples/client/petstore/scala-sttp && mvn integration-test)
(cd samples/client/petstore/scala-sttp-circe && mvn integration-test)
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
(cd samples/client/petstore/clojure && mvn integration-test)
(cd samples/client/petstore/java/jersey2-java8 && mvn integration-test)
(cd samples/openapi3/client/petstore/java/jersey2-java8 && mvn integration-test)
(cd samples/client/petstore/java/jersey3 && mvn integration-test)
(cd samples/client/petstore/java/jersey3-oneOf && mvn integration-test)
(cd samples/client/others/java/okhttp-gson-streaming && mvn integration-test)
(cd samples/client/petstore/java/okhttp-gson && mvn integration-test)
(cd samples/client/petstore/java/okhttp-gson-3.1 && mvn integration-test)
(cd samples/client/petstore/java/okhttp-gson-dynamicOperations && mvn integration-test)
(cd samples/client/petstore/java/resteasy && mvn integration-test)
(cd samples/client/petstore/java-micronaut-client && mvn integration-test)
(cd samples/client/petstore/java/apache-httpclient && mvn integration-test)

View File

@ -6,7 +6,7 @@
[![Stable releases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE)
[![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator)
[![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g)
[![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA)
[![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator)
[![Conan Center](https://shields.io/conan/v/openapi-generator)](https://conan.io/center/recipes/openapi-generator)
@ -15,7 +15,7 @@
<div align="center">
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.8.0`):
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.14.0`):
[![Build Status](https://api.travis-ci.com/OpenAPITools/openapi-generator.svg?branch=master&status=passed)](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
@ -71,7 +71,10 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
[<img src="https://openapi-generator.tech/img/companies/designli.jpg" width="128" height="128">](https://designli.co?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/itm.png" width="128" height="128">](https://opensource.muenchen.de?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/kong.png" width="128" height="128">](https://konghq.com/products/kong-konnect?utm_medium=referral&utm_source=github&utm_campaign=platform&utm_content=openapi-generator)
[<img src="https://openapi-generator.tech/img/companies/route4me.png" width="128" height="128">](https://route4me.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/dm.png" width="128" height="128">](https://www.dotcom-monitor.com/sponsoring-open-source-projects/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/clickit.jpg" width="128" height="128">](https://www.clickittech.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/unified_to.jpg" width="128" height="128">](https://unified.to/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
@ -86,7 +89,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
| | Languages/Frameworks |
| -------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, Spring 6 RestClient, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 18.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, Spring 6 RestClient, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x, 6.x), **Typescript** (AngularJS, Angular (9.x - 19.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
@ -105,6 +108,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
- [1.5 - Homebrew](#15---homebrew)
- [1.6 - Docker](#16---docker)
- [1.7 - NPM](#17---npm)
- [1.8 - pip](#18---pip)
- [2 - Getting Started](#2---getting-started)
- [3 - Usage](#3---usage)
- [3.1 - Customization](#31---customization)
@ -128,8 +132,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 7.8.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.8.0-SNAPSHOT/) | 09.08.2024 | Minor release with breaking changes (with fallback) |
| [7.7.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.7.0) (latest stable release) | 02.07.2024 | Minor release with breaking changes (with fallback) |
| 7.14.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.14.0-SNAPSHOT/) | 29.05.2025 | Minor release with breaking changes (with fallback) |
| [7.13.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.13.0) (latest stable release) | 27.04.2025 | Minor release with breaking changes (with fallback) |
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
@ -140,7 +144,7 @@ OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0, 3.1 (beta support)
For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page.
For decomissioned generators/libraries/frameworks, please refer to [the "Decommission" label](https://github.com/OpenAPITools/openapi-generator/issues?q=label%3ADecommission+is%3Amerged+) in the pull request page.
For decommissioned generators/libraries/frameworks, please refer to [the "Decommission" label](https://github.com/OpenAPITools/openapi-generator/issues?q=label%3ADecommission+is%3Amerged+) in the pull request page.
## [1.2 - Artifacts on Maven Central](#table-of-contents)
@ -192,16 +196,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
<!-- RELEASE_VERSION -->
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.13.0/openapi-generator-cli-7.13.0.jar`
For **Mac/Linux** users:
```sh
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar -O openapi-generator-cli.jar
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.13.0/openapi-generator-cli-7.13.0.jar -O openapi-generator-cli.jar
```
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.13.0/openapi-generator-cli-7.13.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@ -436,7 +440,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
openapi-generator-cli version-manager set 7.0.1
openapi-generator-cli version-manager set 7.13.0
```
Or install it as dev-dependency:
@ -445,6 +449,32 @@ Or install it as dev-dependency:
npm install @openapitools/openapi-generator-cli -D
```
<!-- /RELEASE_VERSION -->
You can use [locally built JARs](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-locally-built-jar) or [`SNAPSHOT` versions](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-nightly-snapshot-build) as well.
### [1.8 - pip](#table-of-contents)
> **Platform(s)**: Linux, macOS, Windows
**Install** via [PyPI](https://pypi.org/) (`java` executable is needed to run):
```
pip install openapi-generator-cli
```
To install a specific version
```
pip install openapi-generator-cli==7.13.0
```
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
```
pip install openapi-generator-cli[jdk4py]
```
Ref: https://github.com/openAPITools/openapi-generator-pip
## [2 - Getting Started](#table-of-contents)
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml), please run the following
@ -460,7 +490,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
<!-- RELEASE_VERSION -->
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar)
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.13.0/openapi-generator-cli-7.13.0.jar)
<!-- /RELEASE_VERSION -->
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@ -576,9 +606,9 @@ Please refer to [online.md](docs/online.md) on how to run and use the `openapi-g
### [3.4 - License information on Generated Code](#table-of-contents)
The OpenAPI Generator project is intended as a benefit for users of the Open API Specification. The project itself has the [License](#license) as specified. In addition, please understand the following points:
The OpenAPI Generator project is intended as a benefit for users of the Open API Specification. The project itself has the [License](#7---license) as specified. In addition, please understand the following points:
* The templates included with this project are subject to the [License](#license).
* The templates included with this project are subject to the [License](#7---license).
* Generated code is intentionally _not_ subject to the parent project license
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
@ -602,6 +632,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [act coding](https://github.com/actcoding)
- [Adaptant Solutions AG](https://www.adaptant.io/)
- [adesso SE](https://www.adesso.de/)
- [adorsys GmbH & Co.KG](https://adorsys.com/)
- [Adyen](https://www.adyen.com/)
- [Agoda](https://www.agoda.com/)
- [Airthings](https://www.airthings.com/)
@ -627,11 +658,13 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [CAM](https://www.cam-inc.co.jp/)
- [Camptocamp](https://www.camptocamp.com/en)
- [Carlsberg Group](https://www.carlsberggroup.com/)
- [CERN](https://home.cern/)
- [Christopher Queen Consulting](https://www.christopherqueenconsulting.com/)
- [Cisco](https://www.cisco.com/)
- [codecentric AG](https://www.codecentric.de/)
- [CoinAPI](https://www.coinapi.io/)
- [Commencis](https://www.commencis.com/)
- [ConfigCat](https://configcat.com/)
- [cronn GmbH](https://www.cronn.de/)
- [Crossover Health](https://crossoverhealth.com/)
- [Cupix](https://www.cupix.com/)
@ -718,6 +751,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [Telstra](https://dev.telstra.com)
- [Tencent](https://www.tencent.com)
- [The University of Aizu](https://www.u-aizu.ac.jp/en/)
- [TINQIN](https://www.tinqin.com/)
- [Translucent ApS](https://www.translucent.dk)
- [TravelTime platform](https://www.traveltimeplatform.com/)
- [TribalScale](https://www.tribalscale.com)
@ -937,12 +971,18 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2024-03-04 - [Generating TypeScript Types with OpenAPI for REST API Consumption](https://www.pullrequest.com/blog/generating-typescript-types-with-openapi-for-rest-api-consumption/) by [PullRequest](https://www.pullrequest.com/)
- 2024-03-07 - [Fully typed Web Apps with OpenAPI (Part 1)](https://medium.com/@gfox1984/fully-typed-web-apps-with-openapi-part-1-595d55766670) by [Guillaume Renard](https://medium.com/@gfox1984)
- 2024-03-08 - [Laravel OpenAPIによる "辛くない" スキーマ駆動開発](https://fortee.jp/phperkaigi-2024/proposal/9e2e6c38-d078-4efa-99b4-83ebf9033b34) by [KentarouTakeda](https://twitter.com/KentarouTakeda)
- 2024-04-04 - [Working with OpenAPI using Rust](https://www.shuttle.dev/blog/2024/04/04/using-openapi-rust) by [Joshua Mo](https://twitter.com/joshmo_dev)
- 2024-04-08 - [Implement API first strategy with OpenAPI generator plugin](https://medium.com/javarevisited/implement-api-first-strategy-with-openapi-generator-plugin-e4bbe7f0d778) by [Rui Zhou](https://medium.com/@wirelesser)
- 2024-05-06 - [OpenAPI Generator Custom Templates](https://www.javacodegeeks.com/openapi-generator-custom-templates.html) by [Mary Zheng](https://www.javacodegeeks.com/author/mary-zheng)
- 2025-02-09 - [Custom validation with OpenApiGenerator and Spring Boot 3](https://medium.com/@jugurtha.aitoufella/custom-validation-with-openapigenerator-and-spring-boot-3-34a656e815c8) by [Jugurtha Aitoufella](https://medium.com/@jugurtha.aitoufella)
- 2025-02-20 - [Optimizing API Integration in a Large React Application Using OpenAPI Generator](https://www.youtube.com/watch?v=-B33pQnGQUI) by Stefano Marzo
## [6 - About Us](#table-of-contents)
What's the design philosophy or principle behind OpenAPI Generator?
We focus on developer experience. The generators should produce code, config, documentation, and more that are easily understandable and consumable by users. We focused on simple use cases to start with (bottom-up approach). Since then the project and the community have grown a lot: 300k weekly downloads via NPM CLI wrapper, 20M downloads via openapi-generator-cli docker image just to highlight a few. We've gradually supported more features (e.g. oneOf, anyOf introduced in OpenAPI 3.0) in various generators and we will continue this approach to deliver something based on our understanding of user demand and what they want, and continue to add support of new features introduced in OpenAPI specification (such as v3.1 and future versions of the OpenAPI specification).
We focus on developer experience. The generators should produce code, config, documentation, and more that are easily understandable and consumable by users. We focused on simple use cases to start with (bottom-up approach). Since then the project and the community have grown a lot: 600k weekly downloads via NPM CLI wrapper, 30M downloads via openapi-generator-cli docker image just to highlight a few. We've gradually supported more features (e.g. oneOf, anyOf introduced in OpenAPI 3.0) in various generators and we will continue this approach to deliver something based on our understanding of user demand and what they want, and continue to add support of new features introduced in OpenAPI specification (such as v3.1 and future versions of the OpenAPI specification).
### [6.1 - OpenAPI Generator Core Team](#table-of-contents)
@ -990,6 +1030,7 @@ Here is a list of template creators:
* Groovy: @victorgit
* Go: @wing328 [:heart:](https://www.patreon.com/wing328)
* Go (rewritten in 2.3.0): @antihax
* Godot (GDScript): @Goutte [:heart:](https://liberapay.com/Goutte)
* Haskell (http-client): @jonschoning
* Java (Feign): @davidkiss
* Java (Retrofit): @0legg
@ -1040,10 +1081,12 @@ Here is a list of template creators:
* Scala (sttp): @chameleon82
* Scala (sttp4): @flsh86
* Scala (Pekko): @mickaelmagniez
* Scala (http4s): @JennyLeahy
* Swift: @tkqubo
* Swift 3: @hexelon
* Swift 4: @ehyche
* Swift 5: @4brunu
* Swift 6: @4brunu
* Swift Combine: @dydus0x14
* TypeScript (Angular1): @mhardorf
* TypeScript (Angular2): @roni-frantchi
@ -1069,7 +1112,7 @@ Here is a list of template creators:
* C++ (Qt5 QHttpEngine): @etherealjoy
* C++ Pistache: @sebymiano
* C++ Restbed: @stkrwork
* Erlang Server: @galaxie
* Erlang Server: @galaxie @nelsonvides
* F# (Giraffe) Server: @nmfisher
* Go Server: @guohuang
* Go Server (refactored in 7.0.0): @lwj5
@ -1097,10 +1140,12 @@ Here is a list of template creators:
* Kotlin (Spring Boot): @dr4ke616
* Kotlin (Vertx): @Wooyme
* Kotlin (JAX-RS): @anttileppa
* Kotlin Misk: @andrewwilsonnew @guiarn
* Kotlin WireMock: @stefankoppier
* NodeJS Express: @YishTish
* PHP Flight: @daniel-sc
* PHP Laravel: @renepardon
* PHP Laravel (refactor in 7.12.0): @gijs-blanken
* PHP Lumen: @abcsun
* PHP Mezzio (with Path Handler): @Articus
* PHP Slim: @jfastnacht
@ -1111,6 +1156,7 @@ Here is a list of template creators:
* Python AIOHTTP:
* Ruby on Rails 5: @zlx
* Rust (rust-server): @metaswitch
* Rust (rust-axum): @linxGnu
* Scala Akka: @Bouillie
* Scala Cask: @aaronp
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
@ -1129,6 +1175,7 @@ Here is a list of template creators:
* GraphQL: @wing328 [:heart:](https://www.patreon.com/wing328)
* Ktorm: @Luiz-Monad
* MySQL: [@ybelenko](https://github.com/ybelenko)
* PostgreSQL: [@iri](https://github.com/iri)
* Postman Collection: @gcatanese
* Protocol Buffer: @wing328
* WSDL: @adessoDpd
@ -1171,7 +1218,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Android | @jaz-ah (2017/09) |
| Apex | |
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) |
| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) @eafer (2024/12) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
| C# | @mandrean (2017/08) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) @iBicha (2023/07) |
| Clojure | |
@ -1180,7 +1227,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Eiffel | @jvelilla (2017/09) |
| Elixir | @mrmstn (2018/12) |
| Elm | @eriktim (2018/09) |
| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) @nelsonvides (2024/09) |
| F# | @nmfisher (2019/05) |
| Go | @antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @jirikuncar (2021/01) @ph4r5h4d (2021/04) @lwj5 (2023/04) |
| GraphQL | @renepardon (2018/12) |
@ -1191,7 +1238,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| JMeter | @kannkyo (2021/01) |
| Jetbrains HTTP Client | @jlengrand (2023/01) |
| Julia | @tanmaykm (2023/01) |
| Kotlin | @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) |
| Kotlin | @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) |
| Lua | @daurnimator (2017/08) |
| N4JS | @mmews-n4 (2023/03) |
| Nim | |
@ -1207,7 +1254,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) |
| Scala | @clasnake (2017/07), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) @fish86 (2023/06) |
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) @dydus0x14 (2023/06) |
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) |
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) @joscha (2024/10) |
| Xojo | @Topheee (2023/04) |

View File

@ -43,6 +43,21 @@ build_script:
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln
test_script:
- dotnet test samples\client\petstore\csharp\generichost\latest\Tags\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\latest\HelloWorld\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# - dotnet test samples\client\petstore\csharp\generichost\net9\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
# - dotnet test samples\client\petstore\csharp\generichost\net9\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
@ -78,10 +93,10 @@ test_script:
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\MultipleFrameworks\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net6\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj

View File

@ -0,0 +1,16 @@
generatorName: aspnet-fastendpoints
outputDir: samples/server/petstore/aspnet/fastendpoints-useApiVersioning
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnet-fastendpoints
additionalProperties:
hideGenerationTimestamp: "true"
useProblemDetails: "false"
useRecords: "false"
useAuthentication: "false"
useValidators: "false"
useResponseCaching: "false"
useApiVersioning: "true"
routePrefix: "api"
versionPrefix: "v"
solutionGuid: "{1EC59EB0-DA5B-40C0-8E49-A3E0829DBBFC}"
projectConfigurationGuid: "{9685C490-9B77-4EE2-BE4D-811F52665E8F}"

View File

@ -0,0 +1,16 @@
generatorName: aspnet-fastendpoints
outputDir: samples/server/petstore/aspnet/fastendpoints-useAuthentication
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnet-fastendpoints
additionalProperties:
hideGenerationTimestamp: "true"
useProblemDetails: "false"
useRecords: "false"
useAuthentication: "true"
useValidators: "false"
useResponseCaching: "false"
useApiVersioning: "false"
routePrefix: "api"
versionPrefix: "v"
solutionGuid: "{10D45F9B-F270-480C-9DA9-720AA62526A4}"
projectConfigurationGuid: "{3FA19D58-AE7C-45E5-B00E-7482026D1816}"

View File

@ -0,0 +1,16 @@
generatorName: aspnet-fastendpoints
outputDir: samples/server/petstore/aspnet/fastendpoints-useProblemDetails
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnet-fastendpoints
additionalProperties:
hideGenerationTimestamp: "true"
useProblemDetails: "true"
useRecords: "false"
useAuthentication: "false"
useValidators: "false"
useResponseCaching: "false"
useApiVersioning: "false"
routePrefix: "api"
versionPrefix: "v"
solutionGuid: "{EA9B735E-72CA-44C4-BB28-358BDECE60C8}"
projectConfigurationGuid: "{74D68BAC-36F5-43FC-BE9A-F3E660EECF5D}"

View File

@ -0,0 +1,16 @@
generatorName: aspnet-fastendpoints
outputDir: samples/server/petstore/aspnet/fastendpoints-useRecords
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnet-fastendpoints
additionalProperties:
hideGenerationTimestamp: "true"
useProblemDetails: "false"
useRecords: "true"
useAuthentication: "false"
useValidators: "false"
useResponseCaching: "false"
useApiVersioning: "false"
routePrefix: "api"
versionPrefix: "v"
solutionGuid: "{C5D2BEB0-AB74-433F-BC14-DA66CAC82C10}"
projectConfigurationGuid: "{D465FD3B-3146-4661-BB50-522608AA3967}"

View File

@ -0,0 +1,16 @@
generatorName: aspnet-fastendpoints
outputDir: samples/server/petstore/aspnet/fastendpoints-useResponseCaching
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnet-fastendpoints
additionalProperties:
hideGenerationTimestamp: "true"
useProblemDetails: "false"
useRecords: "false"
useAuthentication: "false"
useValidators: "false"
useResponseCaching: "true"
useApiVersioning: "false"
routePrefix: "api"
versionPrefix: "v"
solutionGuid: "{BC56C2A3-ACC5-4ED0-AD8F-CD1831B8A467}"
projectConfigurationGuid: "{5D19ACAB-8830-47FD-BAFA-C0985DF9F5F3}"

View File

@ -0,0 +1,16 @@
generatorName: aspnet-fastendpoints
outputDir: samples/server/petstore/aspnet/fastendpoints-useValidators
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnet-fastendpoints
additionalProperties:
hideGenerationTimestamp: "true"
useProblemDetails: "false"
useRecords: "false"
useAuthentication: "false"
useValidators: "true"
useResponseCaching: "false"
useApiVersioning: "false"
routePrefix: "api"
versionPrefix: "v"
solutionGuid: "{C7818EE1-09E2-4349-9696-8B1A9119974A}"
projectConfigurationGuid: "{39B801D8-74AA-465D-A637-4A2FFB905378}"

View File

@ -0,0 +1,16 @@
generatorName: aspnet-fastendpoints
outputDir: samples/server/petstore/aspnet/fastendpoints
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnet-fastendpoints
additionalProperties:
hideGenerationTimestamp: "true"
useProblemDetails: "false"
useRecords: "false"
useAuthentication: "false"
useValidators: "false"
useResponseCaching: "false"
useApiVersioning: "false"
routePrefix: "api"
versionPrefix: "v"
solutionGuid: "{4BC03566-F5F9-4E45-A835-8FA3B2B524B9}"
projectConfigurationGuid: "{5F32A09C-5CB7-4917-83AB-CD7D1A04FF49}"

View File

@ -0,0 +1,9 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
centralizedPackageVersionManagement: "enable"

View File

@ -0,0 +1,4 @@
generatorName: avro-schema
outputDir: samples/openapi3/schema/valid-enums/avro-schema-enum
inputSpec: modules/openapi-generator/src/test/resources/3_0/avro-schema/valid-enums.yaml
templateDir: modules/openapi-generator/src/main/resources/avro-schema

View File

@ -2,3 +2,6 @@ generatorName: avro-schema
outputDir: samples/openapi3/schema/petstore/avro-schema
inputSpec: modules/openapi-generator/src/test/resources/3_0/avro-schema/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/avro-schema
additionalProperties:
useLogicalTypes: true
logicalTypeTimeQuantifier: nanos

View File

@ -0,0 +1,4 @@
generatorName: c
outputDir: samples/client/others/c/bearerAuth
inputSpec: modules/openapi-generator/src/test/resources/3_0/c/bearer_auth.yaml
templateDir: modules/openapi-generator/src/main/resources/C-libcurl

View File

@ -0,0 +1,9 @@
generatorName: cpp-qt-client
outputDir: samples/client/petstore/cpp-qt-addDownloadProgress
inputSpec: modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/cpp-qt-client
additionalProperties:
packageName: CppQtPetstoreClient
cppNamespace: test_namespace
modelNamePrefix: PFX
addDownloadProgress: true

View File

@ -0,0 +1,9 @@
# for csharp generichost
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/latest/HelloWorld
inputSpec: modules/openapi-generator/src/test/resources/3_1/csharp/hello-world.yaml
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -0,0 +1,9 @@
# for csharp generichost
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/latest/Tags
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/tags.json
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.7/AllOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net47
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.7/AnyOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net47
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net47
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.7/FormModels
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -13,5 +12,6 @@ additionalProperties:
targetFramework: net47
skipFormModel: false
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical
inlineSchemaOptions:
RESOLVE_INLINE_ENUMS: true

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.7/OneOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net47
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,10 +2,10 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
useDateTimeForDate: true
targetFramework: net47
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.7/Petstore
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -12,3 +11,4 @@ additionalProperties:
equatable: true
targetFramework: net47
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.8/AllOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net48
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.8/AnyOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net48
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net48
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.8/FormModels
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -13,5 +12,6 @@ additionalProperties:
targetFramework: net48
skipFormModel: false
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical
inlineSchemaOptions:
RESOLVE_INLINE_ENUMS: true

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.8/OneOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: false
equatable: true
targetFramework: net48
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,10 +2,10 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
useDateTimeForDate: true
targetFramework: net48
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net4.8/Petstore
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -12,3 +11,4 @@ additionalProperties:
equatable: true
targetFramework: net48
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/AllOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: true
equatable: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/AnyOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: true
equatable: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: true
equatable: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/FormModels
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -13,5 +12,6 @@ additionalProperties:
targetFramework: net8.0
skipFormModel: false
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical
inlineSchemaOptions:
RESOLVE_INLINE_ENUMS: true

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/SourceGeneration
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -12,3 +11,4 @@ additionalProperties:
equatable: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -12,3 +11,4 @@ additionalProperties:
equatable: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/OneOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -11,3 +10,5 @@ additionalProperties:
nullableReferenceTypes: true
equatable: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,10 +2,10 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
useDateTimeForDate: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

View File

@ -2,7 +2,6 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/generichost/net8/Petstore
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
library: generichost
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
@ -12,3 +11,4 @@ additionalProperties:
equatable: true
targetFramework: net8.0
modelPropertySorting: alphabetical
operationParameterSorting: alphabetical

Some files were not shown because too many files have changed in this diff Show More