* [kotlin] Add companionObject option to generate companion objects in data classes
Add a new boolean CLI option `companionObject` (default: false) that generates
an empty `companion object { }` on all data class models, enabling users to add
companion extensions from outside the generated code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* [kotlin-spring] Add companionObject option to generate companion objects in data classes
Extend the same companionObject option to the kotlin-spring server generator,
enabling companion extensions on generated Spring model classes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* update spec, add tests
---------
Co-authored-by: Jeffrey Blayney <jeffrey.blayney@missionlane.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add support for Jackson 3 and Spring Boot 4 in Java resttemplate client generation
* chore: remove deprecated resttemplate-springBoot4 paths from YAML configuration
* feat: add serialization library support for Jackson 3 in Java client
* chore: initialize project structure and add initial files
* feat: update library template for Spring RestTemplate to support Jackson 3
* chore: add paths for resttemplate-springBoot4 in YAML configuration
* chore: remove unused test files from the project
* chore: add libs.versions.toml and update FILES for new test files
* chore: remove unused test files from the project
* Add support for `Optional<T>` in Dart generator (both dart and dart-dio) to distinguish absent, null, and present states
* Add useOptional and patchOnly options to the Dart client configurations thing for testing (setting both options to "true" for both types)
* Add documentation for useOptional and patchOnly options
* Tune the dart mustache (pluss class mustache) to get rid of the extra whitespace
* More tuning of the dart mustache files to adjust amount of whitespace - match previously generated setup
* Tune dart mustache templates to fix whitespace stuff by tips from wing328
* Fix the logic gap where useOptional=true without patchOnly=true appears to do nothing
* Rename getString() to extractModelNameFromBodyParam()
* Add behavioral tests
* useOptional flag wrapping non-required properties
* patchOnly mode PATCH schema detection
* patchOnly=true auto-enabling useOptional
* Parameter unwrapping behavior
* Fix inconsistency (my own) in native_class.mustache
* Remove "dead code" (because of timing). postProcessModels has already executed before postProcessOperationsWithModels.
And then we don't even need the extractModelNameFromBodyParam method...
* Fix Optional<T> to properly distinguish between absend and null
Had issues in dio
* Regenerate Dart samples
* Fix extra blank lines in dart-dio json_serializable template output
* fix(kotlin): use sealed interface for non-discriminator oneOf/anyOf in kotlinx_serialization
* add sample and CI config for non-discriminator oneOf/anyOf with kotlinx_serialization
* replace petstore with focused spec for non-discriminator oneOf/anyOf sample
* add CI path filter for kotlin-oneOf-anyOf-kotlinx-serialization sample
* add x-duplicated-data-type guard to kotlinx_serialization oneOf/anyOf templates
The Gson path already uses {{^vendorExtensions.x-duplicated-data-type}} to skip
duplicate data types, but the new kotlinx_serialization path was missing this
guard. Without it, duplicate value class names would be generated if multiple
schemas resolve to the same Kotlin dataType, causing compilation errors.
* remove invalid path pattern from push.branches in CI config
push.branches filters by branch name, not file paths. The sample directory
pattern added here had no effect. The pull_request.paths filter remains and
correctly triggers CI for this sample.
* update generateOneOfAnyOfWrappers docs to include kotlinx_serialization support
* [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>
* add x-kotlin-implements
* implement tests
* update samples
* fix tests - forbidden api issue
* add samples
* add samples. use Pageable only for server-side
* add support for auto-detecting x-spring-paginated in Spring Boot operations
* fix maven dependencies import
* add unit tests
* add support for vendor extension
* remove files
* fix samples
* fix docs
* implement suggestions from CR. Fix declarative interface naming.
* move import around
* add x-operation-extra-annotation
* make sure the PageableAsQueryParam does not remove already present x-operation-extra-annotation content
* support also list format
* regenerate samples and docs
* regenerate samples and docs
* force tests rerun
* remove files
* add files
* trigger test rerun
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
* 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>
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.
* fix: conditionally add jackson JsonIgnoreProperties for base class polymorphism
* fix: rename flag
* fix: rename flag
* fix: remove newline
* fix: regenerate example models
* fix: regenerate
* Initial Mill support
* Updated Docs after changing git and pom settings to case classes
* Update Docs
* include Mill plugin in Docker build
* fix scaladoc
* fix cubic-dev-ai findings
* style(crystal): fix coding style
* fix(crystal): object_id is so central in Crystal that it should not be overridden by user code
See: https://crystal-lang.org/api/1.18.2/Reference.html#object_id%3AUInt64-instance-method
* style(crystal): fix coding style
* fix(crystal): fix partial_oneof_module by using a class instead of a module
Fix https://github.com/OpenAPITools/openapi-generator/issues/22563
* fix(crystal): remove non-working code
It's not working because it uses #send method which doesn't exist in Crystal
See: https://crystal-lang.org/reference/1.18/crystal_for_rubyists/metaprogramming_help.html#differences-between-ruby-and-crystal
* fix(crystal): update reserved words, separate reserved keywords from methods
* fix(crystal): update samples
* fix(crystal): set default values when options are not passed
* fix(crystal): follow up https://github.com/OpenAPITools/openapi-generator/pull/22545
* fix(crystal): remove travis.yml file
* style(crystal): fix coding style
* style(crystal): use kwargs when calling @api_client
* style(crystal): use kwargs when calling Crest::Request.new
* fix(crystal): remove useless return_type argument
* fix(crystal): map object type to JSON::Any type
* fix(crystal): reduce use of require
* fix(crystal): return early if value is nil
* fix(crystal): update doc
* fix(crystal): remove dead code
* fix(crystal): kemal is not used in specs
* fix(crystal): class name should be in PascalCase
Fix:
- class EnumAttributeValidatorFor_type < EnumAttributeValidator
+ class EnumAttributeValidatorForType < EnumAttributeValidator
* fix(crystal): fix ameba warnings
* 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.
* Nim Generator Fixes
* remove test that is tested via yaml anyway
* Only include required parameters or non-empty optional parameters in URLs, support oneOf/anyOf via nim object variants, optional field support
* snapshot
* docs gen
* Improved handling of enums
* Add CLI option
* Add dep to generated Cargo.toml
* Add new `Error::SerdePathToError` error type
* Add `serde_path_to_error` invocation to API layer
* Add sample for serde-path-to-error
* Add arg & docstring to cliOptions as well
* Fix sample
* feat: add support for Swagger v3 annotations to jaxrs-spec
* test added unittest for jaxrs-spec with swagger3Annotations
* test added integrationtest for jaxrs-spec with swagger3Annotations
* test added integrationtest for jaxrs-spec with swaggerV2Annotations
* documentation update for new option useSwaggerV3Annotations in the jaxrs-spec.md
* test added integrationtest for jaxrs-spec with swaggerV3Annotations icm use JakartaEE
* update documentation by executing: ./bin/utils/export_docs_generators.sh
* ran on wsl: ./bin/generate-samples.sh ./bin/configs/*.yaml