* 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
- [ ] 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
@ -89,38 +92,54 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
- [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)
- [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.12.0/openapi-generator-cli-7.12.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`
@ -1006,6 +1025,7 @@ Here is a list of template creators:
- 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
- dotnet test samples\client\petstore\csharp\generichost\net8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\httpclient\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- 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\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
### TODO: Execute all generators via powershell or other
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.