* 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