* feat(python): enhance retry configuration in REST client
Updated the retry parameter in the Configuration class to support different types based on the library used (urllib3 or asyncio). Adjusted the RESTClientObject to handle the new retry configuration, allowing for more flexible retry options. This change improves the handling of retries in API requests, ensuring compatibility with various retry strategies.
* add samples
* use async context for retry doc string
* [Java] add missing nullable judgement when required property is true
* [Java] add okhttp template test and regenerate sample
* [Java] add tests when field is nullable and required
* [Java] regenerate samples to fix pipeline error
* [Java] add JSONTest fro RequiredNullableBody class
* run generate-samples after rebase
* review feedback
* review feedback
* fix test
* update hash of test file
---------
Co-authored-by: weirdo0314 <2019215183@stu.cqupt.edu.cn>
* BUG:21187 put back hardcoded client without the issue created in 8484
* BUG:21187 put back hardcoded client without the issue created in 8484
---------
Co-authored-by: Sri Sushma Karra <srisushmakarra@Sris-MacBook-Air.local>
* [kotlin][jvm-okhttp4] Fix multipart/form-data with JSON content-type
Fixes#16457
Fixes two critical bugs in multipart/form-data handling when parts
have Content-Type application/json:
1. IllegalArgumentException: OkHttp throws "Unexpected header: Content-Type"
because Content-Type was passed in headers map instead of via
asRequestBody(mediaType)/toRequestBody(mediaType) parameter.
2. Invalid JSON serialization: Non-file parts with application/json
Content-Type were serialized using toString() instead of proper
JSON serialization, producing invalid output like:
"MyObject(field1=value, field2=123)" instead of
'{"field1":"value","field2":123}'
Changes:
- Filter Content-Type from headers before passing to OkHttp
- Check part Content-Type and use appropriate serializer (JSON vs toString)
- Add integration tests with echo server to verify fix
- Support all serialization libraries (gson, moshi, jackson, kotlinx)
Fixes issues with multipart endpoints that mix file uploads with
JSON metadata, common in REST APIs for document/image uploads.
* Run mvn clean/package, and regenerate samples
* Add fix for kotlinx serialisation issue
* Refactor multipart helpers for reified type parameter support
* Fix kotlinx.serialization multipart by adding serializer lambda to PartConfig
* Fix internal Ktor API usage in multipart forms
We already have logic in postProcessModelProperty to fit integer
parameters into the correct Rust primitives. However, this doesn't apply
to other kinds of parameters so integer-typed parameters which end up in
function calls for Api traits in lib.rs are always i32, even when this
is improper.
This commit refactors integer type fitting so that we can run it on both
processParam and model post-processing.
* feat: Support selective ssl/tls backend in rust-server to avoid always requiring openssl
* feat: Switch default features so a user must select SSL backend
* Further tweaks to rust-server HTTPS feature flagging
* fix(protobuf-codegen): Fix protobuf import path with discriminator
This PR fixes a critical bug in the protobuf schema generator where models using discriminators with llOf composition were generating invalid import paths when child schemas contained references to other models.
* fix: Add missing element in OpenAPI discriminator test case
* feat(protobuf-generator): Improve protobuf generation
* Improve management of inheritance
* Improve management of discriminator
* Allow to separate inline enums in external files
* Add unit test
* fix: Improve logic when extracting enums to avoid collision in enum values
* fix: Manage case with Enum in lists
* fix: Fix issue on enum extraction
Fix issue linked to enum in array when there is inheritance or discriminator
* doc: Add documentation for new parameter
* chore: Update protobuf samples
---------
Co-authored-by: Anthony TODISCO <Anthony.TODISCO+amadeus@amadeus.com>
Wrap example values with escapeText() to properly escape special
characters in generated Go client code examples
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
* [R] avoid to-JSON issues when R6 classes contain lists of R6 classes
* fix missing comma
* only include extractor methods when they are needed
* regenerate samples
* fix typo
Add new OpenAPINormalizer rule SORT_MODEL_PROPERTIES that sorts schema
properties alphabetically by name. This ensures deterministic code
generation output regardless of property ordering in the source spec.
The rule:
- Uses TreeMap to sort properties by natural string order
- Applies at the OpenAPI normalization stage, working for all generators
- Is opt-in (defaults to false) to maintain backward compatibility
Usage:
openapi-generator generate --openapi-normalizer SORT_MODEL_PROPERTIES=true ...
Fixes non-deterministic property ordering that could cause spurious diffs
in generated code when the source schema order varies.
* [Rust] Update reqwest dependency to 0.13 with query and form features
Update the Rust client generator template to use reqwest 0.13 instead
of 0.12, as requested in issue #22621.
In reqwest 0.13, the `query()` and `form()` methods have been moved
behind feature flags and are disabled by default. Since the generated
Rust clients extensively use both methods, these features must be
explicitly enabled.
Changes:
- Updated all reqwest dependencies from ^0.12 to ^0.13
- Added "query" and "form" to reqwest feature flags for all variants:
- Blocking client configuration
- Async client with file stream support
- Async client without file stream
- Reqwest-trait variant
- Updated reqwest-middleware features for consistency
This maintains full backward compatibility as only the dependency
version and features change. The API surface of generated code
remains identical.
Fixes#22621
* [Rust] Updated samples
* [Rust] Rename rustls-tls feature to rustls to match reqwest 0.13
In reqwest 0.13, the rustls-tls feature was renamed to rustls.
This updates the Cargo.mustache template and all generated samples
to use the new feature name, fixing CI build failures when using
--all-features flag.
* [Rust] Upgrade reqwest-middleware to 0.5 for reqwest 0.13 compatibility
The previous reqwest-middleware 0.4 depends on reqwest 0.12, which caused
type conflicts when upgrading to reqwest 0.13:
- reqwest::Error (from reqwest 0.13)
- reqwest_middleware::reqwest::Error (from reqwest 0.12 via middleware)
These are different types from different versions of reqwest.
reqwest-middleware 0.5 is compatible with reqwest 0.13, resolving the
version conflict. With both using the same reqwest version, the re-exported
types are now correctly aligned.
* [Rust] Use query and form features from reqwest-middleware
It adds "query" and "form" features for reqwest-middleware crate in petstore-async-middleware example and Cargo.mustache template.
---------
Co-authored-by: Emil Bonne Kristiansen <emilbonnek@gmail.com>
* [BUG][typescript-angular] apiKeys cause service compilation errors
Updated TypeScript Angular `configuration.mustache` to properly handle
apiKeys in query parameters by using `OpenApiHttpParams` instead of
`HttpHeaders` to avoid compilation errors.
Fixes#22774
* add generated samples
* [swift6][client] Increase minimum supported SDK to accommodate swift concurrency
* [swift6][client] Increase minimum supported SDK to accommodate swift concurrency