* migrate tests from appveyor to github workflow
* test with dotnet 7
* test on windows
* set dotnet version
* Revert "set dotnet version"
This reverts commit 87af6a63ad04e12ad3d099193c6ed2e3a17aec02.
* use localhost
* update
* update
* update tets
* update
* remove appveyor
* Bugfix: saving offset_date_serializer instead of local_date_serializer.dart
* New config for dart-dio (timemachine)
* test samples in github workflow
* update workflow, samples
* rename
---------
Co-authored-by: Enric Pou <enricpou@gmail.com>
* add basic implementation and tests
* improve test a bit
* modify kotlin-spring.md
* add x-kotlin-implements also to enum
* update samples & properly define implemented vendor extension
* use enum.getName() instead of hardcoded string as key in vendor extension map
* fix docs
* fix test openapi spec and test
* add samples for x-kotlin-implements
* add samples for x-kotlin-implements to proper output folder
* fix
* revert unwanted changes
* move to correct place
* fix mustache template
* add to samples-kotlin-server.yaml
* reuse 1 open api schema for everything. Add also case where interface extends interface.
* add warn logs when x-kotlin-implements-fields is used without x-kotlin-implements to improve usability
* remove unnecessary generated files
* remove unnecessary generated files
* remove "status" inner enum from Pet as it fails to properly import as Pet.Status in implementations. This is a separate bug - not caused by x-kotlin-implements
* feat: add Apache Dubbo code generator with multi-registry support
- Add comprehensive Dubbo microservice code generator
- Support Zookeeper and Nacos registries with auto-dependency selection
- Implement version-aware dependency management (Dubbo 3.2 vs 3.3+)
- Generate service interfaces, implementations, and Spring Boot REST controllers
- Include complete Spring Boot application structure with configuration
- Add detailed documentation and usage examples
- Support async operations and generic response wrappers
- Provide flexible configuration options for packages, versions, and features
* feat: Add dubbo sample with CI validation
Adds a new sample generator configuration for dubbo.
The existing GitHub workflow for Java samples is updated to build and test this new sample automatically.
* fix: fix Dubbo protocol extension issue in test environment
- Set registry address to N/A to avoid ZooKeeper dependency
- Change protocol from 'triple' to 'tri' to resolve extension loading error
* various fix to java dubbo server generator
* update doc
* update readme
---------
Co-authored-by: redoom <gyklcy@iCloud.com>
* feat(rust): add the native-tls (default) and rustls Cargo features for `reqwest`
* refactor(rust): rename the `rustls` Cargo feature to follow the ecosystem naming convention
* Correctly apply Gradle task input & output annotations to accessors
Gradle's task input and output annotations should be applied to the accessors instead of the properties. No adhering to this can cause funky behavior in the generated stubs. Examples of this can be found in the docs: https://docs.gradle.org/current/userguide/implementing_custom_tasks.html
Also adds missing annotations so that validation passes
* Enable strict Gradle plugin validation
* Issue 21890: Fixed flag to use for check of required, non-nullable map
* Issue 21890: added test (first draft)
* Issue 21890: Added Test
---------
Co-authored-by: Marco <chorizoparatodos@gmail.com>
Unfortunately i have not had time to engage in this project in recent years, and as such feel its best for myself and the community if i remove myself from the Kotlin technical committe.
Thanks for all the great work done by all contributors.
* fix: parameter appending for number types
Updated string and number parameter handling to ensure proper conversion to string before appending.
* Update api.mustache
Changes the logic of parsing of OneOf/AnyOf to fix incorrect type coercion
in OneOf/AnyOf contexts. The guard which checks whether typed_data is true-ish
fails for booleans. If the oneOf includes a boolean type and the data is false then
it will correctly parse this value as a boolean. However, the guard class will determine
that false is not true-ish and therefore returns nil. So the result of the type coercion
of false will be nil. This can result in problems when dealing with default true.
For example how a false can turn into a true with defaults:
1. The API returns false
2. The type coercion determines false becomes nil
3. When storing this retrieved record with a default of true for this column the stored value is suddenly true
while the API specifically returned false
This fix removes this guard and will rely on the exception raised to return nil when type coercion fails.
* Add support for both string and object license formats in `pyproject.toml` for Python and Python-Pydantic generators. (#21619)
* Generate the samples (#21698)
* Generate the samples (#21698)
* Remove Python-Pydantic-v1 license format tests (#21619)
* Revert license format to string in Python-Pydantic-v1 samples (#21619)
* Support normalizing anyof/oneof enum constraints to a single enum
* Add SIMPLIFY_ONEOF_ANYOF_ENUM to the documentation
* Process referenced schemas with oneof/enum as well
* Implement referenced enum merging from oneof/anyof
* Implement retaining the enum description as x-enum-desriptions for oneof enum
* Update samples and docs with oneOf enum normalization
* update samples to fix python tests
* fix test file name
* fix incorrect filename
---------
Co-authored-by: Pieter Bos <pieter.bos@nedap.com>
* feat(rust): Add anyOf support to Rust client generator
This commit adds support for anyOf schemas in the Rust client generator
by treating them similarly to oneOf schemas, generating untagged enums
instead of empty structs.
The implementation reuses the existing oneOf logic since Rust's serde
untagged enum will deserialize to the first matching variant, which
aligns well with anyOf semantics where one or more schemas must match.
Fixes the issue where anyOf schemas would generate empty unusable structs.
* test(rust): Add test for anyOf support
This commit adds a test case to verify that anyOf schemas generate
proper untagged enums instead of empty structs in the Rust client
generator.
The test includes:
- A test OpenAPI spec with anyOf schemas
- Unit test that verifies the generated code structure
- Assertions to ensure enums are created instead of empty structs
* Fix anyOf support for Rust generator
- Fixed template closing tag issue that prevented anyOf schemas from generating enums
- Changed {{/composedSchemas.oneOf}} to {{/composedSchemas}} at line 262
- Put #[serde(untagged)] and pub enum on same line for test compatibility
- Fixed TestUtils.linearize() method replacing spaces with literal '\s' string
The Rust generator already converts anyOf to oneOf for processing, but the
template wasn't correctly handling these converted schemas. Now anyOf schemas
generate proper untagged enums, matching the expected behavior for oneOf
schemas without discriminators.
* fix(rust): maintain multi-line formatting for serde attributes in oneOf/anyOf enums
- Keep #[serde(untagged)] on separate line from pub enum for better readability
- Update test assertions to use two separate checks instead of linearize()
- Ensures generated Rust code maintains consistent formatting with existing samples
- Preserves the original multi-line attribute style preferred in Rust ecosystem
We encountered occassional build failures with the logic introduced in #21531 due to discriminator properties still being generated in rare cases.
Not sure why it didn't happen consistently, may be related to Gradle caching or parallel builds or whatever.
Since patching these string comparisons, this has no longer occurred.
* feat(golang): support for wrapped and xml name
* test(golang): add two test cases for wrapped
- with name
- without name
* chore(golang): update samples
* Test Cases for more than two oneOf-Options (both passing, but important to narrow down observed bug)
* fix language-specific tests broken by adding a third fruit to oneOf test
* create reproducer unit test for java client codegen
* fix typo in test yaml
* fix ModelUtils.getParentName returning name of first element in composed schema instead of null when there are multiple elements and it is not clear which one should be parent
* rename test yaml and added tests for clarity
* update samples
* update samples again
The code for setting the form body parameters were wrong,
e.g. the key value pair (id, 12345) would be encoded as
id=%28id%2C12345%29
This commit adds a fix to the base client to correctly setting formBody values the previous pair will now be encoded as
id=12345
* typescript-fetch: Fix model date crash
Fix a runtime crash converting to json when a date or datetime is both nullable
AND required. There are 4 cases to account for:
| required | nullable | values |
|----------|----------|--------|
| f | f | string OR undefined |
| f | t | string OR null OR undefined |
| t | f | string |
| t | t | string OR null |
And importantly when required and nullable code that would crash on null was
being generated. additionally when required is false and nullable is true we
still want to allow consumers to be able to pass in `undefined` OR `null` and
pass that value to the server. Some servers treat null and undefined differently
for some operations so having that ability is pretty reasonable.
fix: https://github.com/OpenAPITools/openapi-generator/issues/21820
* Update typescript-fetch samples
./bin/generate-samples.sh ./bin/configs/*.yaml || exit
* [OCaml] Fix inconsistent oneOf primitive sample name
* [OCaml] Fix encoding/decoding for free-form required fields
* [OCaml] Change field comment to Odoc, move it after the field
As per Odoc documentation, record field documentation should be *after* the
field, not before.
See https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#special_comments
type `my_record`
* [OCaml] Cleanup non-generated files for ocaml sample
* Add OCaml fake-petstore to test corner cases
* Prefix List functions with Stdlib as the fake petstore generates a List module
* Handle decimal and any types
* Indent to_json.mustache for easier maintenance
* Indent api-impl.mustache a bit more for readability before fix
* Fix: do not call `to_json` for free forms and byte arrays
Fixes https://github.com/OpenAPITools/openapi-generator/issues/21312
* Fix compilation for binary types
The implementation may not be correct, but at least it compiles. To be checked
if someday someone actually uses it/complains.
* Indent to_string.mustache
* Add support for exploded form-style object query params
Fixes https://github.com/OpenAPITools/openapi-generator/issues/21307
* Add ocaml-fake-petstore to CI
* Fix free-form body params
* Cohttp_lwt.Response is deprecated, use Cohttp.Response instead
* Safe Java code cleanup
* Split into model-record.mustache
* Add some support for oneOf/anyOf
* Re-generate all OCaml samples
* Fix: correctly mark non-required maps with default empty list
* Fix: Correctly encode/decode maps
* Refresh documentation
* Refresh after merging master
* fix(Spring Boot): adds validation to body params of forms requests
* fix(Spring Boot): adds test for validation of body params of forms requests
* fix(Spring Boot): adds samples
* use built in
* upgrade types from pinned fetch
* samples
* csharp samples
* merge master and samples
---------
Co-authored-by: David Gamero <davidgamero@microsoft.com>
* [kotlin-client] Add support for integer enums with custom serializer for kotlinx
* [kotlin-client] Fix @SerialName annotation being used on non-string enums
* Format samples
* remove blank line
* add tests for kotlin client with integer enum
* add folders
---------
Co-authored-by: CHervaudBetclic <c.hervaud@betclicgroup.com>
* Exclude the discriminator field from getting a nullable_var_annotations
* Update samples
* Manually add annotations since the remote pipeline insists that they should be there
* Add description for why the discriminator does not have a nullability-annotation
* Update samples
* #21582 [BUG][dart-dio] Bug generating inline enums with common names
* #21582 [BUG][dart-dio] Bug generating inline enums with common names added petstore test
* #21582 [BUG][dart-dio] Bug generating inline enums with common names added generated samples to commit.
* #21582 [BUG][dart-dio] Bug generating inline enums with common names removed bug test files that were duplicates
* #21582 [BUG][dart-dio] Bug generating inline enums with common names. Added generated files that were missed.
* #21582 [BUG][dart-dio] Bug generating inline enums with common names. Added generated files that were missed.
* #21582 [BUG][dart-dio] Bug generating inline enums with common names. Added generated files that where updated as a result of changes in master.
* fix(typescript): add Date instance check before date formatting
* chore(typescript): generate samples
* fix: resolve type errors in ObjectSerializer Date formatting
* chore: update samples
* chore: ensure-up-to-date
* [Rust] fix: add location prefix to prevent parameter name collisions when escaping parameter names
* chore: update samples
* [Rust] fix: do not use locationSuffix if useSingleRequestParameter feature is enabled
* Add ContentStream property to ApiResponse
* Add a constructor which sets ContentStream
* Create and use a memory stream for binary model types
* Remove extra space
* Update samples
* Add {{nrt?}} to support older versions
* Remove public modifier for interface property
* Use ValueConverter method for enums to output in the correct JSON format
* Fix doc comment
* Update samples
* Call ToString on return value of converter
* Update samples
* Update samples
* Add test
* composed enums
* revert sample changes
* add new sample due to HttpClient library not working with the new models
* added to appveyor
* build samples again
* started fixing multiple issues
* weather api builds
* added docstring
* ensure property names are unique
* force pr gates to restart
* force pr gates to restart
* force pr gates to restart
* force pr gates to restart
* Adjust header serialization for Optional values
* Add additional test verification to display the header type
* Do not get a null value from an option if it is empty, but rather keep the None value. If a value is present it is converted to an Option[String]
* kotlinx serialization fixes
- added new config with kotlinx, discriminator (/w custom name) and
kotlinx_serialization
- remove discriminator properties from the generator in both base and
derived classes
- set discriminatorValue in additionalProperties of derived classes
- add JsonClassDiscriminator the derived classes in the template
- set SerialName to discriminatorValue in the template
- change base classes to sealed class instead of interface
- make variables in base classes abstract
* Generated kotlin-allOff-discriminator-kotlinx-serialization sample
* Added test for kotlinx_serialization with discriminator
* renamed yaml
* Added new sample to github workflow
* Added comments to KotlinClientCodegen::postProcessAllModels
* fix bug for returning uninitialized variable for serialization method in oneOf models with discriminator
* Update samples
---------
Co-authored-by: Chris Gual <cgual@omnidian.com>
* Add unit tests for bug in imports for oneOf schemas with additional properties set to true #21587
* Fix bug in filtering primitive, built-in types from model imports in TypeScriptFetchClientCodegen
* Add YAML OAS file for #21587
* Revert change to issue_21259.yaml
* Remove comment from issue_21259.yaml
* Filter out arrays from oneOfModels along with primitive types
* Update issue_21587 unit test to catch the Array<Model> case
---------
Co-authored-by: Chris Gual <cgual@omnidian.com>
* Update AWS Go SDK from v1 to v2 in Go client templates (#3)
* Initial plan
* Update AWS Go SDK from v1 to v2 in Go client templates
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Final validation: AWS SDK v2 integration working correctly
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Fix AWS v4 signature implementation: retrieve credentials properly from provider
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Fix AWS v4 signature payload hash: properly compute SHA-256 hash for request body
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Implement proper payload hashing
* Revert go.sum file to original state as requested
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Revert go.mod and rename import alias from v4 back to awsv4
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Revert go.mod file to original state removing all changes
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Rename credentials import to awscredentials alias as requested
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
* Fix spacing
* Fix credentials and imports
* Update aws sdk to latest version
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
Co-authored-by: Dennis Mouwen <dennis.mouwen@eye.security>
* Update indenting
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Modify unit tests for typescript-fetch, issue 21259 to check for closing parens & fix a typo in TypeScriptFetchModelTest
* Fix bug in closing parens in modelOneOf.mustache and some spacing adjustments
* Update samples
---------
Co-authored-by: Chris Gual <cgual@omnidian.com>
* Add setting for generating the oneOf interfaces as sealed interfaces
* Generate samples
* Add internal java17 additionalProperty setting
* Move samples to highlight that they do not use the petstore
* Align documentation
* Update samples
* Align documentation
* Update mustache files and samples to change gradle settings to java17
* [php] Backport #21458 to php client
Fixes#21485
Credits to @jozefbriss
* [php] Fix deprecation warning when running integration tests
OpenAPI\Client\FakeHttpClient::setResponse(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead
---------
Co-authored-by: simonhammes <simonhammes@users.noreply.github.com>
* [Bugfix][Maven-Plugin] Bugfix for remote input specs with parameters
If the inputSpec was a web address that contained parameters, code generation would fail, because the filepath would contain illegal characters, since the code inside the if-block would be skipped. A side effect of this was, that in the log and in the filename in linux the parameters would be leaked, which could potentially sensitive information like Gitlab Access Tokens
* [Test][Gradle Plugin] Update GenerateTaskDslTest.kt
Extended the Test for testing remote inputSpecs with urlParams, a case that caused problems in the maven plugin.
* add bearer capability
* avoid using shared state
* revert needless change
* Revert authentication changes from unused root Java/api.mustache template
* applied change to correct lib type
* updated test files
* made security method more generic for flexibility
* regenerated samples
* further cleanup
* code style
* regenerated samples
* made header assignment more explicit, per each method
* fixed extra comma
* fixed commas, regenerated samples
* moved header population to utility method
* moved static class inside main class
* regenerated samples
* added comments, fixed indentation
* regenerated samples
---------
Co-authored-by: Ilya Nemtsev <ilyanemtsev@192.168.1.34>
* [kotlin-spring] add a Spring type converter for enum values #21564
* [kotlin-spring] simplify unit test for inner enum converter
* update samples
* code review feedback; move containsEnums to ModelUtils
* code review feedback; provide comment for generated EnumConverterConfiguration.kt
* update samples
---------
Co-authored-by: Chris Gual <cgual@omnidian.com>
* [java-spring] provide a clarifying comment for the generated EnumConverterConfiguration class
* update samples
---------
Co-authored-by: Chris Gual <cgual@omnidian.com>
* Oat++ Server Generator (C++)
* Fixed for support for newest OpenAPI version.
* ALPHA not STABLE.
* Fixed for support for newest OpenAPI version.
* Added github workflow & changed to OA3 Petstore.
* Good catch on adding the Workflow.
* Might help to update the samples.
* Set C++ Standard the CMake way.
* Would be easier if there was a .pc file.
* oatpp.lib.
* Add ws2.
* This probably doesn't work, need to take a time out.
* Fix image upload for content-type image
* update samples
* add test case in spec and update samples
* update bitrise stack so we get xcpretty 0.4.1
* Revert "add test case in spec and update samples"
This reverts commit 92202dd8506b2482cda69fe1d95a61d5a51881e3.
* [req] Allow models and apis list properties to span multi-lines and include white space (#19628)
* Add comment for DefaultGenerator.getPropertyAsSet
* Fix some variable names in DefaultGeneratorTest.testGenerateMultiLinePropertiesIssue19628
---------
Co-authored-by: Chris Gual <cgual@omnidian.com>
* Changes so that the tests use one test engine (junit) rather than switching between two (junit and testng)
* Update outdated samples
* Correct remaining missed assertEquals clauses (expected - actual misplaced)
* [JavaSpring] Fix when openapi spec file has array of files
The isArray is not checked for non-reactive isFile condition. This is remediated.
* update samples
---------
Co-authored-by: Siddharth Wagle <SidWagz@users.noreply.github.com>
* Add rust-server-deprecated generator in preparation for hyper1 upgrade to rust-server generator
* [Rust Server] Fix spacing in `Cargo.mustache` (#17876)
* [Rust Server] Update dependency versions in `Cargo.mustache` (#17876)
* [Rust Server] Update templates so generated client and server compile (#17876)
* [Rust Server] Get `server` example to compile (#17876)
* [Rust Server] Update `client` example to compile (#17876)
* [Rust Server] Update `bin/cli.rs` to compile (#17876)
* Revert changes to use typed auth in rust-server. Run sample generation.
* Hyper1 fixup compilation errors in all examples
* Add tests to all examples, clippy, tests, cli-bin, run examples
* Use headers Auth structs
* Fixup various clippy lints
* Move more Service impl to use BoxBody
* Reduce generic restriction on some Service impl where possible
* Appease clippy lints in rust 1.88
---------
Co-authored-by: Azriel Hoh <azriel@healthpoint.co.nz>
* php-nextgen - Fix flatten() to support arrays of files in multipart/form-data
Previously, FormDataProcessor::flatten() unconditionally passed all values through ObjectSerializer::toString(),
which caused an error when flattening arrays containing file resources (e.g. for OpenAPI
multipart/form-data definitions with `type: array`, `items: type: string, format: binary`).
This change adds a check for is_resource() to preserve stream handles without serialization,
ensuring correct behavior when uploading multiple files in a single request.
* php-nextgen - Fix flatten() to support arrays of files in multipart/form-data - samples
* fixed inconsistencies with the dart-dio json_serializable string binary response types
* update deserialize template to handle responseFile
* regenerate samples
* only convert return_type to Uint8List
* remove unused imports from previous changes
* fixed issues where import wouldn't get included
* specific unit test for binary response
* reverted changes to nested generators
* removed 2 additional php modifications
* regen samples
Fix issue where period-delimited model names (e.g. microsoft.graph.fido2AuthenticationMethod)
were being converted to unwieldy names with "Period" substitutions. Now periods are replaced
with underscores like hyphens, resulting in cleaner and more idiomatic Rust identifiers.
Fixes#15254
* fix: add support for discriminator in oneOf schemas and update model imports
* chore: generate samples
* fix: enhance model imports for oneOf arrays in mustache templates
* fix: correct import formatting in mustache templates and TypeScript files
* Add deprecation markers
* Move inputSpec (avoid sharing with other generators)
* Generate samples
* Refactor unit tests
* Add test helper method
* Revert "Add test helper method"
This reverts commit d3935e87d9b6c33b6ca2e1564e2aaf914b1dd14c.
* Assert number of expected @deprecated
* make Pair immutable and in google-code-style
* apply google-code-style to JavaTimeFormatter (to make it consistent with most other auto-generated java)
* move upperCaseBearer to ctor (scheme is final and private; only needs to be fixed once); also replaced Optional with ternary (perf and cleaner code)
* apply google-code-style to Authentication to make it consistent with rest of auth code
* fresh samples
* Handle date parameters in the URL path
* Reformat template and add cast for date fields
* Change code structure by moving path tranformations to assignment
Couldn't get handlebars to format the inline replaces in a sane way
without collapsing everything onto one very ugly line. This way keeps
some sane template formatting while still outputting workable code.
* Regenerate samples after merge
* Updated param checking
* Try a new commit after manually re-logging into CircleCI
* typescript-fetch: use `type` modifier on imports for `discriminator.mappedModels`
This ensures that the generated code works when `--verbatimModuleSyntax` is enabled for the TypeScript compiler.
Regular imports already use the `type` modifier, so this should not be a breaking change.
* update samples
* [Java] Fix content for enum in addPartToMultiPartBuilder ([#19973](https://github.com/OpenAPITools/openapi-generator/issues/19973))
* [Java] Fix content for enum with restclient (#19973)
* [Java] Fix content for enum with restclient (#19973)
* [Java] Fix content for enum with restclient (#19973)
* update samples
---------
Co-authored-by: Michael Bornholdt Nielsen <michaelbornholdtnielsen@gmail.com>
Co-authored-by: Michael Bornholdt Nielsen <jarryDk@users.noreply.github.com>
* Validate pyproject.toml of echo client python sample
* Use PEP-508 compatible version constraint for `requires-python` key
* Update samples
* Move job to petstore workflow
* Update generated sample
* Use equals or greater than operator instead of greater than
* Update samples
* [cpp-rest-sdk] fix enum values being used instead of names
* [cpp-rest-sdk] remove unnecessary prefix for enum classes
* [cpprest-sdk]: use _XPLATSTR for string_t on Windows
* feat(php): add support for 'off' variable naming convention in AbstractPhpCodegen
* feat(php-laravel): add tests for issue 21334 with API and model definitions
* feat(php-laravel): update variableNamingConvention option in php-laravel help file to include 'off' as a valid value
* feat: enhance variableNamingConvention options to include 'off' and detailed descriptions in documentation
* feat(php): update variableNamingConvention from 'off' to 'original' in AbstractPhpCodegen
* feat: include php-laravel-issue-21334 in workflow triggers for push and pull_request events
Changes Date.parse to Date.iso8601 to fix incorrect type coercion in OneOf contexts. Previously, arbitrary strings matching Date.parse's lenient pattern (e.g., "ABC1") were incorrectly coerced to dates (2025-06-01), when they should have remained as strings.
For example:
- "ABC1" was parsed as Date(2025-06-01) instead of remaining "ABC1"
- This occurred because Date.parse treats the first char as month ('A'=1)
and remaining digits as day
The fix ensures only ISO8601 formatted strings (e.g. "2025-06-02") are parsed as dates, improving type safety and preventing unexpected coercion of string values.
* fix: update axum generated multipart requests to own the Multipart or Body
Notes: &Multipart cannot access fields, as we need mutable access.
* chore: run the updated rust-axum sample
* chore: run the updated rust-axum sample (2)
Notes: Ran
./mvnw clean package || exit
./bin/generate-samples.sh
./bin/configs/*.yaml || exit
./bin/utils/export_docs_generators.sh || exit
* chore: fix inconsistent lifetimes
Notes: Multipart should be owned; normal request remains borrowed
* chore: rerun axum samples
* feat(angular): add util "provideApi" for standalone applications (Angular 17 and above)
* feat(angular): update README with new provideApi usage examples for Angular applications
* feat(angular): update README to reflect new provideApi import path and usage examples
* feat(angular): add support for README_beforeV17 and update provideApi return type
* feat(angular): add support for README_beforeV17 and update provideApi return type
* feat(angular): add support for README_beforeV17 and update provideApi return type
* fix: correct casing in DuplicateTest and FooDuplicateTest headers
* feat(angular): add provideApi function and update README with usage examples
* Convert pyproject.toml template to the format expected by Poetry >=2.0
(https://python-poetry.org/blog/announcing-poetry-2.0.0)
* Update samples
* Add option to fallback to Poetry 1.x style pyproject.toml
* Generate new docs and samples
* Place project.urls section a bit further down, so that it doesn't clash with other sections
* Update samples
* Adds ordered routes to go-server router
* Generate and fix test
* Newline
* Readd escaping
* Fixes go router unit test
* Updates tests, one more time
* correct sanitize_for_serialization in python generator, fixes#18106
The method did not consider the objects created for oneOf schemata. If one of the cases was a list, to_dict would return it instead of something that has an items() method.
* generate new samples
* fix: #20878 Provide " as member" where needed
- Generate new samples
- Add tests for all effected python versions
- Ran tests with success
Commands used to verify:
./bin/generate-samples.sh ./bin/configs/python*
mvn verify -Psamples
mvn integration-test -f modules/openapi-generator/pom.xml -Dtest=org.openapitools.codegen.python.PythonPydanticV1ClientCodegenTest -e
mvn integration-test -f modules/openapi-generator/pom.xml -Dtest=org.openapitools.codegen.python.PythonClientCodegenTest -e
* remove 3.8 tests
* use localhost
* update tests
* update test
---------
Co-authored-by: Robert Plummer <rplummer@sequel.ae>
recent commit 40894382fc9fe959f3beacd20cfd6421eaf840b0 already improved
that method: before that other commit it was juste impossible to query
a endpoint with a response type that was something else than
application/json or application/xml. With that commit it became possible
to query such endpoint provided that the client declare in its Accept
header that it can cope with */* (or provided that the client omitted
that header altogether).
But there were still cases badly handled. For instance if an endpoint
returns a response of type image/png and that it receives a query with
header "Accept: image/png", then it would reply with 406.
To avoid any other issue with type resolution, this commit revamps the
getOutputFormat function more thoroughly and does it by implementing
the specification available at
https://httpwg.org/specs/rfc9110.html#field.accept ), which means that
the format accepted by the client are ordered by the relative weights
specified it specified.
PR #21261 added support for endpoint with response of type text/plain
or even image/png.
This commit adds such endpoint so that:
- the way those are supported is clearer (as it is now directly visible
in the generated sample files)
- if a future commit impacts this part of the generation it will be easier
to assess that impact
* add asJsonObject method to OAIEnum class to fix enum handling in query parameters
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [php-symfony] Never return 406 when user accepts */*
When a query has header "Accept" set to "*/*" it means it accepts
everything. It is hence weird to return a 406.
This patch ensures it does not occur: when the query accepts everything
then we take any produced type.
This fixes#13334. This also partly makes the open PR #15560 obsolete
(or at least, it provides a workaround)
* [php-symfony] Don't crash at runtime on null convertFormat
$this->convertFormat may return "null". When it's the case we end up
calling
...->serialize($data, null);
but this crashes at runtime because that serialize method declares that
the 2nd parameter is of type "string" (so null is not accepted).
With this patch we avoid having an error 500. Instead we return something
that makes perfect sense when the OpenApi specification declares a content
of type "text/plain" and that the returned value is for instance a string,
an int, or a boolean.
* [php Symfony] fix return type for non json/xml api
This fixes the generated returned type of controller methods for
endpoint with a response declared like
content:
text/plain:
schema:
type: <boolean|string|integer|number>
or for
content:
image/png:
schema:
type: string
format: binary
Without this commit the generated method *had to* return a value that
matched "array|object|null", which does not work in this case.
This commit makes it possible to return the proper type.
* [rust] support model/maps as deep/explode params
* [rust] add tests for rust deep objects
* [rust] detect normal non deep objects
* [rust] distinguish model and object
* [rust] fix objects as params for hyper
* Chores : update $request->bool to $request->boolean
$request->bool is not a laravel function should be $request->boolean()
* Chores : update FakeController.php $request->boolean()
* [kotlin] Added path sanitization in javadoc comments
* added sample as regression test
* Added samples/client/others/kotlin-jvm-okhttp-path-comments to github workflow
* Make all Java ApiClients in templates extendable
* Make all Java ApiClients in samples extendable
* Fix compilation of enum constructor
* Fix compilation of enum constructor in templates
Static analysis tools such as PHPStan report errors when dynamic calls are used
for static methods.
```
ERROR Dynamic call to static method PHPUnit\Framework\Assert::assertEquals().
```
According to the source code of PHPUnit
(https://github.com/sebastianbergmann/phpunit/blob/9.5.0/src/Framework/Assert.php)
the function is indeed static.
```php
public static function assertTrue($condition, string $message = ''): void
```
This change updates to PHP Flight test template `register_routes_test.mustache`
to use static calls for PHPUnit assertions.
* [cpp-rest-sdk] support serializing models as parameters
This fixes the code generation for the cases where the model is referenced as a parameter
* [cpprest-sdk] avoid newlines when no model import
* feature: implement deepObject query params as per documentation.
ClosesOpenAPITools/openapi-generator#19342.
* chore: regenerate samples.
* chore: symplify code (via @joscha)
* chore: regenerate samples
* test: add integration test for typescript-angular deepObject query params
* fix: typo in the integration tests path
* chore: use node v18 for integration tests
* chore: make ES6 compliant
* chore: make test name semantically accurate
* chore: regenerate samples
* test: add angular v16 deep-object test
* chore: delete previous bespoke test for deep objects (uses test introduced in 71629f8d9a instead)
* chore: restore missing OAS for deep object API tests
* test: move angular deepObject tests to v19 and delete v16 ones
* test: atomic deepObject test on service rather than integration with app component
* chore: clean up superfluous import
* [cpp-rest-sdk] fix finding of the crypto libraries
This fixes finding of the crypto for cpprest sdk via find_library. It also bumps the minimum CMake version to 3.10 to avoid deprecation warnings
* docs: add myself as a technical committee member
The dev container fails to build because of the outdated docker-in-docker feature. This updates the docker-in-docker and fixes the build. I also updated the docker compose references in the docs.
* Optimize HashSet Initialization
Noticed this while debugging - we can avoid wasting memory/cpu creating 16 buckets when we only need one or a few.
* generate samples
* use Arrays.asList
* 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>
* [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>
* 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
* 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>
* Fix for allof multi model with only metadata fields
* Update samples
* fixed compiler errors in java 17 and lower
* refactored isMetadataOnlySchema to ModelUtils.java
* 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
* 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>
* 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>
* Add useResponseAsReturnType option to kotlin, jvm-retrofit2 and coroutines api template (#15491)
* Add useResponseAsReturnType flag to kotlin-jvm-retrofit2-coroutines.yaml sample
* Generate sample
* 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
* [BUG][kotlin-spring] Fix defaultValue for RequestHeader is not generated (#20504)
* revert apiDelegate changes
* fix: fix unresolved reference for enum type
* 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>
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>
* 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
* [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
* [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
* 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
* 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
* [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
* 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.
* [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
* 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
* [julia] fix regex escape on server codegen
Fixed escaping of regex patterns on julialang server codegen.
* add comment for the escapeRegex method
* simplify
* 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
* formParams.mustache should contain @FormParam, not @QueryParam (#20991)
* updated samples; form parameters are declared using @FormParam, not @QueryParam (#20991)
* 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
* 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.
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.
* [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.
* 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
* 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
* 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()
* [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
* fix(openapi-generator): fixes GlobalSettings class to avoid ClassCastException when GlobalSettings#log is invoked
* fix(openapi-generator): sets GlobalSettings log level to debug
* 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
* [java] generateClientAsBean for restclient and webclient
Added possibility to generate restclient and webclient as a @Component in the same fashion as resttemplate.
Fix#17885Fix#19229
* - Samples
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.
* 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
* 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>
* 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>
* 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
* Revert "v7.12.0 release"
This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.
* set version to v7.13.0-SNAPSHOT
* update samples
* update doc
* 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>
* 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
* 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`
* [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
* 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
* [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>
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.
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.
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.
* 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)
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.
* 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
* 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
* 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
* 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
* 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>
* [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
* [JavaSpring] attach sources when using maven and interfaceOnly=true
Closes#15659
* [kotlin-spring] attach sources when using maven and interfaceOnly=true
Closes#15659
* 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
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
* 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
* 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
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.
- 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.
* 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
* 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
- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))?
- [ ] Have you validated the input using an OpenAPI validator?
- [ ] 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?
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
(For Windows users, please run the script in [WSL](https://learn.microsoft.com/en-us/windows/wsl/install))
Commit all changed files.
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
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.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] If your PR solves a reported issue, reference it using [GitHub's linking syntax](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) (e.g., having `"fixes #123"` present in the PR description)
- [ ] 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.
#- if [ $(ls -A "$HOME/.phpenv/versions/8.1.4" | wc -l) -eq 0 ]; then
# phpenv install 8.1.4;
# fi;
#- phpenv rehash
#- phpenv versions
##- phpenv global 7.2.15
#- phpenv global 8.1.4
#- php -v
# comment out below as installation failed in travis
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
[](https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA)
[](https://join.slack.com/t/openapi-generator/shared_invite/zt-36ucx4ybl-jYrN6euoYn6zxXNZdldoZA)
[](https://twitter.com/oas_generator)
[](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator)
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
@ -88,39 +92,55 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
- [6.3 - History of OpenAPI Generator](#63---history-of-openapi-generator)
- [7 - License](#7---license)
- [Sponsors](#sponsors)
- [Thank you to our bronze sponsors!](#thank-you-to-our-bronze-sponsors)
- [Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity](#thank-you-godaddy-for-sponsoring-the-domain-names-linode-for-sponsoring-the-vps-checkly-for-sponsoring-the-api-monitoring-and-gradle-for-sponsoring-develocity)
- [Overview](#overview)
- [Table of contents](#table-of-contents)
- [1 - Installation](#1---installation)
- [1.1 - Compatibility](#11---compatibility)
- [1.2 - Artifacts on Maven Central](#12---artifacts-on-maven-central)
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.
(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.10.0/openapi-generator-cli-7.10.0.jar)
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.15.0/openapi-generator-cli-7.15.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`
@ -630,6 +650,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
@ -971,6 +992,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 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)
@ -1002,6 +1025,7 @@ Here is a list of template creators:
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.