Conversation
|
thanks for the PR cc @OpenAPITools/generator-core-team |
|
thanks for fix. let's give it a try |
| while(seenOperationIds.containsKey(uniqueName)) { | ||
| uniqueName = co.operationId + "_" + counter; | ||
| counter++; | ||
| } |
There was a problem hiding this comment.
looks like this breaks the use case in which more than one operation having the same name (e.g. getId) and now users will get something different
There was a problem hiding this comment.
You can revert it but we will need a sample for the use case this breaks and another pr with this fix that doesn't break that sample.
There was a problem hiding this comment.
When you say users get something different, is it wrong, or just different?
There was a problem hiding this comment.
I think it's nice addition to prevent spec with duplicated operationId generating code that won't compile. Thanks again for the PR.
Let me think about how to deal with auto fix (opt in or out) and come up with a solution.
Will definitely add samples/tests for to cover this case moving forward.
Thanks again for your work!
There was a problem hiding this comment.
When you say users get something different, is it wrong, or just different?
please refer to the discussion in https://openapi-generator.slack.com/archives/CLSB0U0R5/p1728581031429579?thread_ts=1728372817.754659&cid=CLSB0U0R5
There was a problem hiding this comment.
I have multiple endpoints in my openapi.json which have the same operationId. This was perfectly fine in 7.8.0 and is also fine "in real life" because they are all below different path. I have for example two GET endpoints
- "/moneyflow/server/monthlysettlement/getAvailableMonth" with operationId "getAvailableMonth"
- "/moneyflow/server/report/getAvailableMonth" also with operationId "getAvailableMonth"
With the JavaSpring generator, I now get interfaces generated with "getAvailableMonth_0" inside the ReportControllerApi and one "getAvailableMonth" in MonthlySettlementControllerApi.
This is just an example - I have multiple endpoints with "create", "delete" and so on operationIds - they now all end up getting generated as create_0 up to create_4 - all in different Controllers.... this really looks like a mess to be honest.
How can I revert back to the old behaviour. There is no point to make this methods unique project-wide when they end up getting generated in different Controller Interfaces (not generating a client, using tags to group endpoints controller-wise). Additionally those numbers don't seem to be predictable so it just ends up with not usable method names (because they may vary in the future I guess). At least tags should be considered to verify if random numbers have to be added or not. It makes no sense to add them for same operationIds in different tags.
There was a problem hiding this comment.
Clearly the _0 is a breaking change. The issue for me is that I use the operationId in the name of a class which means it has to be unique. I thought using the operationId would give me a unique value, but that is not true when there are tags. I'll have to explore a different way to handle this.
There was a problem hiding this comment.
On class level you are right (have to be unique). If I understood the initial problem correctly, it was all about Windows filesystem limitations (case insensitive). So maybe the file names have to be unique case-insensitiive wise, but the code inside the files might not. I mean while Windows can't have File1.x and file1.x in parallel, it might have File1.x and file1_0.x but with classes File1 and file1 inside. But - not sure if there are languages out which dictate classname must be equal filename.
And one problem remains imho. The names become inpredictable. What guarantees that "...._0" will be "..._0" in the future and not silently will be generated as "..._2" at one point instead. Maybe just because some dev decides to reorder the openapi spec? Adding iterating numbers seems not right at all imho but maybe I'm missing something 😄
What about taking the tag into consideration?
There was a problem hiding this comment.
The _0 part of this pr reverted in a new pr. Thanks for being understanding. #19913
* [csharp][generichost] Support response ranges (#19256)
* support response ranges
* revert unintended change
* update try deserialize methods
* [Python] fix object arrays giving mypy error "Incompatible types in assignment" in to_dict() (#19223)
* [python] mypy fix for multiple arrays of objects
* [python] mypy test for multiple arrays of objects
* Migrate from Gradle Enterprise to Develocity (#19264)
* Conditionally force array context when converting to JSON (#19262)
* Update ApiClient.mustache for retrofit2 + rxJava3 support to use official square implementation of rxJava3 adapter (#19266)
* [Go] Set Default Values for Required Variables when a default is defined (#19232)
* use default values for required vars when available
* update tests to existing config file
* cleanup OAS test
* Remove setting value in Get.
* Use Pascal Case for variable naming in Getter Function
* add a CLI option
* add a CLI option
* add a CLI option
* update docstring in go client, better code format (#19268)
* update docstring in go client, better code format
* update samples
* Remove from pingable lists (#19272)
I have not been active in the project for nearly 4 years, but remain
as a pingable maintainer on the readme. This is updating the readme to be
accurate. I only spend around 1-3 hours every other month lately on open-source,
so it's just an issue of time/availability.
* Convert relative to absolute path (#19269)
* [GO] fix generated variable names when no discriminator is used with 'oneOf' (#19183)
* fix oneOf var names when no discriminator is used
* add OneOfWithComplexType to Go petstore schema
- an array of strings variant should end up with the same valid name
whether `useOneOfDiscriminatorLookup` is `true` or `false`
* feat(php-nextgen-client): add support for streaming (#19192)
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
* fix: Template contains unconditional ": Serializable" which creates wrong derive clause on data classes which have a parent as well as are serializable. (#19283)
* [Kotlin] Update formParams.mustache to have List of MultipartBody.Part (#19287)
* [Kotlin] Update formParams.mustache to have List of MultipartBody.Part
* Update formParams.mustache
* chore: removes new line
* [Go] Fix deepObject serialization that are anyOf (#19090)
* [Go] Fix deepObject serialization that are anyOf
Updates the go client generator to have the generated struct for anyOf types conform to `MappedNullable` interface.
Fixes query params serialization for deepObjects that are of `anyOf` type.
Implements the suggestion in https://github.com/OpenAPITools/openapi-generator/issues/19085
* check parameter style for deepObject serialization
* generate samples for go-echo-external-refs-test
* move test back to http port
* restrict to anyof models with discriminator
* update test
* add some tests
added some tests to `modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml` and regenerated the samples
* [csharp] Convert numbers to long when min/max is too big (#19290)
* convert numbers to long when min/max is too big
* handle exclusives
* use global keyword (#19257)
* [BUG] [Python] Fix autoset constants Python code for default query string value (#19138)
* _query_params is list, not dict
* Add test
* fix: remove "hack" to skip schema-mapped models (#19191)
That method relied on the faulty assumption that toModelFilename does not consider mappings, which is not the case for multiple generators.
* #19176 fix Task.Result directly blocks thread (#19231)
- async should never be blocked on the ApiClient
To fix we invert the logic and use Task as base and keep consistency, we expect and wait result only on synchronous calls.
* Support Helidon SE 4 generation (clients and servers) (#19150)
* Save work-in-progress
* Incoming param handling generating well exc. for file upload
* Revise generated test for v3 vs v4 differences
* Leave details of multi-part handling to the user for now
* change default version to use the highest version known
* SE client changes for Helidon 4
* A few fixes; add new v4 SE samples
* Fix v3/v4 routing prep
* Improve version handling if web site is inaccessible; add test
* Reworking parameter conversion and required and validation handling
* Add generation of a return value record per response for each operation
* Improvements to the result record generation
* More changes
* Remove change in whitespace in v3 output
* More progress on parameter handling
* WIP - refactor parameter-returning methods to inner class along with return records
* Reorg of op helpers
* Use no-op for handling map in path, query, header, cookie - need to revise later
* Binary form param handling
* Clean-up and consistency check bt useAbstractClass and not
* Improve result builders
* Add new samples files
* Fix a few issues
* Update samples after rebase; add build steps for v3 and v4 uac github actions
* Remove v3 se useAbstractClass test - creates some bad code
* Generated doc updates
* Fix missing newline
* Improve Javadoc for generated Result; add convenience Result.send method
* Add bean val. for body param if needed
* Restructure generated records for declared responses; add Generated annotation selectively
* Fix typo
* In sample generation, force a stable generatorVersion value to avoid confusing builds and up-to-date samples checking
* Fix up white space in older generation
* Generate PartsUtils only with useAbstractClass = true
* Adopt some review comments; more to come
* Review comments; notably, switch to using the first path segment to group operations rather than the tags items
* Improve status handling a bit
* Add new generated sample files
* Add missing new samples files
* Quite a few updates, esp. to generated samples
* New config file for sample
* Updates samples
* Add updates to .openapi-generator/FILES contents
* Add route4me to the sponsor list (#19294)
* update samples
* add route4me to the sponsor list
* [cpp-qt-client] Qt progress info (#18950)
* Update HttpRequest.cpp.mustache
Use stable 4-parameter connect
* add generated files
* Revert "add generated files"
This reverts commit 1d4e78aa0d42208b576354276c274000c29863f9.
* catch download progress in HttpRequest and pass it to api
* Update HttpRequest.cpp.mustache - clean mixed in changes
Removed additional changes from other PullRequest
* Update HttpRequest.cpp.mustache - replaced tabs by spaces
* Update api-header.mustache - replaced tabs by spaces
* Update HttpRequest.h.mustache - replaced tab by spaces
* ran step 3 from Linux
* changed downloadProgress to -nickname-DownloadProgress and added it to all regions where execution finish is connected
* ran step 3
* replaced tab by spaces
* ran step 3
* activate tracing to detect link issue
* removed redundant connects and encapsulated changes in {{addDownloadProgress}}
* added generated files from step 3
* remove cli-option for httprequest - this should be always there
* added files from step 3
* improved name
* Update samples-cpp-qt-client.yaml - fix parameter order
* Update samples-cpp-qt-client.yaml
* [cpp-qt] Add option for download progress, add test (#19297)
* add option for download progress, add test
* add cmake file
* remove test
* update
* Refactored Identifiers (#19270)
* [typescript][angular] move api version from license info to readme (#19310)
* [typescript][angular] move api version from header license info to readme
* [typescript][angular] move api version from header license info to readme
* Add ConfigCat to the Companies/Projects using OpenAPI Generator section (#19304)
* Add ConfigCat to the Companies/Projects using OpenAPI Generator section
* Adding ConfigCat to the users.yml and adding a logo
* [BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a¶m=b vs param[]=a¶m[]=b) #19233 (#19236)
* [BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a¶m=b vs param[]=a¶m[]=b) #19233
* Added tests (replaced old provider data). This looks like a breaking change
* Fix space
---------
Co-authored-by: Serban Ghita <serban.ghita@virta.global>
* Issue-19220: processing schema name is added to the list with names checked at recursing processing, so it prevent to endless recursive execution (#19221)
* [bugfix][kotlin-wiremock] fix problems with range responses (#19309)
* [kotlin] Target correct library in jvm-spring-webclient sample
* [kotlin] Fixed warning in jvm-spring-restclient
* [kotlin-wiremock] fixed issue 7193
* [kotlin-wiremock] fixed wrong implementation of fromResponse
* [kotlin-wiremock] forbidden API
* [kotlin-wiremock] fixed wrong workflow trigger
* update php samples
* [Rust/Rust Server] Fix example/test code (#19318)
* [Rust Server] Fix code so examples compile
Zero length arrays don't correctly type infer, so if we have no scopes, we need to not create a empty array
We need an authentication middleware - without it the code doesn't compile.
* Update samples
* [Rust Server] Remove trailing whitespace
* Update samples
* [Rust Server] [CI] Build all targets
* [Rust] Fix reqwest test
* Minor change to Helidon version handling allowing snapshot versions (#19320)
* Minor change to Helidon version handling
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaHelidonCommonCodegen.java
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
* Review comments: fix typo in comment
---------
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
* Allow for binary response content (#19331)
* [csharp] Change sorting default (#18942)
* change sorting default
* implement sorting options for all libraries
* rebuild tests
* build samples
* changed default sorting of samples (#19335)
* Fix issue https://github.com/OpenAPITools/openapi-generator/issues/19326 (#19328)
Try to fix issue https://github.com/OpenAPITools/openapi-generator/issues/19326
* python-asyncio: update retry factors for actual exponential retries (#19337)
* python-asyncio: update retry factors for actual exponential retries
As per the `aiohttp-retry` library's code[^1], the timeout is
```python
timeout = self._start_timeout * (self._factor ** attempt)
```
This means the previous setting with "start_timeout=0.0" would have
always just retried right away (0 timeout) regardless of the "factor" value,
and also, "factor=0.0" would never have increased the timeout, rather it
would have resulted in a 0 timeout regardless of the value of "start_timeout".
This double-zeroing effectively rendered exponential backoff to nothing (rather than
"retries" number of retries in quick succession.
The update is a quick fix to set the same default as in `aiohttp-retry`. In
the future this should likely be configurable (through extra Configuration settings perhaps?),
as not all APIs are created equal, but this works as a quick fix for making retries more effective.
[^1]: https://github.com/inyutin/aiohttp_retry/blob/ba2169891f5b32a5c59e48ca185dd8e68e44ded7/aiohttp_retry/retry_options.py#L38-L65
* updated example
* Added support for openapi-normalizer in the online version. (#19336)
* Added support for openapi-normalizer in the online version with a minimal test.
* removed comments and formatted code
* fix invalid syntax in gitignore (#19341)
gitignore only supports line comments, not in-line comments
* update dart samples
* [PowerShell] Fix missing Content-Type header on a 204 response (#19340)
* Allow for binary response content
* AllowNull for $ContentTypes
* Update PSApiClient.ps1
* [C++][Pistache] Add error handlers overload taking the response object (#19314)
This allows overriders to have full access to the response object and
more finely control the error handling behavior.
For example, this enables the specification of a proper Content-Type in
case of custom format responses (application/json, ...)
* [C++][Pistache] Fix 'unused-parameter' warning on Helpers.h file (#19315)
* [JAVA] use query parameter apikey if present (#19334)
* Fix #16362
* Update samples
* Undo formatting changes
* Revert whitespace changes in samples
* make it work
---------
Co-authored-by: Jason Boileau <jason@boileau.dk>
Co-authored-by: Jason Boileau <spraot@users.noreply.github.com>
* [Core] Consolidate Operation ID generation (#19339)
* [Core] Consolidate Operation ID generation
* Update samples
* Include licenseInfo for all the generated java code files (#19273)
* Include license info for all the generated java code files
* Re-base generate
* revert gradle extension version (#19351)
* [Rust Server] Refactor Mustache templates for request/response body handling (#19347)
* [Rust Server] Refactor Mustache templates for request/response body handling
* Update samples
* docs: update versions, fix links, remove broken camel.xml, update download counts (#19356)
* manually update version in documentation, remove camel.xml
... because it has the wrong generator version, it has the wrong generator name (should be "java-camel"), the generated code doesn't compile - and then I didn't check further
* improve automatic version updating
* fix one more Readme link
* update docker stats again
* [Java][OkHttp-Gson] fix: free form query parameters for okhttp-gson (#19226)
* [Rust Server] Use swagger/multipart_related support (#19354)
* [Rust Server] Use swagger/multipart_related support
* Update samples
* [Rust Server] Improve RFC 13341 compliance for multipart/related (#19355)
* [Rust Server] Improve RFC 13341 compliance for multipart/related
* Update samples
* Suppress Pattern annotation on property of type byte array (#19346)
* Suppress Pattern annotation on property of type byte array
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
* Straggler files from generated samples
* Add new format test to workflows
---------
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
* Better handling of backtick in pattern (#19358)
* use x-go-datatag in go client model template
* add logic to handle backtick
* fix mixed indent + move do to same line as start of loop (#19373)
* [Rust Server] Fix homepage URL in Cargo.toml (#19365)
This fixes a missing quote in Cargo.toml, which causes validation errors
* [Rust] Ensure all features build as part of CI / Upgrade to Frunk 0.4 (#19364)
* [Rust] [CI] Build all features as part of CI
* [Rust Server] Update to frunk 0.4
* Update samples
* [Rust Server] Fix server-writing docs for rust-server (#19367)
* Fix server-writing docs for rust-server
Fix broken link in generated README for rust-server.
* Update samples
---------
Co-authored-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
* Make the rust hyper client `Send` so it can be used in rust threads more easily (#19375)
* Add externCrateName property to rust hyper client
This is follows the lead of the rust hyper server generator and provides
an externCrateName. This is because the crate name used for importing
can be different from the package name, because dashes `-` get converted
to underscores `_`.
This allows us to write example code in rustdoc that compiles
successfully.
* Get the rustdoc examples to actually compile
* Make rust hyper client thread safe
* Fix compile time issue with reqwest client test
* Add a test for thread safety
* Generate rust hyper samples
* Use https for petstore api to fix client tests
http://petstore.swagger.io/v2 is 301 redirecting to
https://petstore.swagger.io/v2 and this is breaking posts to the API.
When the client recieves a redirect it does not resend the POST data,
instead it switches to GET. This is in line with how browsers behave
when encountering a 301 redirect on a POST request.
* Make rust hyper client structs `Sync` too
This trait is also helpful in making the api work well with threads.
* Use a getCrateName function instead of adding more state
* update samples
---------
Co-authored-by: Krishna Rajendran <krishna@emptybox.org>
* [Rust Server] Allow configuration of multipart/form attachment size limit (#19371)
* [Rust Server] Allow configuration of multipart/form attachment size limit
multipart 0.14+ imposes a 8MB size limit on multipart/form bodies.
This allows that limit to be configured. The default is left as is.
This also improves error messages produced when handling multipart/form bodies.
* Update samples
* [kotlin-client] Add @JsonEnumDefaultValue annotation to enum class (#19380)
* [Rust Server] Sort operations so that the ones with fewest params come first (#19368)
* [Rust Server] Sort operations so that the ones with fewest params come first
This resolves things correctly per
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#pathsObject
- "When matching URLs, concrete (non-templated) paths would be matched
before their templated counterparts."
* Update samples
* [Rust Server] Fix tabs vs spaces
---------
Co-authored-by: Rob Day <Robert.Day@metaswitch.com>
* Fix Reactive Spring build.gradle.kts (#19382)
Co-authored-by: Erik VanderWerf <eski787@gmail.com>
* v7.8.0 release (#19385)
* Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"
This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.
* update samples for v7.9.0-snapshot
* update doc to v7.8.0
* feat(python): handle multiple file parameters (#19329)
* test: fix broken python test
* fix: handle multiple file parameters
Previously an array of files was not handled correctly, despite the type
annotation implying it was.
* feat: handle filename,filedata tuples in file param
This allows for users to pass filenames with their data in file params,
which is useful for multipart formdata requests. Without this, the list
of files added in the previous commit would have the same filename for
all files (the parameter name).
* [Rust Server] Fix up model generation (#19363)
* [Rust Server] Fix up model generation
- Correctly generate anyOf/oneOf models
- Fix up ToString / FromStr support
- Disable PartialOrd generation for anyOf/oneOf models
- Generate models for inline enums
- Support enums in headers, and vectors of models in headers
* [Rust Server] Add test for anyOf with additional properties
* Update samples
* [Rust Server] Tidy up logging
* [typescript][angular] move app description from license info to readme (#19397)
* [typescript][angular] move app description from header license info to readme
* [typescript][angular] move app description from header license info to readme
* Upgrade commons-io dependency to latest 2.16.1 (#19414)
* fix regex breakage in unmarshaljson function (#19410)
* [Python] Update python-pydantic-v1 generator to respect the --git-host argument (#19404)
* Update pyproject.mustache
chore(pyproject): replace static `github.com` with variable `{{{gitHost}}}`
* chore: follow contribution guidelines
* use gitHost in python pyproject template (#19421)
* [Kotlin][okhttp] replace okhttpclient with callfactory (#19422)
* [python] fix content_type deserialize (#19317)
* [Python] fix: #19285
* [python] update sample
* [python] add test
* [python] remove test
* [Rust Server] Add auto-generated CLI Client (#19392)
* [Rust Server] Add auto-generated CLI tool
* [Rust Server] Test multiple path parameters
* [Rust Server] Test boolean parameters and apostrophes
* [Rust Server] Test operation with two boolean parameters with same first letter
* [Rust Server] Test apostrophes in operation summary
* Update samples
* [Rust Server] Fix build errors with OpenSSL
* Update samples
* Update samples
* Add support for global token based auth for k6 script generation (#19348)
* Add global token based auth support (basic, bearer) for k6
* config files and generated code files after the changes
* Handle empty or null auth at path level
* files changed after update with master and run build
* Support multiple files (#19449)
* Bump micromatch from 4.0.5 to 4.0.8 in /website (#19444)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)
---
updated-dependencies:
- dependency-name: micromatch
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [typescript-fetch] Add option to generate validation attributes of model properties (#19448)
* Remove extra bracket to fix compilation (#19464)
* Better handling of parameters in inline model resolver (#19460)
* add tests for parameter ref of oneOf
* update samples
* better handlding of parameters in inline model resolver
* remove unused file
* [java] Use @JsonFormat instead of @JsonSerialize for bigDecimalAsString property (#19322)
* [java] Use @JsonFormat instead of @JsonSerialize so that JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN is respected and generates a String using BigDecimal#toPlainString instead of BigDecimal#toString
* Only add Jackson @JsonFormat if properties serializeBigDecimalAsString and jackson are enabled
* Do not verify if jackson is available when mapping imports as the property is not evaluated yet
* Removed unused JsonSerialize and ToStringSerializer
* [typescript] use `const` for `middleware` symbol (#19478)
* style: use const for `middleware`
* chore: update generated code samples
* [Java] Add a new additional property to configure Jackson's `failOnUnknownProperties` (#19271)
* [Java] Add a new additional property to configure Jackson's `failOnUnknownProperties`
* Move `FAIL_ON_UNKNOWN_PROPERTIES` property to JavaClientCodegen
* Template `FAIL_ON_UNKNOWN_PROPERTIES` for other libraries beside retrofit2
* Default `failOnUnknownProperties` to false for all Java Client libraries
* Fix integration tests
Add the `failOnUnknownProperties: true` additional properties to generate the
expected mapper
* [typescript] fix: `enum` can not receive stringified class name (#19481)
* fix: `enum` can not receive stringified class name
* chore: update generated code samples
* [typescript] fix: deno: type exports for `isolatedModules` (#19484)
* [Typescript] Generate oneOf schemas as type unions (#19494)
* Add oneOf model for Typescript generator
* Update import procces: For oneOfs only import $refs within the oneOf
* Remove new line after description
* Update samples
* Typescript: Update model.mustache
* Typescript: Remove emun from oneOf models
* Update samples
* Typescript oneOf: add discriminator and update deserialize procces
* Typescript: update tests
* Typescript oneOf: move type mapping to models
* Typescript: Update samples
* Typescript: Update type of mappig
* Typescript: Update type of mappig
* Typescript oneOf: update deserializing logic
* Typescript: Update samples
* Revert "[typescript] fix: `enum` can not receive stringified class name (#19481)"
This reverts commit 4238f17322bdb0e968f94b621669b737395a3dc9.
* [typescript] chore: update fixtures
---------
Co-authored-by: ksvirkou-hubspot <ksvirkou@hubspot.com>
* docs: add hints about how to use snapshot version of `generator-cli` (#19497)
* docs: add hints about how to use snapshot version of `generator-cli`
* docs: simplify
* style: indentation
* fix typo woking -> working (#19498)
* Remove unused go-server-required (#19505)
* bugfix: use the correct key when generating auth example in readme (#19492)
* Fix ObjectSerializer::isEmptyValue to not consider "0" as "" (#19472)
* update C# restsharp to 112.0.0 (#19507)
* [java] Fix issue #17472 when using schemaMapping for models in collections, not compilable code with @Valid is generated (#19093)
* Fix issue 17472
* Avoid cast exception
* [typescript-angular] fix: when model property name is sanitized, use instead original property name within quotes in mustache template (#19508)
* fix: typescript-angular -> when model property name is sanitized, use instead original property name within quotes in mustache template
* fix: updated samples
* chore: added comment for hasSanitizedName
* add original tag, add dummy model for test
* update samples
---------
Co-authored-by: Davide Diaconu <davidediak@gmail.com>
* [Bugfix][Java] Fixed jersey clients for multiple file upload (#19476)
* Fixed jersey3 client for multiple file upload
* Updated sample
* Fixed typo
* Fix
* Fix for jersey2
* [Typescript:Axios] Fix withInterfaces and usSingleRequestObjectParam (#19467)
* Support withSingleRequestParameter along with withInterfaces
* Add sample and config for combination
* Re-generate samples
* [typescript] fix: `explode: true` should yield appended `query` params (#19519)
* [typescript] fix: `explode: true` should yield appended `query` params
* fix: object keys should be `set`
* [Java Libraries] Jakarta Validation API support useJakartaEe flag (#19469)
* Jakarta Validation API support useJakartaEe flag
* Jakarta Validation API support useJakartaEe flag
* Remove appendRequestToHandler (#19500)
* feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient (#19430)
* feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient
Closes #19406
* chore (JAVA SPRING RESTCLIENT) 19406: Add new sample to jdk 17 tests
* fix (JAVA SPRING RESTCLIENT) 19406: Fix sample build
* update samples
* Fix for #15736 [TYPESCRIPT-FETCH] Subclassing components using discri… (#19524)
* Fix for #15736 [TYPESCRIPT-FETCH] Subclassing components using discriminators fails to convert subclasses to JSON.
Added similar discriminator handling to ToJSON as was already in place for FromJSON.
The actual files changed are typescript-fetch/modelGeneric.mustache and typescript-fetch/apis.mustache.
Also, adjusted FromJSON a bit in an attempt to support multiple hierarchical levels of discriminators.
And fixed an issue with calling FromJSON from the map() function, which caused the index parameter getting inadvertently passed as the ignoreDiscriminator parameter.
Additionally, fixed failing "mvn integration-test -f samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml"
Moreover, added forceConsistentCasingInFileNames:false into tsconfig.json to make tests compile on OsX.
* Rolled back the changes related to the map() function calls in favor of using ToJSONTyped instead, as that is in line with how FromJSON is already implemented.
* [typescript-fetch] Fixed issue where unique arrays (sets) of primitive values aren't initialized properly (#19521)
* Fix for https://github.com/OpenAPITools/openapi-generator/issues/19520
* Removed redundant Array<any> cast
* Fixed modelGeneric.mustache
* Updated samples
* Add dotcom-monitor to the sponsor list (#19546)
* add dm to the sponsor list
* update
* version bump (#19545)
* docs: link to existing documentation for snapshot builds and locally built JARs (#19544)
Follow-up from https://github.com/OpenAPITools/openapi-generator/pull/19497 since https://github.com/OpenAPITools/openapi-generator-cli/pull/794 has been merged.
* [Java][Spring]Update dependencies to remove vulnerability in org.springframework:spring-webmvc (#19533)
* Update dependencies to remove vulnerability in org.springframework:spring-webmvc
* Updated samples
* Erlang server overhaul (#19465)
* Upgrade erlang-server code generation and fix is_authorized crashes
* Introduce structured logging
* Improve general formatting
* Update generated files
* Enable erlang server on CI
* Add echo-server testing to CI
* Require OTP27 explicitly in the generated rebar.config file
* Rework handler and API
With this work, json validation becomes optional, fully implemented in
the `_api` module as it was before, but without being forcibly called by
the `_handler`. It is instead left as optional for the user to take
advantage of the exposed callbacks. Jesse also chooses draft-06 as a
default, but these can be chosen manually by the user too, as long as
jesse implements them.
`_handler` also becomes lighter, it now handles all mime types
transparently by forwarding to a user-given module that must implement
`accept_callback/4` and `provide_callback/4` as described in the
`_logic_handler` callbacks. These will simply be the return values of
cowboy_rest's `content_types_accepted` and `content_types_provided`
respectively, and should simply comply with their defined APIs. They
only get two parameters extending the behaviour, so that the user-given
callback can pattern-match on them: the path prefix of the logic
handler, and the operationID of the call.
* Fix return types for provide_callbacks
* Upgrade jesse to incur no dependencies
The less dependencies the built code requires the better.
* Fix dialyzer errors in the generated code
* Apply stronger dialyzer checks
* add erlang-server-deprecated for fallback after refactoring (#19547)
* fix kotlin spring boot configuration conflict (#19515)
* fix(python,asyncio): multipart form data serialization (#19302)
* fix: object serialization for multipart requests
This PR is essentially
<https://github.com/OpenAPITools/openapi-generator/pull/18140> but for
the asyncio client.
* fix: int serialization for multipart requests
urllib3 handles serializing ints in post params (ref 1), while asyncio
explicitly does not (ref 2).
ref 1: <https://github.com/urllib3/urllib3/blob/9316764e90aea8d193cd8f03b0caccdf02af3ba0/src/urllib3/filepost.py#L75-L76>
ref 2: <https://github.com/aio-libs/aiohttp/issues/920>
* test: new fake multipart endpoint with files and body
* test: regression test for stringified body params
* fix: mypy tweak
* fix: FILES regeneration
* feat: object, int serialization for multipart reqs
Extends previous commits (and #18140) to cover the python-pydantic-v1
client as well.
* fix: use async with in test
* test: regression test for pydantic-v1-aiohttp
* test: add regression test to pydantic-v1
Also brings the second test in line with the first, patching
`urllib3.PoolManager.urlopen`
* Regenerate php-nextgen-sample (#19556)
* Regenerate php-nextgen-sample
* Add missing changes
* [swift5] Fix Xcode 16 compilation crash with Extensions.swift generation (#19564)
* Update Extensions template for Swift5 generation
* update samples
* [typescript-axios] fix: enum datatype jsdoc (#19570) (#19571)
* fix: enum dataType JSDoc
* chore: generate samples
* Erlang Server – cowboy return types improvements (#19561)
* Declare the correct types for cowboy rest requests
* Adding myself to the erlang team
* docs: add hint about how to attach VSCode to the suspended Java process (#19551)
* [avro-schema] fix enum logic (sanitize) (#19549)
* python-pydantic-v1: Return the primitive type in to_dict for anyOf models (#19488)
* python: Return the primitive type in to_dict for anyOf models
* Regenerate samples
* Update test
* [BUGFIX][dart-dio] Align `enum` and `enum_inline` generation result (#19510)
* [BUGFIX][dart-dio] Align `enum` and `enum_inline` generation result
* review fixes
* Revert "review fixes"
This reverts commit 9d0b263f5cffdc5c2856bb2ec45f6f0a263f4ee4.
---------
Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
* [BUGFIX][dart-dio] add unknownEnumValue to JsonKey (#19416)
* [BUGFIX][dart-dio] add unknownEnumValue to JsonKey
* review fix
---------
Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
* [Go] Verify content of Go server generated files (samples) (#19504)
* Add Python tests to verify generates Go files
* Run Python tests during CI
* Remove Python tests
* Add Go tests
* Update workflow to run Go tests
* [GO] Go Server: preserve order of the routes as defined in the OpenAPI file (#19550)
* Add skipSortingOperations configuration option
* Skip sorting operations for go-server
* Add test verifyOrder
* Regenerate samples
* Correct package name in test (#19581)
* [Java Jersey] Update ApiClient.mustache Jersey doesn't allow entities in method DELETE (#19530)
* Update ApiClient.mustache
* Update ApiClient.mustache
Jersey doesn't allow request entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* jersey ApiClient.mustache invoke DELETE without entity if empty
* jersey ApiClient.mustache invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* [PHP] Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions (#19555)
* Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions
* Update php model tests
* [php-symfony] Fix #19562 (#19568)
* [Kotlin] Add a new additional property to configure Jackson's `failOnUnknownProperties` (#19506)
* [Kotlin] Add a new additional property to configure Jackson's `failOnUnknownProperties`
Default to false
* [Kotlin] Unconditionally import `com.fasterxml.jackson.databind.DeserializationFeature`
* [Kotlin] Refactor and add test
* [PHP] Update enum tests (#19591)
* [kotlin-client][multiplatform] add support for kotlinx.datetime.LocalTime (#19590)
* Fix dictionary/map deserialization (#19496)
* Bump actions/setup-go from 3 to 5 (#19597)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v5)
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [Java] [apache-httpclient] Fix issue with toString causing wrong value with collections (#19576)
* Fix issue with toString causing wrong value with collections
With collections, calling toString will result in the value becoming [a,b] instead of just a,b.
Using the existing apiClient::parameterToString method ensures it gets parsed correctly if it is a collection
* Updated samples
---------
Co-authored-by: Rasmus Zweidorff Iversen <rzi@jysk.com>
* [typescript] fixture: broken `Array<Array>` (#19548)
* [typescript] fixture: broken `Array<Array>`
* Delete samples/client/others/typescript/builds/array-of-lists/models/L.ts
* fix: remove incorrect mapping
* chore: update generated code samples
* [Rust Server] Convert Rust comment to Mustache (#19595)
* [Rust Server] Convert Rust comment to Mustache
The comment about auth types supported by the generator shouldn't be
included in the generated code as it's confusing when the API doesn't
support the same auth types.
As such, we convert it from a Rust comment to a Mustache comment
* Update samples
* [Rust Server] Add derive of Hash to enums (#19603)
* [Rust Server] Add derive of Hash to enums
* Update samples
* [Rust Server] Handle additional properties being nullable (#19594)
With:
```
sampleObject:
type: object
additionalProperties:
$ref: '#/components/schemas/SampleData'
minProperties: 1
description: Map of Charging data policy decisions.
```
and
```
SampleData:
type: object
...
nullable: true
```
We currently generate: HashMap<String, SampleData>, which doesn't allow
null charging data entries. This MR changes this to be
`HashMap<String, swagger::Nullable<SampleData>>`, which thus will allow null data entries.
We do this by moving null-handling to the Java code - primarily `getTypeDeclaration()`.
Note, to some extent this is wrong. In this MR (and previously) we are treating
`nullable: true` as an extrinsic property (like required), whereas it should be an
intrinsic property (and thus `HashMap<String, SampleData>` is correct, but `SampleData`
absorbs the nullability.
This would be possible with this code:
```
enum ChargingData = {
Null,
Present {
...
}
}
```
Which would remove the usage of https://docs.rs/swagger/2.0.2/swagger/nullable_format/enum.Nullable.html.
I haven't resolved this - and have instead done a more targeted fix.
This, along with some other crude code, creates a scenario where we need to
unpick whether something is null. I've left that, though flagged a TODO to tidy it up at some point.
* fix: make generated java readme use correct package (#19563)
* update java samples
* python: test with more modern versions (#19452)
Python 3.12 has been released in October 2023, it should be tested in
the CI.
Python 3.7 is not maintained anymore, removing it from the minimum
required version in `pyproject.toml` files.
* Improve urllib3 semver flexibility (#19458)
* chore: pull request template mentions an old current version (#19609)
Replaces `7.6.0` with `7.x.0`
* feat(avro-schema): logical type support (#19607)
* feat(avro-schema): logical type support
* style: newline at eof
* [kotlin-spring] fix springdoc dependencies (#19579)
* fix springdoc dependencies for kotlin-spring
* fix suffix core to api.
* update org.springdoc:springdoc-openapi-webmvc-api, ui to 2.6.0 (#19620)
* update springdoc-openapi-starter to 2.6.0
* pre-populate info if its not defined
* update kotlins spring dependencies to newer version
* [aspnetcore] Fix issue #19592 regarding swagger xml comments (#19593)
* Use multiline comments for examples in csharp generator (#19079)
* multi
* gen
* Uncomment File::deleteOnExit (#19624)
* [Core/Rust Server] Check references in additionalProperties correctly when checking freeForm status (#19605)
* Check references in additionalProperties correctly
Handle references in additionalProperties correctly when determining free-form status
* Update samples
* [Rust Server] Handle arrays in forms (#19625)
* [Rust Server] Handle arrays in forms correctly
* [Rust Server] Add tests
* Update samples
* update aspnetcore samples
* Make it easier to specify triggers for Zapier (#19645)
* chore: add triggers
* update samples
---------
Co-authored-by: Stephen (Alex) Wallen <wallenstephen@outlook.com>
* use debug instead of warn,error to show less log (#19646)
* [PHP] Add missing qualifier for enum parameters (#19567)
* [cpp-qt-client] New `makeOperationsVirtual` option (#19613)
* Implementation of new `makeOperationsVirtual` option
* Make new parameter `true` by default
* Fix default value set and regenerate samples
* rust: Implement `Display` instead of `ToString` for enums (#19611)
Rust docs for `ToString` explicitly recommend implementing `Display`:
> This trait is automatically implemented for any type which implements the Display trait. As such, ToString shouldn’t be implemented directly: Display should be implemented instead, and you get the ToString implementation for free.
See: https://doc.rust-lang.org/std/string/trait.ToString.html
See: https://github.com/Nitrokey/nethsm-sdk-rs/pull/33
Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
* Updated pyyaml and httptools in requirements template (#19666)
Co-authored-by: Louis Sullivan <Louis.Sullivan1@ibm.com>
* [typescript] fix: `nullable` enums should not serialize a `null` value to a string (#19540)
* fix: `nullable` enums should not serialize a `null` value to a string
* better solution?
* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
Co-authored-by: Joscha Feth <joscha@feth.com>
* chore: Update circle_parallel.sh
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Add swift6 generator (#19621)
* [Swift6] create Swift6 generator
* [Swift6] create Swift6 generator
* Update vapor integration
* Update bitrise stack to Xcode 16
* [Swift6] tryped throws
* [Swift6] tryped throws
* [Swift6] combine deferred and api static method
* [Swift6] update readme
* [Swift6] fix some errors
* [Swift6] fix some errors
* [Swift6] fix some errors
* [Swift6] update docs
* [Swift6] update docs
* Use multiline comments for examples in csharp generator (#19079)
* multi
* gen
* Uncomment File::deleteOnExit (#19624)
* [Core/Rust Server] Check references in additionalProperties correctly when checking freeForm status (#19605)
* Check references in additionalProperties correctly
Handle references in additionalProperties correctly when determining free-form status
* Update samples
* [Rust Server] Handle arrays in forms (#19625)
* [Rust Server] Handle arrays in forms correctly
* [Rust Server] Add tests
* Update samples
* [Swift6] fix CI
* [Swift6] fix CI
* [Swift6] fix CI
* [Swift6] fix CI
---------
Co-authored-by: Liri S <reallyliri@gmail.com>
Co-authored-by: Beppe Catanese <1771700+gcatanese@users.noreply.github.com>
Co-authored-by: Richard Whitehouse <git@richardwhiuk.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* update spring web in resttemplate to 6.1.13 (#19671)
* [typescript][typescript-node] Serialize/deserialize maps and nullable types correctly (#19362)
* Remove deprecated suppressImplicitAnyIndexErrors property from templates
* Add encoding / decoding tests for the typescript generator
* Add encoding / decoding tests for the typescript-node generator
* [Typescript][Typescript Node] fix deserializing complex types
This fixes deserializing of models that are composed with null,
undefined, or are inside of a map.
* Use more sensible `startsWith` implementation
* Remove use of magic number offsets
* Fix endsWith bounds checking
* Regenerate samples
* [R] Update R6 object documentation (#19679)
* Remove @export and titles from R6 methods
* Remove redundant methods docs from R api.mustache
* Build project
* style(typescript): add missing semi (#19689)
* [Javascript] Add initialization of default vars to constructor (#19692)
* Add initialization of default vars to constructor
* Update samples
* [swift] small improvements (#19675)
* [swift] small improments
* [swift] small improments
* [swift] small improments
* [swift] make CI pass
* [swift] make CI pass
* [swift] make CI pass
* [swift] make CI pass
* [swift] make CI pass
* [swift] make CI pass
* [swift] make CI pass
* feat(typescript): improve docs generation (#19699)
* feat(typescript): generate `.gitattributes` file (#19698)
* feat(typescript): generate `.gitattributes` file
* sample generation
* highlight the gitattributes mustache template
* highlight the gitattributes mustache template
* Revert "highlight the gitattributes mustache template"
This reverts commit 95119979833c2835f004db27805506b76785385a.
* highlight the gitattributes mustache template
* Revert "highlight the gitattributes mustache template"
This reverts commit 0f67ec2e4fec30fad209fae20ace97ea7f9d4eea.
* Revert "highlight the gitattributes mustache template"
This reverts commit 1f68b42368c959bc63dff76db791e4149280283a.
* style(typescript): use `Headers` type (#19697)
* bugfix: openapi code generator to consider schema changes (#16735)
* bugfix: added schema location property
* fix: #16723 open api schema refresh issue
* Update modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt
Co-authored-by: David Morris <dave@code-fish.co.uk>
---------
Co-authored-by: dsridhar <deepika.sridharr@aexp.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: David Morris <dave@code-fish.co.uk>
* feat(typescript): write `minimum`, `maxmimum` and `default` to JSDoc (#19707)
* feat(typescript): write `minimum`, `maxmimum` and `default` to JSDoc
* feat(typescript): express optional params in JSDoc
* chore: update github workflow checkput plugin references (#19676)
* [csharp][generichost] Fix invalid key name (#19633)
* fix invalid key name
* fix comment
* [csharp][generichost] Fix local var (#19642)
* fix local var
* revert one unneeded breaking change
* revert one unneeded breaking change
* Update README.md with new release date of 7.9.0
* fix(core): nullable `array` types in `3.1.x` specs (#19687)
* fix: nullable array types in 3.1.x
* fix: pass on on `getNullable` value
* chore: add generated marker
* chore: add generated marker
* Delete out
* test(OpenAPINormalizer): nullability normalization for 3.1 specs (#19714)
* test(OpenAPINormalizer): nullability normalization for 3.1 specs
* chore: samples
* [BUG] Kotlin wiremock query params are incorrect (#19720)
* [kotlin] enforce fields in data classes (#19526)
Fix #14710
* fix(typescript): export types (#19725)
* Fix export type for typescript interfaces in all platforms (#6805)
* Generated samples and docs
* chore: update samples
---------
Co-authored-by: Kevin Broja <kevin.broja@gus-group.com>
* zapier: create a search action predicate (#19670)
* feat: implement createAction predicate rather than negating isSearchAction predicate
* chore: update samples
* Fix #19683 : Generated code fails to build with x86_64-linux-gnu-g++-13 (#19684)
* Add C++ header for cpp-pistache-server to fix breaking CMake build of generated code.
* Sort includes of system C++ headers for cpp-pistache-server.
* Add samples generated from fixing bug #19683.
* Erlang server (#19722)
* Add documentation to server and handlers
* Respond to at least one path-server
* Let url servers override base path
* Handle reading bigger bodies in cowboy
* Improve json error handling
* Regenerate erlang-server handlers
* Rework API module for performance and completion
* Regenerate erlang-server handlers
* [rust][client][auth] token source option (#19647)
* feat: add token source support for rust async client
* chore: fix + regen samples
* chore: doc gen
* chore: missing generated sample files
* update undertown to 2.3.17.FINAL (#19734)
* [Java][microprofile] enumUnknownDefaultCase true now returns correctly in fromValue (#19677)
* [typescript-fetch] support "x-enum-descriptions" (#19559)
refs OpenAPITools#1693
* [OpenAPI 3.1] Avoid NPE when handling prefixItems (#19735)
* avoid npe when handling prefixItems in 3.1 spec
* update samples
* [Ruby-client] Use secuirtyScheme Key for api_key (#19740)
* replace name by keyParamName in apiKey configuration
* update configuration generated in sample
* fix_ruby_documentation_apikey_name (#19742)
* feat(core): add `info.summary` to `additionalProperties` for `3.1` specs (#19723)
* add joscha to TS technical committee (#19745)
* add oneOf-default-case option for swift5 (#19094)
Co-authored-by: erokha <dev@erokha.com>
* [swift5] rename unknownDefault to unknownDefaultOpenApi to match the enums unknown case (#19753)
* [Typescript-Node] Mark deprecated model attributes (#19756)
* Add @deprecated tag for deprecated fields
* Add tests
* Generate samples from OpenAPI 3.0 file
* Revert to generate with previous OpenAPI 2.0 file
* Add new config 3.0 and generate samples
* Regenerate samples
* [zapier] add response middleware (#19760)
* feat: add zapier response middleware
* chore: add samples
* [swift6] oneOf-default-case (#19754)
* [Swift6] better configuration (#19732)
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* [swift6] general improvements
* Fix anyOf/oneOf normalization for 3.1 spec (#19758)
* fix anyOf/oneOf normalization for 3.1 spec
* update samples
* fix(core): relative path sorting (#19726)
* Harmonize python client dependency versions (#19694)
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
* Erlang server validation bugfixes and capability extensions (#19750)
* Bugfix: exclusiveMinimum/Maximum must be booleans
* Add support for validating and decoding base64 byte strings
* Add support for validating RFC3339 datetime
* Simplify validate function for performance
* Regenerate erlang-server handlers
* [swift6] remove unused lenientTypeCast option
* Revert "[swift6] remove unused lenientTypeCast option"
This reverts commit 171b98e06ceda9881faf876da93a8803113da71a.
* [BUG] HandlebarsEngineAdapter.java failed to use custom FieldValueResolver causing IllegalAccessException for maps (#19634)
* Update HandlebarsEngineAdapter.java
The old MY_FIELD_VALUE_RESOLVER.INSTANCE is equivalent to FieldValueResolver.INSTANCE, which is assigned `new FieldValueResolver();` so our custom class was never used.
* Add test verifying partial template works; Extract accessAwareFieldValueResolver; Add test verifying priority fo values extracted from object
* [POWERSHELL] fix: keep array context when converting to json (#19535)
* Fix rust axum doc tests (#19538) (#19539)
* update rust axum samples
* [swift6] replace AnyCodable with JSONValue (#19763)
* [swift] remove unused lenientTypeCast option (#19764)
* [swift6] remove unused lenientTypeCast option
* [swift6] remove unused lenientTypeCast option
* [swift5] remove unused lenientTypeCast option
* Remove unnecessary files (#19769)
* [PHP-Client] Allow Content-Type merge-match+json for encoding (#19479)
* Allow Content-Type merge-match+json for encoding
* Changes JSON recognition to more flexible regex
* Removes now useless JSON format list
* Removes empty spaces
* Adds explanatory PHPDoc comment
* Moves Json-detection to class HeaderSelector
* [swift6] move infrastructure file inside infrastructure folder (#19765)
* [swift6] replace AnyCodable with JSONValue
* [swift6] create infrastructure folder
* [swift6] replace AnyCodable with JSONValue
* [swift6] create infrastructure folder
* [swift6] replace AnyCodable with JSONValue
* Try to fix CI
* update php samples
* [swift6] useSPMFileStructure by default (#19772)
* [swift6] useSPMFileStructure by default
* [swift6] useSPMFileStructure by default
* [swift6] useSPMFileStructure by default
* [Typescript-Node] Mark deprecated endpoints (#19770)
* Add @deprecated tag for deprecated operations
* Add test helper to verify a given line
* Add test to verify deprecated method
* Regenerate samples
* Delete tmp files after test
* Remove assertFileContains on specific line
* Update modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache
Co-authored-by: Joscha Feth <joscha@feth.com>
* Correct indentation
* Regenerate samples
---------
Co-authored-by: Joscha Feth <joscha@feth.com>
* [Python] Restore required dev dependency + Adjust generated Github workflow (#19773)
* Restore required python client dev dependency pytest-cov
* Harmonize python client workflow definitions
---------
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
* fix(avro-schema): fix NPE for `null` enum values (#19771)
* [swift6] make async await the default response library (#19776)
* [swift6] make async await the default response library
* [swift6] make async await the default response library
* [swift6] make async await the default response library
* [swift6] add samples that test upload files as data (#19780)
* [swift6] upload files as data
* [swift6] upload files as data
* [swift6] upload files as data
* [swift6] upload files as data
* [swift6] upload files as data
* [swift6] upload files as data
* [normalizer] bug fixes (isNullTypeSchema, handling of primitive types with oneOf) (#19781)
* better handling of primivitype type with oneOf
* fix null check, add tests
* add check for properties
* By default should use static configuration class instance, otherwise new instance is created every time (#19775)
* update php samples
* [R][client] Make enum parameters with `required: false` optional to request arguments (#19654)
* ODM-11697: Adding null check in R-api
* bin/generate-samples.sh executed
---------
Co-authored-by: Kunitsyn Oleg <114428801+genestack-okunitsyn@users.noreply.github.com>
* [Scala][Client]Add Http4s scala3 client codegen (#19658)
* fix attemp
* use java.time.Instant
* fix client gen
* Tweeks
* header and form
* use scala 3 enum
* more tweeks
* add additional properties; add auth
* add form media type
* add modelsOnly
* add unit tests
* add petstore samples
* add doc
* add new samle to .github/workflows/samples-scala.yaml
* update build.sbt template
* simply the baseclient
* add None to optional field
* tweek auth model and format
---------
Co-authored-by: Jenny Leahy <jennyleahy@JENNYLEAHY.localdomain>
* update doc
* minor improvemetns to new scala client generator (#19786)
* feat(avro)/refactor(core): unify `*_POST_PROCESS_FILE` behaviour and reuse code (#19761)
* feat(avro)/refactor: unify `*_POST_PROCESS_FILE` bahviour and code
* refactor: use existing function
* test: add simple test for post processor execution
* test: restrict concurrency to 1
* docs: add explanation to method
* fix(core): single value enums (`const`) are not generated correctly in `3.1` specs (#19696)
* fix(core): single value enums (`const`) are not generated correctly in `3.1` specs
* fix: const enums
* chore: update samples
* chore: update samples
* update samples
* support formatting date only (#19785)
* [csharp] Output DateOnly paramater in the correct default format (#19728) (#19729)
* Output DateOnly in the correct default format
* Only add conditional if we are net60 or later
* Update samples
* Make DateOnly nullable in the csharp client codegen (#19333)
* [windows] Fixed missing output (#19715)
* fixed missing output
* bug fix
* add new sample
* build samples again
* delete sample
* move the sample and add to github workflow
* remove model not needed for this test
* handle specs with no models
* update samples
* Implemented missing definitions of declared methods inside modelbase-header.mustache, added two missing body of methods definitions (#19569)
* Fix #19566 implemented the missing definition of declared methods inside openapi-generator/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache, have also be added two missing body of methods definitions
* Regenerated cpp-restsdk client samples
* Fixed shared_ptr creation
* [Erlang Server] Add more type information and fix minor bugs (#19792)
* Add type information about classes and operation-ids
* Remove unused logger included header
* Bugfix badmatch in delete_resource handler
* Bugfix: respect original indentation of operation_ids
* Bugfix json schema correct refs
* Add a bit more documentation
* Regenerate erlang-server handlers
* [swift6] alamofire interceptor (#19796)
* [swift6] alamofire interceptor
* [swift6] alamofire interceptor
* in case of defined status codes > 299 switch will have no effect. issue 7788 (#19483)
* in case of defined status codes > 299 switch will have no effect. As described in issue 7788
so we get only an error if statusCode is not defined AND not between 200 and 299
https://github.com/OpenAPITools/openapi-generator/issues/7788
* in case of defined status codes > 299 switch will have no effect. As described in issue 7788
so we get only an error if statusCode is not defined AND not between 200 and 299
https://github.com/OpenAPITools/openapi-generator/issues/7788
* Update PHP samples
* [swift6] urlsession interceptor (#19797)
* [swift6] alamofire interceptor
* [swift6] alamofire interceptor
* [swift6] urlsession interceptor
* [swift6] urlsession interceptor
* [swift6] urlsession interceptor
* [Kotlin] Allow other content-types when only interested in status-code / Unit (#19801)
* Allow Unit response
* Updating samples
* Improve comment for Unit shortcut
* [Python][Client] Allow all content-types with `text/` prefix (#19802)
* ODM-12108: allow all content-types with text/ prefix
* ODM-12108: Update deserialization tests
---------
Co-authored-by: Oleg Kunitsyn <you@example.com>
* Bump s4u/setup-maven-action from 1.14.0 to 1.15.0 (#19807)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.14.0...v1.15.0)
---
updated-dependencies:
- dependency-name: s4u/setup-maven-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix java rest client's ApiClient constructors to make sure objectMapper parameter is used in the client (#19667) (#19795)
* prepare 7.9.0 release (#19808)
* Remove Develocity maven extension
Upstream 7.9 enables a remote build cache pointed at ge.openapi-generator.tech.
It hard-fails the build when unreachable/unauthenticated and pulls third-party
build artifacts into our image. We do not use Develocity.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Keep AxiosRequestConfig in the Factory signature
Upstream 7.8 switched this signature to RawAxiosRequestConfig, but our
api.mustache import block still imports AxiosRequestConfig, so the generated
client referenced an undeclared type and did not compile.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
Co-authored-by: devhl-labs <shawnkanyer@gmail.com>
Co-authored-by: VelorumS <velorums@gmail.com>
Co-authored-by: Jérôme Prinet <jprinet@gradle.com>
Co-authored-by: condorcorde <49915099+condorcorde@users.noreply.github.com>
Co-authored-by: Adam Helbling <1884494+PeregrineFalcon@users.noreply.github.com>
Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Stephen Zapp <62268791+sazapp-spectra@users.noreply.github.com>
Co-authored-by: Emilien Escalle <neilime@users.noreply.github.com>
Co-authored-by: Dieter Eickstaedt <eickstaedt@deicon.de>
Co-authored-by: Ivan Vasheka <87310984+ivanvasheka-intellias@users.noreply.github.com>
Co-authored-by: Tanmay Mohapatra <tanmaykm@gmail.com>
Co-authored-by: keenangraham <keenangraham@gmail.com>
Co-authored-by: Daniel Seiler <daniel.seiler@prodyna.com>
Co-authored-by: Filipe Silva <4389874+filipe-silva@users.noreply.github.com>
Co-authored-by: Tim Quinn <tim.quinn@oracle.com>
Co-authored-by: Jazzco <30497975+Jazzco@users.noreply.github.com>
Co-authored-by: congyuluo <78986434+congyuluo@users.noreply.github.com>
Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com>
Co-authored-by: Lajos Szoke <63732287+laliconfigcat@users.noreply.github.com>
Co-authored-by: Şerban Ghiţă <serbanghita@gmail.com>
Co-authored-by: Serban Ghita <serban.ghita@virta.global>
Co-authored-by: Pavel Miller <167202565+0x0-pavel-0x0@users.noreply.github.com>
Co-authored-by: Stefan Koppier <stefan.koppier@outlook.com>
Co-authored-by: Richard Whitehouse <git@richardwhiuk.com>
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
Co-authored-by: Franck Arnulfo <franck.arnulfo@gmail.com>
Co-authored-by: Gergely Imreh <imrehg@gmail.com>
Co-authored-by: GeorgeFkd <69716466+GeorgeFkd@users.noreply.github.com>
Co-authored-by: Brenton Bostick <brenton@pieces.app>
Co-authored-by: Sylvain Joubert <joubert.sy@gmail.com>
Co-authored-by: Jason Boileau <jason@boileau.dk>
Co-authored-by: Jason Boileau <spraot@users.noreply.github.com>
Co-authored-by: Fei Wang <cn.feiwang@gmail.com>
Co-authored-by: llendi <89970901+llendi@users.noreply.github.com>
Co-authored-by: Aleksander Baranowski <aleksander.baranowski@yahoo.pl>
Co-authored-by: Richard Whitehouse <richard.whitehouse@metaswitch.com>
Co-authored-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
Co-authored-by: Krishna Rajendran <krishna@emptybox.org>
Co-authored-by: Kensuke Taguchi <tunc.adfuisses.53@gmail.com>
Co-authored-by: Rob Day <Robert.Day@metaswitch.com>
Co-authored-by: Erik VanderWerf <eski787@gmail.com>
Co-authored-by: Rory Schadler <48921090+roryschadler@users.noreply.github.com>
Co-authored-by: julianladisch <julianladisch@users.noreply.github.com>
Co-authored-by: mohamuni <167277545+mohamuni@users.noreply.github.com>
Co-authored-by: Martin Boos <mboos@outlook.com>
Co-authored-by: Victor Mosin <vicmosin@users.noreply.github.com>
Co-authored-by: ふぁ <34892635+fa0311@users.noreply.github.com>
Co-authored-by: aakash-dev-maersk <167172904+aakash-dev-maersk@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Schwarz <70815012+matthiasschwarz@users.noreply.github.com>
Co-authored-by: JP Moresmau <jp@moresmau.fr>
Co-authored-by: Anderson de Borba <ande.brb@gmail.com>
Co-authored-by: Joscha Feth <joscha@feth.com>
Co-authored-by: Eric <fistons@users.noreply.github.com>
Co-authored-by: ksvirkou-hubspot <ksvirkou@hubspot.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
Co-authored-by: Beppe Catanese <1771700+gcatanese@users.noreply.github.com>
Co-authored-by: Chris McEvoy <12284065+chrisimcevoy@users.noreply.github.com>
Co-authored-by: Sobhan Sharifi <sobhan.sharifi.sadeghi@gmail.com>
Co-authored-by: jpfinne <jeanpaul@finne.be>
Co-authored-by: Davide Diaconu <davidediak@gmail.com>
Co-authored-by: Matteo Molinari <matteomolinari93@gmail.com>
Co-authored-by: Dan Goslen <dwgoslen@gmail.com>
Co-authored-by: Horace Li <horaceli@gmail.com>
Co-authored-by: Rugal Bernstein <Rugal@users.noreply.github.com>
Co-authored-by: Nicklas Wiegandt <Nicklas2751@users.noreply.github.com>
Co-authored-by: Tero Hagström <tero.hagstrom@sugarmine.com>
Co-authored-by: David Omid <davidomid@github.com>
Co-authored-by: Kresten P. Vester <73832711+kpvester@users.noreply.github.com>
Co-authored-by: Nelson Vides <videsnelson@gmail.com>
Co-authored-by: Evgeny Shichenko <evgeny.shichenko@gmail.com>
Co-authored-by: Julian Vennen <julian@vennen.me>
Co-authored-by: Lili Shi <lilidotshi@gmail.com>
Co-authored-by…
Fixes #19708
Fixes #19626
Some files were being written using the same path but different case. On Windows, this results in only one file being written. This fixes that and also fixes a bug exposed by the fix where the operation id is not always unique.
PR checklist
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.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)