* [OCaml] Fix bugs around enum parsing
Problem: The OCaml client generator threw IllegalArgumentException: Unreferenced enum when encountering enums inside composed schemas
(anyOf/allOf/oneOf).
Root Causes:
1. The enum collection logic didn't traverse into composed schemas
2. The enum hashing used order-dependent string concatenation, causing lookups to fail when enum values appeared in different orders
3. Enums directly within composed schema branches (not in properties) weren't collected
Solution:
1. Added composed schema support:
- New `collectEnumSchemasFromComposed()` method handles `anyOf/allOf/oneOf`
- New `collectEnumSchemasFromList()` method recursively processes composed schema branches
- Enums directly in composed schemas (not just in properties) are now collected
2. Refactored enum hashing to use Set:
- Changed from comma-joined strings to `TreeSet<String>` for order-independent, collision-free hashing
- Handles edge cases like empty string enums `""`
3. Added test case:
- Tests enums in nested composed schemas
- Tests enum with empty string value in anyOf
* OCaml: Add support for direct recursive types
* OCaml: Fix enums in anyOf
* OCaml: fix recursive types
* Fix recursion tests
* Fix recursive types, improve tests
* [OCaml] Improve title of generated README.md
* add 'useJackson3' option
* add 'useSpringBoot4' option
* add support for RestClient in spring-http-interfaces
* add 'jacksonPackage' template variable set from useJackson3 option
See #22294
* [new] Add Terraform provider generator
Add a new experimental code generator that produces HashiCorp Terraform
providers from OpenAPI specifications using the Plugin Framework SDK.
The generator (terraform-provider) supports:
- CRUD operation detection from REST patterns and vendor extensions
- Resource, data source, and model generation per API tag
- HTTP client with API key, bearer token, and basic auth
- Type mapping from OpenAPI/Go types to Terraform schema types
- Import state support
- Configurable provider name, registry address, and version
Includes mustache templates for: provider, resources, data sources,
models, client, go.mod, GNUmakefile, README, and example configs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* [new] Add Terraform provider petstore sample and acceptance tests
Add sample generation config and generated Terraform provider for the
petstore OpenAPI spec, along with Go acceptance tests that exercise
the provider lifecycle (create, read, update, delete, import).
Generated output includes:
- Provider with auth configuration (API key, bearer, basic)
- Pet, User, and Store resources and data sources
- Client package with HTTP client and model structs
- Go acceptance tests using terraform-plugin-testing
- Example Terraform configurations for each resource/data source
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: docs
* terraform: add more sample tests and ci workflow
* ci: get ci passing
* ci: fixes
* chore: docs
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Update rust-server examples to have namespaces by API name. Preventing warnings about clashing example names
* Update rust-server-deprecated examples to have namespaces by API name. Preventing warnings about clashing example names
* Fixup compilation errors
* fix: Resolve bug in header parsing when parsing multi-item headers
Supports:
All OpenAPI 3.x data types: primitives, arrays, enums, nullable/optional fields, nested objects
All parameter types: path, query, header, cookie, and combinations
Schema composition: allOf (inheritance), oneOf (discriminated unions), anyOf (flexible unions)
Security schemes: API key and bearer token authentication
Discriminator-based polymorphic deserialization and error handling
Provides:
Error handling for invalid JSON, type mismatches, missing/unknown discriminator, and parameter validation
Build system integration (CMake) for easy compilation and linking with required dependencies
Clear build and run instructions for local development and testing
Enables comprehensive, real-world validation of generated C++ server code against OpenAPI specifications
* [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
* 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
* Integrated example project for Mill into CI task
The example project uses Mills meta-build to resolve the snapshot version from a properties file.
The properties-file is now integrated into `release_version_update.sh`.
* Add coursier cache to actions-cache
* Split Mill tests into separate steps
* try to exclude problematic dependencies from maven-cache so they are downloaded by coursier
* clear m2-cache prior to mill execution
* fix working dir
* fix dir
* build locally
* install devtools
* set dir
* set dir
* set current dir
* set current dir
* set current dir
* set version
* show error only
* trigger build failure
* Revert "trigger build failure"
This reverts commit 7d20114b84.
* trigger build failure testing petstore
* install local package
* install local package
* trigger build failure
* test petstore localhost
* Revert "test petstore localhost"
This reverts commit 008d23bcc2.
* undo test_petstore.R
* Generate skeleton for new integration test
* Typescript-angular: Move query param deep-object test
* typescript-angular: Add query param JSON test
* Typescript-angular: Add query param form test
* Test for #20998
* typescript-angular: Reimplement query param serialisation
This notably fixes:
- JSON query param serialisation
- array serialisation with style=form and explode=true
As the class HttpParams from Angular is specially designed for the
mimetype: `application/x-www-form-urlencoded` it does not support
the range of query parameters defined by the OpenAPI specification.
To workaround this issue, this patch introduces a custom
`OpenAPIHttpParams` class which supports a wider range of query param
styles.
Note that as `HttpClient` is used afterwards, the class
`OpenApiHttpParams` has a method to convert it into a `HttpParams` from
Angular with a no-op HttpParameterCodec to avoid double serialisation of
the query parameters.
* update samples
---------
Co-authored-by: Vladimir Svoboda <vsvoboda@forkoder.eu>
* remove "async" and "responseWrapper" from template as these are not supported by kotlin-spring generator
* try to force pipelines rerun
* force pipelines rerun
* fix mustache to keep generated code identical
* Revert "fix mustache to keep generated code identical"
This reverts commit c573b43401.
* Reapply "fix mustache to keep generated code identical"
This reverts commit 2c3b065c5c.
* Add support for 'useResponseEntity' in kotlin-spring. Consolidate with the separate flag 'declarativeInterfaceWrapResponses' as these can now be controlled both by one flag. Default to true.
* fix status annotation and add compile-test samples
* satisfy samples-up-to-date check
* add unit tests covering both reactive and non-reactive
* fix template to avoid unnecessary empty line
* fix template to avoid unnecessary empty line
* put method params (if present) on separate lines to improve readability
* put method params (if present) on separate lines to improve readability; fix double spaces, spaces before comma, incorrect spaces
* fix test
* store PATHs as accesible strings in companion objects.
* fix missing import
* fix incorrect import
* fix fallback to nested placeholders.
* Generate wrappers for oneOf with discriminator when using kotlinx.serialization
* Add spec with oneOf using discriminator
* Add config to generate samples
* Generate samples
* Update samples
* Change naming of wrapper classes
* Fix empty model test
* Update GH workflow with new samples