* fix spring multipart optional parameters
* use optional only in not required params
* remove debug line
---------
Co-authored-by: Jaime Sanchez <jaime.sanchezf@externos.santalucia.es>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [cpprestsdk] Support passing enum request parameters
* Add a fake endpoint to test enum request parameters
* Add auto-generated sample codes
* Update to date with master branch
---------
Co-authored-by: leslizhang <453688819@qq.com>
* respect useJakartaEE in jersey3
* useJakarteEE=true in jersey3 samples
* don't force jakarta package for jersey3
* adjust whitespace between jersey2 and jersey3
* enforce useJakartaEe for jersey3, warn on misuse for jersey 2
* set useJakartaEe for jersey3, generate samples
* Align indentation
* Add equals and hashcode to singleRequestParameter static class
* Add missing sample updates that were affected by new imports
* add restclient sample
* update FILES, chmod=+x
* Update samples with jakarta annotations
* Updates samples
---------
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
* Fix for allof multi model with only metadata fields
* Update samples
* fixed compiler errors in java 17 and lower
* refactored isMetadataOnlySchema to ModelUtils.java
* Fixes so that a oneOf schema with a single sub-schema is simplified when SIMPLIFY_ONEOF_ANYOF is set to true
* Adjusts oneOf_array test to ensure that it is generated as an interface instead of being simplified
* Update ruby samples so that they no longer refer to a model that is now gone due to the schema being simplified
* fix(rust): Fixed Rust model files not matching module imports causing compiler errors
* chore(rust): Update samples with a duplicate model test
* update samples
---------
Co-authored-by: Ross Sullivan <rosssullivan101@gmail.com>
* fix: Support PathParams not of primitive types for Go in generated tests
Signed-off-by: Paul Horton <phorton@sonatype.com>
* use tabs consistently
---------
Signed-off-by: Paul Horton <phorton@sonatype.com>
* Add useResponseAsReturnType option to kotlin, jvm-retrofit2 and coroutines api template (#15491)
* Add useResponseAsReturnType flag to kotlin-jvm-retrofit2-coroutines.yaml sample
* Generate sample
* fix(typescript-angular): enable "exactOptionalPropertyTypes" and ensure assignments align with type definition
* fix(typescript-angular): update condition checks to explicitly compare with undefined
* chore(gradle): add autogenerated properties file for OpenAPI Generator
* [BUG][kotlin-spring] Fix defaultValue for RequestHeader is not generated (#20504)
* revert apiDelegate changes
* fix: fix unresolved reference for enum type
* check if enum_values are existing
If no enum_values are given for in a serverUrl, the check must be ignored.
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
The gradle.properties.mustache template was empty. Removing this override allow to specify gradleProperties while using native library
Co-authored-by: Ronan Pozzi <ronan-pozzi@asys.fr>
* fix/ x-enum-varnames in python
* make x-enum-varnames examples more clear
* make x enum varname usage more explicit
* fix tests
* trigger tests
* trigger tests once again...
* fix more tests
* [PHP] - Add FormDataProcessor to handle nested ModelInterface data
* Generating samples
* Updates php-nextgen and psr-18
* Adds tests
* Some more tests
* One last test
* Updating files
* Fixing diff
* Test fix
* Updating samples
* [swift6][client] All models conform to Codable so this method should not be needed anymore
* [swift6][client] All models conform to Codable so this method should not be needed anymore
* feat: add test-array endpoint and TestArrayResponse schema to oneOf.yaml
* feat: enhance oneOf handling in TypeScript code generators with string and array support
* fix: correct type checks for string and object arrays in modelOneOf.mustache
* refactor: remove oneOfStringEnums handling and simplify oneOf logic in TypeScript code generators
* chore: update samples
* refactor: remove unnecessary string oneOf checks in TypeScriptFetchClientCodegen
* Make the OpenAPINormalizer configurable
Add comment to force rebuild
* Add documentation of NORMALIZER_CLASS
* Use default normalizeSchema() method and add a new skipNormalization method
* super.normalizedSchema() can proceed
* [julia] better serverside validation code
Updating the code generated for julia server to add more checks in the validation stage of incoming requests. Particularly adds checks for request body and required parameters. Updates the generated models with some helper methods that are used in validation filter.
* bump OpenAPI.jl version to use for CI
* Added HttpClient5 flavour to Java OpenFeign client generator.
* Converted templates intendation to spaces.
* Added the new sample folder to GH wf so that the CI can test the change.
* Added the missing auto-generated docs/samples files.
* Converted indentation to spaces also in the modified Java class.
* [PHP] - Add range HTTP code support
* Adding response body to 200
* Fix diff; update php-nextgen sample
* Working on unit tests
* Removes dangling files
* Finalize tests
* Remove dangling files
* Add tests for no response body exception
* fix(crystal): fix typos in Crystal templates
* fix(crystal): various fixes for partial_oneof_module.mustache Crystal template
1. `class << self` doesn't exist in Crystal, you must prefix class methods with `self.`
2. use double quotes for String litterals (simple quotes are for Char litterals)
3. global `private` keyword doesn't exist in Crystal, you must prefix private methods with `private`
4. you must specify types when using `each_with_object({})`
* fix(crystal): add isKeyInCookie in Crystal configuration.mustache
* fix(crystal): wrap `rescue` in a `begin`
* fix(crystal): use Spectator shard to run tests (`described_class` is not available in Crystal std lib)
* fix(crystal): dry tests
* fix(crystal): enable some API tests, mark others as pending
* fix(crystal): update samples
* fix(crystal): update sample app specs
* fix(crystal): install development dependencies
* [julia] fix regex escape on server codegen
Fixed escaping of regex patterns on julialang server codegen.
* add comment for the escapeRegex method
* simplify
* Keep static middleware when options contain no middleware field
* Regenerate samples
* Fix indentation and quotes
* Extract middleware merge logic into function
* Regenerate samples
* Simplify extracted functions
* Regenerate samples
* Fix: Pass static config when no options are given for inversify
* Fix: Allow overriding http api with options
* Regenerate samples
* Use default parameter for default middlware merge strategy
* Throw exception for failed match within switch block
* formParams.mustache should contain @FormParam, not @QueryParam (#20991)
* updated samples; form parameters are declared using @FormParam, not @QueryParam (#20991)
* Fix for problems when a nullable parameter has a default value
When a default value is present the parameter is moved to non-nullable. This works because we could replace the null with a default value. This will actually set the default value.
* Adds (optional) validation to the beans.
Option to set: `useBeanValidation` to `true`. This will insert validation rules from the `jakarta.validation` package much like it does with the spring generator.
Aso sneaked in `JsonProperty` annotations in order to more formally adhere to the name in the spec as opposed to configuring ObjectMappers in order to translate names to match the spec.
* Update samples
* Fix for required headerParams
* issue-20804: Add nullability annotations to Java generated clients
Motivation:
Be able to use generated clients in code checked by tools like NullAway.
* issue-20804: Add nullability annotations to Java generated clients
Motivation:
Be able to use generated clients in code checked by tools like NullAway.
* issue-20804: Add nullability annotations to Java generated clients
Motivation:
Be able to use generated clients in code checked by tools like NullAway.
The openapi 2.0 spec did not support bearer authentication but it was
added in openapi 3.0. In order to support client generation that
includes support for bearerAuth, this change adds a new feature to the
OpenapiNormalizer so that it can be configured to look for a specific
securityDefinition name and convert it to bearerAuth.
* [kotlin-spring] Generate @Valid annotation on all RequestParts/Params for Multipart requests when useBeanValidation=true
* [kotlin-spring] Fix failing test
The test was failing because of the newly added @Valid and an assert which is not correct anymore.
* Drop support for python 3.8 and add support for 3.13 in python generator templates
* Update docs
* Test samples without python 3.8 and with 3.13
* Generate samples
* Wrap Complex Type
* update
* Add java doc and update test
* change default wrapComplexType to true
* add protobuf-schema-config-complex to CI
* add service proto to address CI failure
* Output of CLI commands per PR comments
* Rebuilding PHP examples, PSR-18
* Rebuilding PHP examples
* Adds explanation for ::flatten_array(); optimized array_is_list pollyfill
* [PHP] Fix converting objects to formdata
* flatten_array -> flattenArray to match code style
* Adds unit test
* Revert "Output of CLI commands per PR comments"
This reverts commit 2eaa93731c354c9cb64a41187ba25a1b271cfdea.
* Includes php-nextgen; tightens up ::toFormValue()
* Missing ArrayAccess import
* Adds test for refactored ObjectSerializer::toFormValue()
* [Swift][client] add identifier to each request
* [Swift][client] add identifier to each request
* [Swift][client] CI first build the projects then run the unit tests
* fix(openapi-generator): fixes GlobalSettings class to avoid ClassCastException when GlobalSettings#log is invoked
* fix(openapi-generator): sets GlobalSettings log level to debug
* Add Filter by tag and method under OpenAPINormalizer
* Update message for invalid filters
* Update customization documentation with new filters
* Add comment for new code block
* [java] generateClientAsBean for restclient and webclient
Added possibility to generate restclient and webclient as a @Component in the same fashion as resttemplate.
Fix#17885Fix#19229
* - Samples
Prior to this commit, a JS client generated with skipDefaultUserAgent
enabled results in a src/ApiClient.js file that doesn't define
this.defaultHeaders. This breaks because this.defaultHeaders is later
directly passed to a superagent request which expects an object and not
undefined.
Fixes#20791.
* Cleanup the existing model template
* `{{^isContainer}}foobar{{/isContainer}}{{^isContainer}}` is equivalent to `{{^isContainer}}foobar`
* Add indentations to make it easier to read the template. The generated code is
uglier, but it is ok since users are encouraged to reformat anyway
* Add a default value for non-required lists
Closes https://github.com/OpenAPITools/openapi-generator/issues/20777
* protobuf enum prefix use upper underscore
Add json name parameters and change parameter field name to snake case
* rerun generate-samples.sh
* Add CI test
* rebase master
---------
Co-authored-by: xil <xil@uber.com>
* Add key to each model field
Add a `[@key "someField"]` annotation to each model field, to avoid mismatches when the JSON field is not in snake_case.
Closes https://github.com/OpenAPITools/openapi-generator/issues/20765
* update ocaml samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* added intellij-codestyle.xml and sample of it being applied to some java code-gen classes
* code-format changes ONLY
* few more format changes since last merge with master
* applied code-style to all java one last time
* Revert "v7.12.0 release"
This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.
* set version to v7.13.0-SNAPSHOT
* update samples
* update doc
* add call-time middleware
* update dependencies to run on current tsc
* exclude middleware from inversify
* update samples
* update service
* space
* inversify exclude
* braces
* import in objectparamapi
* add integration test for middleware
* switch to configuration options merge
* enable options on non inversify builds
* remove unused middlware export
* remove merge strategy from inversify
* gen samples
* remove old middlware imports
* tab to space
* separate promise and observable options
* gen samples
* use allmiddleware var across inversify
* generate encode samples again
* add middleware call-order tests for default typescript build
* type refactor
* add semicolons, default replace, let to const
---------
Co-authored-by: david <david@dmba.local>
* Add so that the singleRequestParameter can be constructed one parameter at a time
* Replace the lombok EqualsAndHashcode with a mustache implementation
* Remove equals and hashcode from oneRequestParameter model
* Remove the final keyword from variables in the oneRequestParameter class
* Regression test for enum Name generation in oneOf
where variants would end up having the same name.
* Fix enum variant name generation
Datatypes like `Vec<foo::bar::Baz>` would end up as `Baz` instead of `VecOfBaz`
* [csharp][generichost] fix SYSLIB1045 for ClientUtils
* make JsonRegex private
* on net7 and above use GeneratedRegex for JsonRegex
* remove unused SanitizeFilename-Method
* [csharp][generichost] regenerate samples
* Add `ca_cert_data` parameter to Python client.
This lets a client validate a server's CA certificate chain using a
variable/constant containing PEM (`str`) or DER (`bytes`) data, rather than
needing to reference a file on disk.
* python: Fix `ca_cert_data` on Python 3.8
* [typescript] Prevent generating invalid enum code due to empty variable names
After sanitizing all characters (e.g. multibyte characters), the enum variable name may become an empty string.
Since an empty string would cause a syntax error, this patch pads the pseudo variable name (`STRING`) to avoid that issue.
For example, given the following OpenAPI definition:
```yaml
openapi: "3.0.0"
info:
title: Sample project
version: '1.0'
description: 'Sample API Check "API Key" '
license:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0'
paths: {}
components:
schemas:
Greeting:
type: string
enum:
- 'こんにちは'
- '你好'
- '안녕하세요'
```
The current logic generates the following code for Greeting:
```typescript
export enum Greeting {
= 'こんにちは',
2 = '你好',
3 = '안녕하세요'
}
```
This code is invalid. With this patch, the generated code becomes:
```typescript
export enum Greeting {
STRING = 'こんにちは',
STRING2 = '你好',
STRING3 = '안녕하세요'
}
```
Signed-off-by: moznion <moznion@mail.moznion.net>
* Remove unnecessary imports
Signed-off-by: moznion <moznion@mail.moznion.net>
* Use new sanitizer for TypeScript symbol which takes wider variety characters for enum var name
Signed-off-by: moznion <moznion@mail.moznion.net>
---------
Signed-off-by: moznion <moznion@mail.moznion.net>
Update README to correctly show 8080 as the default port instead of 3000.
This matches the actual server configuration in config.js where the
server listens on port 8080 by default.
Update express-openapi-validator from v3 to v4 to support Node.js versions >14.
This includes:
- Upgrade express-openapi-validator dependency in package.json
- Modify server startup code to accommodate v4 API changes
- Update controller implementation to handle breaking changes
The changes ensure compatibility with modern Node.js versions while maintaining
the generator's functionality.
Remove axios from package.mustache as it's not used in the starter build.
This eliminates potential security vulnerabilities (ReDos & SSRF) from
the dependency tree without affecting functionality.
* made Configuration.defaultApiClient volatile so that if it's changed the new value is immediately visible to all other threads
* made no-arg api ctor use Configuration.getDefaultApiClient() instead of creating new ApiClient every time
* replaced all use of URLEncoder.encode with ApiClient.urlEncode; just code cleanup; no functional changes
* disabled AbstractJavaCodegenTest.testGeneratedExampleValues as it fails, possibly due to timezone (Locale.ROOT) of local system
* replaced thread-unsafe SimpleDateFormat with DateTimeFormatter and re-enabled unit-test
* removed unused import
* ran the generate-sample scripts and generated a HUGE number of changes!
* some code cleanup and adding booleans to processOpts to remove lots of duplicate FOO.equals(getLibrary()) checks; also using isLibrary() wherever possible
* added missing import of Configuration to api.mustache (and, thus, all native samples)
* added missing import for ApiClient to anyof and oneof model mustaches
* rolled back formatting of cliOptions block (too many changes for a simple PR)
* use toLowerCase with locale
* reverted supportedLibraries reordering and format changes to reduce diff noise
* updated comment
* rolled back Slf4j change due to failing arch-unit test; also rolled back serialization-lib setting code due to unit-test failure (still a mystery)
* moved lib* booleans AFTER super.processOpts() the library can be changed (as shown by unit-test)
Introduced a new property `inputSpecRootDirectorySkipMerge` to conditionally skip the merging step of the specification files. Updated the logic to honor this new property, ensuring merging only occurs if it is explicitly not skipped. Enabled configuration via Gradle build file.
* go-server: attempt to fix the controller-api mustache template for a nullable bodyParam
* added to petstore an example to trigger the issue which this PR fixes
* Implement a custom error handler for unhandled or generic endpoint errors
* Pass in method, host and cookies to error handler
* Update axum to 0.8
* Make API methods take references instead of ownership
* Rebase error handler
* Rebase with updated error handler
* Update deps
* Fix capture group syntax
* Rebase rust-axum-error-handling
* Update docs
* Multipart is also part of the axum update
* Update samples
* Update docs
* made Configuration.defaultApiClient volatile so that if it's changed the new value is immediately visible to all other threads
* made no-arg api ctor use Configuration.getDefaultApiClient() instead of creating new ApiClient every time
* replaced all use of URLEncoder.encode with ApiClient.urlEncode; just code cleanup; no functional changes
* disabled AbstractJavaCodegenTest.testGeneratedExampleValues as it fails, possibly due to timezone (Locale.ROOT) of local system
* replaced thread-unsafe SimpleDateFormat with DateTimeFormatter and re-enabled unit-test
* removed unused import
* ran the generate-sample scripts and generated a HUGE number of changes!
* added missing import of Configuration to api.mustache (and, thus, all native samples)
* added missing import for ApiClient to anyof and oneof model mustaches
* fix: Fix ruby client generator to generate setter methods with not null validation
Not null validation was missing for required and non-nullable properties when
no other validation was present.
* fix: Fix an issue where the initialize method did not accept attributes defined in its parent class
* remove legacy laravel generator
* initial setup of my vision for the laravel generator
* update the php laravel samples
* update php laravel docs
* moved api validation into controller and handle edge cases presented by sample generation
* updated samples
* added php-laravel to github workflow php8 and removed php7 workflow as it only contained old laravel
* preemptive work to support union types as soon as php serde supports them
* updated samples
* update templates in accordance to samples output
* fix pipelines and update samples
* correct serde version
* fixed phpunit execution and updated samples
* added named routes
* remove
* readd samples
---------
Co-authored-by: gijs.blanken@futureof.finance <gijs.blanken@finly.nl>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [rust] Added support for text/plain to reqwest-trait client
* Updated samples
* [rust] Added support for text/plain to reqwest client
* Updated samples
* cleanup
* reduced compiler warnings
* fixed text/plain content with charset
* Only deserialize text/plain if the API produces it
* [JavaSpring] attach sources when using maven and interfaceOnly=true
Closes#15659
* [kotlin-spring] attach sources when using maven and interfaceOnly=true
Closes#15659
* Bump axum and axum-extra to latest version.
- This bump requires fixing path parameters due to matchit transitive dependency
changes (See https://github.com/tokio-rs/axum/pull/2645).
- The `Host` extractor has been moved from `axum` to `axum-extra`.
- Axum now ships multipart extractor support, switch to that.
* Update rust-axum samples
This commit fixes compatibility problems between the generated dart-dio code, json_serializable 6.9.0+, and Dart SDK 3.5 or later.
Changes:
- Updated `pubspec.mustache`:
- Set the minimum SDK constraint for the generated package to `>=3.5.0 <4.0.0`, reflecting the language version used in the generated code.
- Bump `json_annotation` dependency to `^4.9.0`.
- Bump `json_serializable` dependency to `^6.9.0`.
These changes ensure that the generated code:
- Is compatible with `json_serializable` 6.9.0+ and Dart SDK 3.5+.
- Avoids Dart 3.5+ specific syntax that causes errors on older SDKs.
- Maintains existing functionality and type safety.
Resolves: #16117, #14863
* update jackson-threeten to 2.18.2
* update threeten versions in test templates
* update to jackson 2.18.2
* bump jacoco to improve compat with newer java versions
* Implement a custom error handler for unhandled or generic endpoint errors
* Pass in method, host and cookies to error handler
* Update axum to 0.8
* Make API methods take references instead of ownership
* Multipart is also part of the axum update
* Prevent replacing path names with the same name as a dynamic path parameter
* Use status code name instead of number
* Rollback axum update
* Forgot paths
The change in #20067 has caused some issues with clients which run in a
Browser. This commit replaces that change, leaving the default
User-Agent for axios unmodified, and only sets the User-Agent if the
`http-user-agent` parameter is provided during generation time.
- Fix enum default value generation. Default values were falling back to the default code generator and were being generated improperly for Julia.
- Add more validations to client and server API call handlers. These validations were already being generated for models, but were missed out for API calls.
* move validator import into GoClientCodegen
* add new example for oneof discriminator lookup
* regenerate samples
* add validator.v2 to go.mod if it is imported
* regenerate samples
* Fix enum discriminator default value
* Remove system out call
* Add case when discriminator type is ref
* Use correct schema
* Handle different use cases of mappings
* Add missing enum type Lizzy
* Make it more robust
* Add missing test for Sedan
* Refactor some code to make it cleaner
* Initialize discriminator enum field
* Don't override existing default value
* Fix issue with finding discriminators
* Move setIsEnum back to its original location
* Be smarter about figuring out the model name
* Fix final warnings
* Add javadocs to introduced methods
* modules/openapi-generator/src/main/resources/go-server: alternative initialization of variable, to avoid extra checks and custom code
* propagated changes to samples
* [C][Client] Generate CMakeLists.txt for all C sample clients
The sample client defined in bin/configs/c.yaml has CMakeLists.txt in
its .openapi-generator-ignore. It's is the only C client that doesn't
(re-)generate CMakeLists.txt, the remaining two seem fine regardless.
* [C][Client] Allow user-defined CMAKE_C_FLAGS
* [C][Client] Remove useless message() calls from CMakeLists.txt
find_package() prints success/failure messages, no need to do it twice.
* prevent all name clashes by using a prefix for all parameters, this way they CANNOT clash with anything locally, as our hardcoded stuff in mustache files doesnt start with "p_" ,
when using the grouped option, we just use the params directly and dont unpack the variables at all, prevending furthur name clashes.
* get rid of "local_var" prefix, now that we no longer clash with paramater names
* fix a typo and remove the r# generated to the paramName when we create the identifier
* java code formatting and added a fake-endpoint parameter test
* update rust samples
* Fix Julia template for binary format
* Update julia samples
* fix missing check for the isBinary flag
Fix missing check for the isBinary flag in some places of the templates for julialang. The code would now be generated as Vector{UInt8} uniformly for binary strings. Binary strings that are also marked as files get generated as `String` data type on the client. That is because the Julia client expects a file name to be passed there.
* Fix Julia template for file
* Update julia samples
---------
Co-authored-by: tan <tanmaykm@gmail.com>
- Remove the dead link to a python-legacy client generator.
- Add a link to the python-pydantic-v1 client geneator.
- Add a link to the python-fastapi server generator.
* Improve the implementation of oneOf
* Fixed 2.0 schemas; possible freeze present
* Fix generate-samples.sh freezing
* Fix validation of primitive types
* Move oneOf handling to its own method
* Fix formatting and add comments
* Remove allOf based discriminator handling
* Implement a test for v3 oneOf
* Implement oneOf tests for rust axum
* Fix circle CI
* Fix pom path, ensure cargo is present
* Implement untagged test
* Add final and fix double underscore typo
* Revert #18724
Make JAX-RS spec BuilderImpl class final again
* Remove bean validation annotations from builder
* Also update other java generators
* Introduce removeAnnotations lambda
* Undo import changes to JavaHelidonClientCodegen
* Add javadoc comment, examples and test for AbstractJavaCodegen.removeAnnotations()
* Adds @Nullable annotation to Spring Boot generator
* issue-14427: [REQ][spring] Null-Safety annotations
* issue-17382: [REQ] spring generator add Nullable annotations
Motivations:
* Have Spring Boot generator client properly annotated for nullability to be able to check code using them with tools like NullAway
* As it is related to Spring then the `org.springframework.lang.Nullable` annotation was chosen to avoid discussion which `@Nullable` one is true one
* `@NonNull` wasn't used as I didn't see much benefit of it. Anyhow, an empty constructor and/or setters allow to put a `null` value there
Modifications:
* Adds nullableAnnotation template to handle nullability annotation on vars
* Adjust pojo templates to use the nullability template
* Adapts tests
Modifications:
* Runs export_docs_generator.sh script to update samples
* samples update
* excludes Spring @Nullable from java-camel
* ones with defaults shouldn't be annotated as @Nullable
* updates samples
* adds AllArgConstructor generation tests
* adds container tests
* [C] Deprecate *_create() to avoid *_free() confusion
The behaviour of *_free() doesn't match *_create(), so the user should
avoid using them together. But they still need *_free() to clean up
library-allocated objects, so add a _library_owned flag to each struct
as an attempt to tell them apart. This isn't perfect though, because the
user may neglect to zero the field, but they would still see a warning
once in a while so it serves its purpose.
To prevent the new deprecation warnings (intended for the user) from
showing up during the library build itself, define a new family of
*_create_internal() functions, and turn *_create() into simple wrappers.
* Update samples
* add eafer to c technical committee
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
Note: this does not fix anything else; for example all numerical
types, including float and double, are still incorrectly cast to
to long int before string conversion.
* fix: set RestRequest flag to force multipart/form-data when given as Content-Type
* fix: removed serialization of FormParameters for multipart/form-data
* updated csharp-restsharp samples
* add .net9 support
* fixed path of new sample
* comment out manual test that does not exist
* comment out manual test that does not exist
* comment out manual test that does not exist
* [C] Fail build on implicit function declarations
* [C] Complete changes from patch 34c3f8c7aa84
* Update samples
* [C] Fail build for global functions with no declaration
* [C] Use "static" for apiClient.c internal functions
* Update samples
* Added code and tests for generating the gradle wrapper for kotlin-spring
* Added generated samples
* Changed Gradle wrapper version to 8.1.1
* Added generated samples
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [typescript-axios] Add User-Agent Header to Default Axios
* fix if `npmVersion` doesn't exist
* generate samples
* single line solution
* move user agent header to config
* generate samples
* splat for headers as well
* samples
* move headers above baseOptions
* samples
* commas are hard
* samples again
aiohttp's `ClientSession` & `TCPConnector` used to obtain an event loop in
__init__ (via `asyncio.get_event_loop`). However, as of https://github.com/aio-libs/aiohttp/pull/8512 both
classes now obtain the running event loop and won't potentially create one. This
makes it impossible to create `ClientSession` and `TCPConnector` objects outside
of coroutines, as `get_running_loop` must be called from a coroutine.
Thus we defer the creation of a `ClientSession` into the actual request and
cache it for later usage. Thereby we pay only a very small price on the first
request, but subsequent requests will not be any more expensive.
* replace removed forkMode
* remove junit runner where it's not needed
* update samples without skipping test files, but skip files named "FILES"
* revert overwriting custom tests, add custom java tests to list
* add one sample to CircleCI, fix various Java tests
* chore (JAVA SPRING WEBCLIENT): Remove comments used for debugging
* feat (JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient
* feat (JAVA SPRING WEBCLIENT): Generate samples and docs
* fix (JAVA SPRING WEBCLIENT): Fix missing return error & Fix JDK17 action webclient useSingleRequestParameter test path
* fix (JAVA SPRING WEBCLIENT): Fix code indention
* fix (JAVA SPRING WEBCLIENT): Fix code indention again
* fix (JAVA SPRING WEBCLIENT): Update samples
* feat (JAVA SPRING WEBCLIENT): Regenerate after pull rebase
In the build.gradle template for the Java generator's resttemplate library, change dependency to com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider instead of com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider when useJarkartaEe is enabled. This makes it consistent with the pom template file.
* [C] Deal with binary api parameters
With this change, the bodyParameters array can also be binary, so pass
its length around instead of relying on strlen().
* [C] Fix a few remaining enum issues
* [C] Install headers and include any_type.h header
* [C] Don't require C++ to compile C code
* [C] Test binary bodies and path enums in schemas
* Update samples
---------
Co-authored-by: Sam Bingner <sam@corellium.com>
* [C] Clear the response code from previous api calls
Before making an api call, reset apiClient->response_code to zero. That
will protect us from checking stale values if the curl request fails.
* [C] Check that string arguments are not null
Check early on that the arguments are not null, to prevent crashes on
strdup() calls.
* [C] Don't attempt to fill in a type with error info
Check if the api call returned an error before attempting to parse the
reply as the expected type.
* [C] Handle binary and integer return types
* [C] Update test schemas with binary and integer return types
* Update samples
* quick edit to allow tokens to refresh if they specify an expires_in and created fields. Also supports refresh_token if that is passed.
* update samples
* fix compile error for projects without default using statement.
make the created date nullable.
* fix nullable de-reference on Created.
* fix to remove nullable reference types (the ! to remove the warning) and add documentation comments to the public members.
* Update ElixirClientCodegen.java
* Refine the regular expression for atoms
The original regex incorrectly matched `@atom` (unquoted atoms
cannot begin with @). However, through testing with `iex`, it also turns out that the atom
`:@` is legal.
The following atoms will now be quoted that would have been
incorrectly not quoted:
- `:@type`
* Add model to petstore client to test new atom creation regex pattern
* [C] Don't convert post body strings to JSON
If the body provided for the api request is a just a string itself,
don't try to convert it to JSON, simply submit the string.
* [C] Implement BearerToken authentication
* [C] Handle nullable fields correctly
* [C] Fix implementation of FromString for enums
* [C] Update the test schemas to cover the changes
* Update samples
* Fix the updated samples
* [C] Add the new samples folder to the CI workflow
* 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
* [cpprestsdk] Implement enum inside objects
* [kotlin-spring] Fix no List being used for an array of files using multipart/form-data
* [kotlin-spring] Use Spring's MultipartFile class for incoming Files instead of Spring's Resource class.
* [kotlin-spring] Add test to ensure that return type for files is `org.springframework.core.io.Resource`
* [kotlin-spring] Ensure Array is used for lists of files in generated Api class
* Update samples
* [kotlin-spring] Move conditional usage of MultipartFile to optionalDataType.mustache. Update samples
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* feat(typescript-angular): add support for Angular V19
fix#20204
* feat(typescript-angular): add options to override angular deps + refactor deps definition
add tsVersion, rxjsVersion, ngPackagrVersion and zonejsVersion options to override default config if new version of Angular is available but not yet implemented in openapi-generator
refactor Angular dependencies definition in separate readable yaml config file
fix#20204
* feat(typescript-angular): add better angular 19 exemple for ci testing
fix#20204
* feat(typescript-angular): unify tsVersion param
fix#20204
---------
Co-authored-by: Thibaud SOWA <thibaud.sowa@equasens.com>
* fix(typescript): remove incorrect file extensions
url, http, and https are Node.js core modules, and form-data
should be loaded using a bare specifier. This commit removes
the file extensions from these imports.
* update samples
* Updated README.mustache file for the Erlang server generator. Fixed one error and updated the usage instructions
Changes made to the Erlang server generator's user instructions ("README.mustache" file):
1. Corrected the argument in section 4.1 of the user instructions.
In openapi_server:start/2, the second argument for the generated Erlang code must now be in a different format than proposed in the instructions (see lines 13-16 of the "server.mustache" file).
Initially, the server failed to start, and after some debugging, I discovered that the argument format did not match the server's expectations, causing the port number not to be passed to cowboy:start_clear/3. This has now been fixed.
2. Reviewed and updated the text of the user instructions to remove any ambiguities.
3. Tested the user instructions for accuracy and completeness.
* erlang-server sample recompiled
* README fix
* Fixed README.mustache template markdown for erlang-server. Re-generated erlang-server sample.
* Update README.mustache
* Sample 'erlang-server' re-generated
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [rust][reqwest] support binary type for upload and download
* [rust][reqwest] support binary download in supportMultipleResponses contexts
* [rust][reqwest] support binary responses that don't have any return type
* [C] Add test schemas for the recent changes
The recent commit 47665aaa97cb ("Fix a few issues with the C generator
(part 1 version 2) (#14434)") didn't include any test schemas. Add them
now, as requested:
https://github.com/OpenAPITools/openapi-generator/pull/14434#issuecomment-2497497110
* Update samples
* Fix sample update with missing files
* More fixes for sample updates
* erlang-server: add jesse to app.up release
* erlang-server: remove dialyzer errors that might not be related to the program
* erlang-server: minor fixes to return types and generated docs
* C: add a template for an empty any_type.h header
Some generated C apis fail to build because the source files get
'#include "any_type.h"' lines, but no such header gets generated. As a
simple fix, add a new template for an empty file with that name. This is
enough to fix the problem for us, because all the generic type stuff is
handled by object_t.
* C: fix enums
I'm guessing that enums have not been used much with the C generator
before, because they always seem to produce code that doesn't build, or
that tries to free them after use. This patch fixes all the problems
we've encountered so far, except for those that need checking the return
type. I'll come back to that later.
* C: fix confusion of 'classname'/'classFilename'
* C: fix issues with returned enums
Currently, the C templates never check if a function returns an enum
inside mustache, so when that happens the generated code has broken
return types and doesn't build. I originally tried to fix this by
extending CodegenOperation to implement a 'returnTypeIsEnum' check, but
William Cheng suggested[1] that I use the existing 'returnProperty'
instead:
https://github.com/OpenAPITools/openapi-generator/pull/14379#discussion_r1064636735
So do that.
* C: update the samples
As required for a pull request, run the generate-samples.sh script and
commit the changes.
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* chore(go): add failing test for JSON marshalling
Adds a small schema (FruitJuice) which contains a required gmFruit,
which inherits using AnyOf. This fails to correctly marshal as JSON.
* fix(go): use non-pointer receiver for JSON marshal
In the case of a required anyOf property, JSON marshalling would has
been incorrect.
Required properties are not nullable, and thus always use value
receivers. For the single case of anyOf models, a pointer receiver was
used for MarshalJSON. All other instances of json marshalling use value
receivers.
This change is simply to use a value receiver instead of a pointer
receiver in the template for `MarshalJSON` on anyOf models.
---------
Co-authored-by: Per Hallgren <perhallgren@users.noreply.github.com>
* [R client] better support for binary/compressed responses
* cleanup
* revert change after PR review
* update samples
* fix R tests
* move private api methods to api-client, revert breaking method name change
* fixes(java/restclient) Force usage of custom converter
Insert custom converter at the beginning of the 'RestClientBuilder' converter list so as not to use default 'MappingJackson2HttpMessageConverter'
Close#20111
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* feat(gdscript): sketch implementation of gdscript target language
This does not really work yet, but it's a start.
Results are not denormalized, no support for enums nor datetimes,
and thousands of other features are missing.
I still don't know how we are going to denormalize JSON+LD
without writing a whole GDScript lib for it…
* feat: add an exhaustive list of keywords reserved in GDScript
I've also provided the small python script I used to generate the list.
* refacto(gdscript): start using partials in templates
Whilst I'm racking my brains trying to figure out integration testing…
* test(gdscript): prepare a demo and integration testing
* fix(gdscript): do not use subclasses, use plain POGO
(plain ol' godot object)
One: I don't know how they work under-the-hood.
Two: I'm very confused over-the-hood.
Tri: We do not need them.
* refacto(gdscript): move demo files to their own directory
I know I'm making a lot of commits for not much,
but now I'm opening the sample files with Godot as well,
and doing unholy things with filesystems,
so I'm not taking any chances.
It's all going to be squashed anyway. :)
* fix(gdscript): sample as a Godot project
It works ! I can now write integration tests in GDScript.
The real work starts now.
/spend 25h
* feat(gdscript): serialize and send body params
The test suite is now past its first hurdle, the 415 HTTP status code,
and went straight into an unexpected error 500.
I suspect the server does not like me trying to set the pet id at 0,
because that's what we're trying to do right now.
Godot is crashing a lot, mostly because I don't know how to make Callable.NOOP
and my current solution hints at optional on_success and on_failure,
yet if we omit them the engine will ragequit.
* feat(gdscript): check request body for required yet missing properties
Now we'll get a nice error when we forget to set a required property.
The demo is now able to:
- connect
- create a user
- login as that user
- create a pet
* feat(gdscript): namespace core classes as well with apiPrefixName
This makes our usage of `class_name` a little more acceptable.
* feat(gdscript): support prefixes and suffixes for class names
This will crutch namespacing well enough for most uses.
* feat(gdscript): handle enums, naively
* feat(gdscript): support basic API endpoint param constraints
- minLength
- maxLength
- minItems
- maxItems
- minimum
- maximum
- pattern (no flags)
* feat(gdscript): handle header params and header customization
We also support serializing to application/x-www-form-urlencoded now.
Next up: DateTimes !
* feat(gdscript): handle Date and DateTime like Strings
There's no timezone support in Godot for DateTimes.
* feat(gdscript): support plain text responses
* feat(gdscript): support collections of models
Those are Arrays, not custom collection objects.
* feat(gdscript): configure default host from OAS
* feat(gdscript): some documentation and better config
We don't need no factories nor singletons ; config is enough.
* docs(gdscript): document usage a little
* feat(gdscript): add more reserved words, skip jsonld models and configure features
We can now generate a client for an OAS server running ApiPlatform (PHP).
* feat(gdscript): improve logging with a configurable log level
* feat(gdscript): add support for Basic Bearer and Header ApiKey
(but I can't find the `description` template handler)
* fix(gdscript)
Too late to amend >.<
* fix(gdscript)
dangsarnit
* chore(gdscript): clean up a sprint artifact
* fix: don't forget the HTTP error code when relevant
* feat: use Resource as base class for models
* fix. Default string values now with "quotes"
* temporary remove settings as godot api have changed
* kick ci
* docs: review gdscript java class
* feat: support for TLS, some refacto, some review
There's still a lot of holes, TODOs and FIXMEs.
* feat: experimental support of Request inline objects
The inline response objects are still not supported.
* feat(gdscript): support inline request and response objects
* chore(gdscript): review the templates
* fix(gdscript): unexpected nulls in default values
{{#if defaultValue}} evaluates to true for null if we call super here.
* refacto(gdscript): replace "bee" prefix by "bzz", use a constructor
Now we pass the config and the client via the constructor.
This reduces the area of the public surface a bit, for the better I think.
This commit also cleans up the class name shenanigans.
* fix(gdscript): add missing file
* test(gdscript): refactor the test project to use the generated lib as addon
Since there is no singleton in the generated client, the addon need not be enabled in the project configuration to be usable.
The --headless mode is broken for now, as things changed in Godot 4 since the beta.
* docs(gdscript): document petstore server ADR
* test(gdscript): add GUT and an integration test
We used the latest stable GUT, but a feature we're going to need was merged today, so we'll need to update it either to master or to the next release at some point.
* refacto(gdscript, breaking): use an ApiResponse object in success callbacks
/spent 6d since the beginning
* test(gdscript): update integration tests
/spend 2h
* docs(gdscript): explain the new ApiResponse
Also moving core templates to their own subdir, for clarity.
/spend 10m
* chore(gdscript): review, document, clean up
/spend 2h
* test(gdscript): test the delete operation as well
/spend 7m
* feat(gdscript): update GUT and exit with appropriate code
/spend 2h
* docs(gdscript): add Gdscript's PI
Hire me while I'm available ! :D
I'd rather code than make a CV.
* feat(gdscript): support reserved keywords
Also adding some more assertions,
and using our own OAS file now.
/spend 3h
* refacto(gdscript): use "base" instead of "bee"
/spend 1h
* feat(gdscript): improve descriptions
/spend 1h
* fix(gdscript): await before polling
Contributed by @jchu231
* docs(gdscript): review the template files
* docs(gdscript): review and generate docs
---------
Co-authored-by: Bagrat <b.saatsazov@gmail.com>
* adding support for useResponseEntity into spring-http-interface java spring generator
* adding samples for @StatusResponse into spring-http-interface java spring generator
* additional changes to sample
additional changes to samples jdk17
* adding sample files
* extra adjustments
* fixing generator version
* fixing status code in samples
* some rollback
* some rollback 2
* Fix compilation error when validate is used on Nullable values
* Update samples
* Switch Nullable Into Option trait implement to From
* Update samples from rebase
* [swift][client] rename api client to api configuration
* [swift][client] rename api client to api configuration
* [swift][client] rename api client to api configuration
* [swift][client] rename api client to api configuration
* [swift][client] rename api client to api configuration
* [swift][client] rename api client to api configuration
* Update modules/openapi-generator/src/main/resources/swift6/api.mustache
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* [swift][client] rename api client to api configuration
* Update modules/openapi-generator/src/main/resources/swift6/api.mustache
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* Update modules/openapi-generator/src/main/resources/swift6/api.mustache
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* Update modules/openapi-generator/src/main/resources/swift6/api.mustache
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* Update modules/openapi-generator/src/main/resources/swift6/api.mustache
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* Update modules/openapi-generator/src/main/resources/swift6/api.mustache
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* Update modules/openapi-generator/src/main/resources/swift6/api.mustache
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* [swift][client] rename api client to api configuration
---------
Co-authored-by: Lennard Sprong <x-sheep@users.noreply.github.com>
* added support for 'oneOf' types represented as unions
also updated libs and an 'errors' field rename to address
name clashes with likely/popular field names
* Created cask-specific petstore example which
Includes a oneOf and allOf example
* [kotlin-server] Bump Kotlin versions to latest
* Run tests on more samples
* Fix typo in workflow definitions
* Update samples
* Bump Gradle to 7.6.4
* Some further tweaks
* Bump Gradle versions
* Fix Gradle version syntax
* Add of a first working generator for FastEndpoints framework
Generator that support the basics of a FastEndpoints project
https://fast-endpoints.com/
* Add respose code documentation support
* Add an option to enable use of problem details
* Clean enum and model
* Add an option to generate record for requests/models
* Update sample
* Add support of nullable types
* Add option to enable authentication
* Add option to generate validators
* Clean readme.md file
* Add option to enable response caching
* update readme template
* Add missing files references
* Update generated sample
* Add link to documentation
* Add generator documentation
* correctly support packageName
supportingFiles additions moved to processOpts()
* improve useAuthentication option handling
Avoid to copy an empty file
* processOpts, move call to parent at the end
* Update generated sample
* Refactor and fix super.processOpts(); call order
* Handle the case of multi-line description
* Rename field to match naming conventions
* Add useApiVersioning option
* Update generated sample
* Add generator documentation
* Fix record when model contains optional properties
* Add configuration files for each option
* Add sample project for each configuration
* Add GitHub Action workflow for sample projects
* Add FastEndpoints BindFrom attribute on path, query and form params
* Update sample generated projects
* Fix validator template
* fix alphabetical order
* Use fully qualified name for FastEndpoints
* Add options to set GUID to be used in sln file
* update sample projects
* Update generators.md
* Fix path in github workflow
* Put readme, gitignore and solution file at the root of generated project
* update sample projects
* Remove the projectGuid option
This Guid need to be constant, it is related to project type
* update sample projects
* 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
* better handling of duplicate operation ids
* fixed mistake in resolving conflicts
* build samples again
* revert a change sent in another pr
* Scala-cask improvements:
* fixe for grouped methods which have routes containing dashes.
Previously our OperationGroup work-around would potentially
Create methods like ‘foo-bar’, which isn’t a valid function name
* Fix to not import some.package.Array[Byte] when binary format is specified
* Fix for grouped operations which contain duplicate query parameters
* Fix for binary response fields. This can come up with the following example
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"format" : "binary",
"type" : "string"
}
}
},
"description" : "data"
},
* Fix for enum model classes
Extracted complex logic for ‘asData’ and ‘asModel’ transformations for properties
* Introduced a generic effect F[_] for services
This was done to support composable services
(Service A calls Service B) by using monadic
Effect types (ones which can flatMap)
* Fixed unique union types for responses, asModel and asData fixes for non-model types
* scala-cask: regenerated samples
* Fix for reserved-word properties in the API
* Fix for null imports and reserved-word enum types
* Fixes for api methods with backticked params
* Fix for duplicate (by name) grouped params
* small syntax fix
* logging response type
* Regenerated samples
* String.format fix
* [julia] improve enum support
Improved enum support. Added an override for `postProcessModels` method in julia code generator to do enum post processing. Added an override for `toEnumValue` method in julia code generator to generate enum values correctly based on julia types. Updated templates to use `#enumVars` for generating enum values.
* generated samples
* python-pydantic-v1: Keep trailing commas for tuples when enum has just single member
* Update samples
* Add test for single member enums
* Refactor test name
* [Kotlin] Properly document nonPublicApi CLI option
* [Kotlin] Respect parameter name of parent KSerializer to avoid miss-behavior
* [Kotlin] Introduce support for Kotlin Explicit API Mode for Kotlin-Client generator (resolves#16506)
* fix: csharp mustash fully qualify namespace Path
The generated code of Csharp get a fully quallify namespace for PATH
using Path = global::System.IO.Path;
* mend
* Remove alias for fully qualify Path class
* Added Rust Reqwest trait based client
* Fixed Cargo imports for reqwest trait template
* Added support for mockall to Rust reqwest trait library
* Added MockApiClient when mockall and topLevelClient are enabled
* Added missing flags to Rust generator documentation
* feat: add support for single argument and bon builder
Adds support for single argument and bon building for the new
reqwest-trait generator
* Rebuilt rust samples
---------
Co-authored-by: Troy Benson <troybensonsa@gmail.com>
The api.mustache template only uses the reflect package if there is a
query parameter which `isCollectionFormatMulti`. The import for the
reflect package is however added if _any_ parameter is
`isCollectionFormatMulti`.
If the parameter which `isCollectionFormatMulti` e.g. is in the body
instead of the query, this leads to the import being part of the
generated code but not used and the code does not compile.
This updates reworks the import handling for the `reflect` package so
that it is only added if there is a query parameter which
`isCollectionFormatMulti`.
Co-authored-by: Per Hallgren <perhallgren@users.noreply.github.com>
Updated the README company list by adding CERN, which is currently experimenting with OpenApi Generator to streamline API calls in a newly developed business application.
* [kotlin] Sanitize one_of and any_of model variable names to avoid compilation errors (#19942)
* [kotlin] add missing validateJsonElement method to oneOf and anyOf model templates (#19942)
This fixes generation of a Rust library for OpenAPI specifications
where `info.version` was a single-digit number. This happened to for
[this](db005f2e55/openapi.yaml (L10))
specification. The fix for this issue is similar to the one in !17440.
* Add licenseName option to typescript
* Update documentation
* Fix import in test
* Consolidate typescript test OptionsProviders
* Rename Typescript to TypeScript
* issue-1960: Add nullability annotations to Java generated clients
Motivations:
Have generated clients properly annotated for nullability to be able to check code using them with tools like NullAway
Modifications:
* Add nullable_var_annotations template to handle nullability annotation on vars
* Add pojo templates to use the nullability template
* Adapt tests
* issue-1960: Add nullability annotations to Java generated clients
Modifications:
* Run export_docs_generator.sh script to update samples
Previously, if an operation had a 'servers' block, the template would
emit code requiring a `serverConf` local variable. Unfortunately, the
template would not emit this variable, because it was looking for a
`servers` variable in the wrong context.
This change makes the template emit an anonymous block containing a
unique server configuration for each operation.
I did not test this change beyond a simple code inspection, there are
other problems with the code generator which prevent it from running on
my API definition.
* Stop using obsolete MaxTimeout
* Convert timeout to a timespan, rather than update the configuration object
* Use async overload of RestClientExtensions.Deserialize
* Update samples
* Fix typo
* Undo timeout change
* Remove further Qt support before Qt 5.15.2
This is a follow-up pull request for [#19164] (https://github.com/OpenAPITools/openapi-generator/pull/19164), which removes the further handling of older Qt versions.
* Updates samples to match the mustach config files.
---------
Co-authored-by: Daniel Simon <mail@dlins.de>
* [Kotlin Server] Update Ktor to latest version; move config to kts
* Bump gradle version for kotlin server samples
* Replace deprecated gradle API
* Bump gradle to 7.6.4
* Improve typescript-angular README.mustache
- Add syntax highlighting to code blocks
- Correct heading levels
* Add space between heading and convert bare url to angle brackets link
* Update samples
* Added support for 'additionalProperties:true' to scala-cask generator
additionalProperties means the request can contain arbitrary
additional properties, and so this change adds an 'additionalProperties'
field to request objects which is a json type.
* fixed warning in example scala-cli project
* updated samples
* addressed codegen comments
* Remove calculateRequestOrder Function
This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue #19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.
* delete import java.lang.*;
* delete import java.lang.*;
* Remove calculateRequestOrder Function
This PR removes the calculateRequestOrder function from the codebase and addresses the bug described in issue #19110. After a thorough review, it was determined that the function was unnecessary due to its redundant logic and lack of unique functionality.
* delete import java.lang.*;
---------
Co-authored-by: rmarqmo <rmarqmo@mercadona.es>
* 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
* 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
* 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
* fix(core): single value enums (`const`) are not generated correctly in `3.1` specs
* fix: const enums
* chore: update samples
* chore: update samples
* 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 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>
* [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
* [swift6] make async await the default response library
* [swift6] make async await the default response library
* [swift6] make async await the default response library
* 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>
* 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
* 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
* 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] 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
* 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
* 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.
* 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>
* [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
* 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
* 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>
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>
* Check references in additionalProperties correctly
Handle references in additionalProperties correctly when determining free-form status
* Update samples
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.
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.
* [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
* 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>
* [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
* 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
* 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: <9316764e90/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`
* 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
* 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.
* 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
* 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>
* [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
* [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
* 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
* [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
* [typescript][angular] move app description from header license info to readme
* [typescript][angular] move app description from header license info to readme
* [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
* 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] 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>
* [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
* 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>
* 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>
* 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>
* 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
* 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>
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, ...)
* 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]: ba2169891f/aiohttp_retry/retry_options.py (L38-L65)
* updated example
* [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
* [typescript][angular] move api version from header license info to readme
* [typescript][angular] move api version from header license info to readme
* 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
* 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
- 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.
* [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
* 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`
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.
* 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
* rust: support repr(int) enum
* Regen APIS
* remove the extra lines
* merge most recent commits from master
* update tests to ensure that enum compiles correctly
* drop changes to kotlin files
---------
Co-authored-by: Jihyun Yu <yjh0502@gmail.com>
This commit updates the access modifier of the ExtendedCodegenModel class from its default (package-private) to public, allowing it to be accessible from outside its package.
Co-authored-by: Paulo Da Rocha Filho <paulo.darochafilho@wnco.com>
* fix#19211 kotlin-spring flag delegatePattern together with skipDefaultInterface generates broken code
* add kotlin-springboot-delegate-nodefaults to the workflow
* fix Platform declaration clash
* move kotlin-springboot-delegate-nodefaults to the kotlin-server-jdk17 file
* fixed empty line
* Adding decimal to template for Python generator
* Rerunning the build steps
* Add tests for decimal serialization and deserialization.
* Move test to python not legacy pydantic sample
* readd old imports
---------
Co-authored-by: Adam <abolfik@pollyex.com>
* Add samples using `oneOf` without discriminator
* Fix typescript-fetch code gen for `oneOf` without discriminator
* Return `{}` instead of original `json`
* [python-fastapi] Added some tests for FastAPI generator
1. Checks the generation of the implementation package.
2. Checks if the endpoints with and without descriptions generate correct
output.
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Raise 500 if there is no implementation
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
---------
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api multipart form single file test
* feat (JAVA SPRING RESTCLIENT) 18522: Add RestClient to README
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo all of Pet test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body free form object response string test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body pet test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body pet response string test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body string enum test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body tag response test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo form tests
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo header test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo path test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo query tests
* feat (JAVA SPRING RESTCLIENT) 18522: Regenerasted API Clients for RestClient with fixed import indentation
The unit tests in the following directories are written to unittest, not
pytest:
* `samples/client/echo_api/python/`
* `samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/`
If pytest is told to execute these tests, it will log warnings about
being unable to collect certain tests.
* Add global auth parsing including headers and cookies for k6.
* Add global auth statements.
* Generate samples.
* Revert "Generate samples."
This reverts commit b8cff8691b73f15088f68c7e6876807ed1e63307.
* Copy petstore-with-fake-endpoints-models-for-testing.yaml to a seperate k6 path as its example yaml file.
* Add global security statement in k6 example yaml instead of using the generic one.
* javax.ws.rs:javax.ws.rs-api package was renamed on maven
* update dependencies for java okhttp pom, build.sbt
* update
* update dep
---------
Co-authored-by: Andres Aguilar <andresesfm@gmail.com>
* codegen: add == -> 'Double_Equal' to specialCharReplacements
The double equal '==' is a common operator in a few contexts (specific use case for me is haystack operators). Currently if this value appears in an enum its name gets sanitized to empty and generates invalid syntax. Very similar to https://github.com/OpenAPITools/openapi-generator/pull/12801
* makes java underscore test more flexible
Given the name and purpose of this test, maybe it is better to test that the generated value is not an underscore rather than to test that it _is_ a specific (and possibly arbitrary) substitute value.
* feat(typescript-axios): allow configuration of axios version
* docs(typescript-axios): add readme docs for axiosVersion config option
* test(typescript-axios): add unit tests for custom axios version
* docs(typescript-axios): fix up typescript-axios generator docs
* added test with external-ref ("external dependency" installed before actual usage)
* fixed test with resource on classpath
added test with resource on classpath with external-ref.
Test with profile 'resource' was wrong as it took JAR into account, but there was no 'petstore.yaml' on classpath.
* Remove dependency scan and do not modify inputSpec provided by user
It is still possible to provide JARs as inputSpec, however the user has to provide it by hand.
Providing dependencies in plugin section still allows correct inputSpec resolution on classpath.
* remove thread unsafe statusCode and responseHeaders instance variables
* re-add status code and header getters for backwards compatibility
* add import
* whitespace cleanup
* use deprecated thread id getter for backwards compatibility with pre-19 java
* Add bytestring package to dependencies of generated haskell code
This broke in https://github.com/OpenAPITools/openapi-generator/pull/18047
where tvh introduced an import of Data.ByteString.Lazy. The added
bytestring package was available in some but not all cases.
* update workflow to test haskell servant ping
* update samples
---------
Co-authored-by: Bastian Senst <senst@cp-med.com>
* [cpp-qt-client] Just for test
* Fix samples-cpp-qt-client github workflows
* Use only 6.7.1 in CI
* Revert "[cpp-qt-client] Just for test"
This reverts commit c7e19aeb6c22fb801d67d56f94eed133d377ffdf.
* fix#18005: Prevent adding 2 times the "?" when not required and nullable = true
* fix#18005: Fix carriage return diff
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [kotlin][client] fix temp file name and remove old deprecated jvm-okhttp3
* [kotlin][client] fix temp file name and remove old deprecated jvm-okhttp3
* [kotlin][client] fix temp file name and remove old deprecated jvm-okhttp3
When using the JVM implementation of OkHttp with a Kotlin client, you may encounter issues with the toString() method of enum parameters. By default, the toString() method of an enum returns the name of the enum value, not its value.
To fix this issue, you can override the toString() method of your enum to return its value instead of its name.
As mentioned in #13841, date-time parameters in request bodies are not ISO formatted, which breaks with certain webservers. This commit invokes `toISOString()` for date-time body parameters like it is done for queryParameters.
Fixes#13841.
* Add type annotations to raw types for jersey2 and jersey3 templates
* Update samples
* Add type parameters to anyof_model.mustache and oneof_model.mustache
---------
Co-authored-by: Kasper S. Nielsen <kasper.s.nielsen@secata.com>
Causes failures like:
Configuration `:debugUnitTestRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues.
* [Go] Fix an issue causing int array ref be converted into an invalid type, `[]Integer`
* Add test case: wrapped and referenced integer of an array to Go client samples
* add check for ref to property in go abstract
* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
Co-authored-by: Zhiwei <zhiwei.liang27@pm.me>
---------
Co-authored-by: Zhiwei Liang <zhi.wei.liang@outlook.com>
Co-authored-by: Zhiwei <zhiwei.liang27@pm.me>
* [Golang] Move utility functions from client.mustache to utils.mustache
* re-generate Go samples
* re-generate Go samples again
* re-generate samples once more
* update go samples
---------
Co-authored-by: Martin Lakov <martin.lakov@ocado.com>
* avoid setting debug property if not needed
* update samples
* fix compatibility with python 3.7
* always set Configuration.__debug
* update samples
* check `Configuration` behavior when debug parameter is / is not set
* address PR requests
* [csharp] Don't apply json converter attribute for DateOnly (#18541)
Applying the OpenAPIDateConverter to an DateOnly property fails at runtime with an exception.
* [csharp] Update samples
Fixes#15077
The previous fix for this in #16096 is incomplete because it still
generates unnecessary inline models when readOnly or
nullable is used in conjunction with other properties like
description.
This commit fixes the logic error and adds testcases.
* [haskell-http-client] Support --name-mappings and handle _ name (#18943)
Fixes#18943
* [haskell-http-client] Add missing TypeOperators flag
-Wtype-equality-requires-operators:
The use of ‘~’ without TypeOperators
will become an error in a future GHC release.
* [kotlin-server][javalin6] Add Javalin 6 support
Javalin 5 support was added in 13edc5d. Javalin 6 has been released, with some breaking changes. Let's add a new supportedLibrary to not break existing users of Javalin 5.
https://javalin.io/migration-guide-javalin-5-to-6
* Fix Gradle config and don't include JVM 8 CI anymore (JVM 11 is the minimum for Javalin)
* Update docs
* Fix optional query parameter handling and turn into expected type
* Java generators: use codegen fields in mustable
* Java generators: use codegen fields in mustable
* Java generators: use codegen fields in mustable
* Use MUSTACHE_PARENT_CONTEXT in additionalProperties
* Fix link to mustache documentation
* [android] Fix useAndroidMavenGradlePlugin type in template
* [android][volley] Use version variables in template
* [android][volley] Exclude httpclient
As it is incompatible with Android
* [android][volley] Resolve file conflict between httpcomponents modules
* [android] Update Gradle, the plugins, build tools
This fixes building with current Android Studio.
Android Gradle plugin version 8.0.0 was chosen for wider compatibility
with Android Studio versions (as far back as 2022.2.1).
The Maven plugin has been abandoned since the functionality is now
built in, and manual jar tasks are not necessary with it.
* [android] Regenerate samples
* Implement regression test for #12804
* Fix duplicate rendering of @Deprecated annotation on Builder methods
* Regenerate samples
* Sort entries so it's easier to parse if an entry already exists
* Add sample that uses generateBuilders=true to test build matrix
Serves as an additional regression check for #12804
* Add --no-transfer-progress to mvn build command to increase log legibility
* Implement InnerClassAssert for easy inner class testing
* Suppress "'Optional.get()' without 'isPresent()' check" warning
For now, until https://youtrack.jetbrains.com/issue/IDEA-354935
is solved.
* Apply DRY refactoring
* Move newTempFolder helper method into TestUtils
* Fix typo `doesNotContains`
* Pluralize assertion classes that extend ListAssert
* Add short-hand has/doesNotHaveAnnotation methods to Method assertions
So .hasAssertion(String) can replace .assertMethodAnnotations().containsWithName(String)
* Refactor tests, simplifying setup using CodegenConfigurator
* Harmonize API, removing confusion between has… and assert…
This makes our the assertion API more consistent, in the way that
assertSomething("") will always return a different assertion type,
while hasSomething("") will always return the same type.
* Use simplified hasAnnotation/doesNotHaveAnnotation assertions
* Fix XML annotations on model properties (JavaSpring)
* generate JAXB annotations for attributes and elements
* generate wrapper annotations (JAXB and Jackson)
* use XML config from items for annotations of containers
* Add test for Jackson XML wrapper correctness
* Add additional test cases to cover all xml applications in spec
Test now covers all use cases described in
- https://web.archive.org/web/20240424203304/https://swagger.io/docs/specification/data-models/representing-xml/
- https://spec.openapis.org/oas/v3.0.0#xml-arrays
* Fix basename used instead of xmlName when items.xmlName is unset
See last example in spec: https://spec.openapis.org/oas/v3.0.0#xml-arrays
* Harmonize spacing between Annotation attribute name and value
* Refactor and group JAXB vs. Jackson XML annotations, only generate latter if enabled
This is in line with the way the class annotations in `xmlAnnotations.mustache`
are rendered – which only renders the `@Jackson`… xml annotations if
additionalProperty jackson is true.
Also reorder annotation attributes in the following order:
- localName/name
- namespace (optional)
- isAttribute/useWrapping (optional)
* Explicitly render `useWrapping = true` to @JacksonXmlElementWrapper
This was slightly inspired by @jzrebiec via PR #5371.
Wrapping is the default since Jackson 2.1 – so explicitly rendering
this will:
- make generated model work out-of-the-box in Jackson 2.0 for instance
- ensure the models still work if the local `XmlWrapper` was
configured with `useXmlWrapper(false)`
* Move xml test spec to java resources folder (not spring specific)
* Make test class name match class-under-test
This makes discovery & cross-navigation in IDE easier.
* Add complete xml annotations test for Java generators
* Fix Java PKMST generator not generating @JacksonXmlElementWrapper
* Fix Java microprofile generator missing @JacksonXmlRootElement
* Fix Java microprofile generator not using wrapper annotations and namespaces
* Fix Java Micronaut Client creating invalid (unclosed) @XmlAttribute annotations
* Fix Micronaut Client using wrong localName for @JacksonXmlElementWrapper
* Fix Micronaut client rendering @JacksonXmlProperty annotation twice
* Make Java Micronaut render @JacksonXmlElementWrapper(useWrapping=false) for non-wrapped elements
* Fix Jackson element using `xml.name` when it should be `items.xml.name`
Closes#5989Closes#3223
Relates to #9371
* Fix JAXB element using `baseName` instead of `xmlName` when items.xmlName is unset
* Remove XML generation debug output from templates
* Remove redundant newline between XML class annotations and class
Brings the SpringCodegen in line with other Java Codegen's
* Remove redundant newline between XML setter annotations and setter
* Fix multiline JavaDoc block indentation and format
* Simplify / condense xml annotation template into single lines
May look a bit more complex, but cuts out a lot of repetitiveness.
Also reorders annotation attributes in the following order:
- localName/name
- namespace (optional)
- isAttribute/useWrapping (optional)
* Harmonize spacing between Annotation attribute name and value
* Remove unused jackson_annotations partial
Was not referenced anywhere in java-helidon resources folder
---------
Co-authored-by: Christian Schuster <christian@dnup.de>
This PR adds support for response ranges in rust-axum server, as defined in section 4.8.16.2 of the spec.
### PR checklist
- [X] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
- [X] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [X] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
```
./mvnw clean package
./bin/generate-samples.sh ./bin/configs/*.yaml
./bin/utils/export_docs_generators.sh
```
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
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.
- [X] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.6.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [X] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
@frol @farcaller @richardwhiuk @paladinzh @jacob-pro
* improved apiclient.mustache to keep it dry, sharing a single exec with Action<> delegate.
* updated samples and test
* Removed async from ApiClient.mustache
Updated samples
* Revert change to CSharpClientDeepObjectTest.java
* Fix async await (it was not waiting creating a null exception)
Updated samples
* Fix File IO namespace with using directive
* Improved comments on new methods
Added new DRY method DeserializeRestResponseFromPolicy
* Fix comments and parameters for new method DeserializeRestResponseFromPolicy
Updated samples
* feat/typescript-angular/add-v17-support
* HTTP_TRANSFER_CACHE_IN_OPTIONS for angular 17 as well
* run build scripts again because of angular 17 HTTP_TRANSFER_CACHE_IN_OPTIONS
* enumUnknownDefaultCase true added for Spring
* Resource added for test
* Updated tests
---------
Co-authored-by: Dean <dean.kane@opencastsoftware.com>
* Update model_anyof.mustache
* add tests for anyof in go client
---------
Co-authored-by: Martin Lakov <85170913+martinlakov@users.noreply.github.com>
* fixed parameter ordering
* placed changes behind a switch
* bug fix
* minor revert
* use lombok.Setter
* addressed comment
* lint
* minor refactor
* massively improve csharp templates code
improved apiclient.mustache to keep it dry, sharing a single exec with Action<> delegate.
improved api.mustache to keep it dry, used chain constructors, kept RequestOptions in a single method, set configuration with alias directive
moved fqn types to using directive for cleaner code
removed 'this' from variables/props that are redundant
fix CSharpClientDeepObjectTest code is now DRY so count must only be one
* updated test samples csharp
* removed async from ExecAsync (not needed here anymore)
* updated samples csharp
* nullable property not working on models due to not being defined in yaml schema
updated samples
* added options
* rebuild tests
* revert unintended commits
* rebuild samples
* rebuild samples
* rererebuild samples
* fix manual tests
---------
Co-authored-by: filipe <filipe_ds@live.com.pt>
* Format Elixir generator
* Update Elixir reserved words
* Update Elixir generator docs
* Improve typespec generation to avoid double ".t" issues
* Fix compilation warnings by changing reserved words to use suffix instead of underscore prefix
* Include additional reserved words and handle words with leading underscores
* Update samples and docs
* Uses dataType instead of baseType for non-struct types
* Generate elixir samples
* Fixes issue with AnyType in a list
* Generate elixir samples
* Removes normalizeTypeName for arrays as they correct by getTypeDeclaration
* CodeStyle
---------
Co-authored-by: Michael Ramstein <michael@ramste.in>
* Add enum support when building default values for model properties
* Update enum handling for Python for enum references
* Remove unused method
* Update mustaches for FastAPI, Pydantic, and Python for default values
* Address PR feedback and rebase main
* Remove old 2_0 samples
* Replace magic string "UTF-8" with StandardCharsets.UTF_8
This avoids an UnsupportedEncodingException by design.
* Remove unused UnsupportedCharsetException import
* Ensure temp directories are deleted after test execution
* Implement test that external $ref changes are reflected in checksum
* Generate hash checksum from actual resolved spec instead of inputSpec file
Otherwise regeneration will not happen when skipIfSpecIsUnchanged is enabled,
although formally the spec content has changed.
Fixes#4512 and #16489
* Use try-with-resources to ensure stream is closed properly on exit
* Fix deprecation warning on SimpleLocalRepositoryManagerFactory no-arg constructor
* Apply minor code cleanup
- use fluent setters where possible
- remove undocumented @throws from JavaDoc
- use List.of() instead of Arrays.asList() for single-element-collection
(more memory efficient)
- fix some grammar issues in comments and JavaDoc
* Use non-blocking java.nio API for file existence checks
* Make DryRunStatus path field final
* Add templateData capture functionality to DryRunTemplateManager
* Replace MockDefaultGenerator with DryRunTemplateManager captures
* Remove MockDefaultGenerator
* Implement dedicated transitional test for #18831 bugfix
* Remove duplicated database migration file from supportingFiles collection
* Activate AllGeneratorsTest.noDuplicateSupportingFiles
* Drop transitional test again
* Simplify truthy assertions
* Adds basic support for query params.
* Need to parameterize them
* Need to add tests
* Need to add option to skip, maybe
* Need to add support for header params too
* Parameterizes query param values
* Need to add tests
* Need to add option to skip, maybe
* Need to add support for header params too
* Remove extra empty line
* Adds support for header params
* Also fixes extra end of line bug.
* Fixing failing test
* Adding tests for query params
* Adding tests for header params
* Adding basic support for env file
* Add support for env file for path variables and custom header variables
* TODO : Add tests
* Adding tests for env generation
* Adding generated test files
* Fix namefile
* Implement regression test for bigDecimalAsString annotations
* Ensure @JsonSerialize and @JsonDeserialize is only generated when Jackson enabled
Fixes#6496
These are not used by any generator implementation, hence there's no
point in bundling them into every release we're shipping.
In case someday it is decided that a retrofit v1 generator will be needed
again, this commit can simply be reverted.
* Implement test for uniqueness of CliOptions across all generators
* Refactor existing test to use @DataProvider and fluent assertion
* Remove extraneous cliOption definition for disallowAdditionalPropertiesIfNotPresent
This is already defined (matching exactly in all aspects) in DefaultCodegen.
Resolves#18810
* Avoid variable declaration & assignment when only used once
* Add additional uniqueness tests for all DefaultCodegen List<> members
Test uniqueness for lists of:
- supportingFiles
- supportedLibraries
- supportedVendorExtensions
* Disable AllGeneratorsTest.noDuplicateSupportingFiles for the time being
Re-enable when #18831 is fixed
* Generate updated python-fastapi docs
* Partially revert "replace deprecated ISO8601Utils with StdDateFormat (#17052)"
This partially reverts commit 76560e34c9aacd9d7593ac45bd204e2edf38abd9, namely anything
related to generators and samples using GSON instead of Jackson.
Changes to Jackson-only generation and generator-online regarding RFC3339DateFormat
are not being reverted.
* Test for default serialization library fallback
* Convert repetitive tests to parameterized test
* Add regression test for #18515
* [FEIGN] Only include <jackson-databind-version> property in pom.xml when required
* [RETROFIT2] Only include jackson-databind in gradle file when actually required
* [FEIGN] Don't include jackson dep's in sbt file when GSON is selected
* [FEIGN] Don't include jackson dep's in gradle file when GSON is selected
* DRY refactor JavaClientCodegen test code, increase readability
- use fluent assertions
- use helper method newTempFolder()
- use Java 9 static factory methods for maps
- don't declare variables that are only used once
- group declarations and usages
- use non-blocking java.nio.file API wherever possible
* Regenerate samples
* Reactivate tests
Contrary to Junit5, classes containing TestNG tests need to have
public visibility, otherwise the tests will not be discovered and run.
* Reformat tests for readability
* Rewrite tests using fluent assertions
* Fix the bug + add test case
* Add sample output
* Update version number in new sample output
---------
Co-authored-by: Gerwin Jansen <gerwinjansen@users.noreply.github.com>
* Update springdoc-openapi-starter-* to v2.2.0 in gradle build
This brings it in sync with the maven pom. Brings swagger-annotations
version 2.2.15 as transitive dependency, implements the @Schema annotation
property `requiredMode`.
Hence fixes#14949
* Update kotlin-server samples
* Drop separate version property
Not required as all Jackson packages usually tether on a version bump.
* Update Jackson to v2.17.1
* Sync Jackson version used by Spring Boot with project version
* Sync jackson update to v2.17.1 with generator templates
* Regenerate samples with updated versions
* Adjust test to current exception msg behavior
* Add dependency mgmt to ensure matching version for transitive dependencies
* Update library descriptions with correct Jackson version number
* Update library descriptions with correct GSON and JSONB versions
* Update retrofit library description with correct version number
* Update retrofit description to include Jackson as an option
This should have been done as part of in #16853.
* Update remaining libary version descriptions with correct versions
* Generate updated doc
* [cpp-restsdk] add support for oneOf via std::variant
* [cpp-restsdk] detect the latest supported C++ standard in CMake
* [cpp-restsdk] add test with oneOf support for cpprest
* [cpp-restsdk] avoid warnings because of implicit this capture
* [cpp-restsdk] avoid deprecated CMake version warnings
* [cpp-restsdk] build the test into the build directory - parallel build
* [cpprest-sdk] use absolute source path for cmake + debug build
* fix: remove inheritance due to template not overriding
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
Solving this issue has for goal to reduce the amount of work required to resolve the [[C++] Error making the cpprestsdk generated files](https://github.com/OpenAPITools/openapi-generator/issues/6726)
and to put the `cpp-pistache-server` generator a the "same compilation problems" level than the `cpp-restsdk` generator in font of the #6726.
* Fix kotlin-spring not building when `interfaceOnly=true`
Fixes#18803
* Regenerate fixed kotlin-spring samples
* Include sample kotlin-springboot-request-cookie in CI build check
* Apply suggestions from code review
Co-authored-by: Stefan Koppier <stefan.koppier@outlook.com>
---------
Co-authored-by: Stefan Koppier <stefan.koppier@outlook.com>
* Specify exact relative path to parent pom.xml
* Remove org.reflections from the test stack
* Remove unused parameter
* Remove unused method
* Fix raw use of parameterized variable warning
* Use Files.readString instead of converting raw bytes
* Add test coverage for TestUtils.validatePomXmlFiles(List)
* Reimplement TestUtils.validatePomXmlFiles(List) with Jackson XML mapper
* Remove maven-rewrite dependency
* Revert "Revert back to junit4 (#18786)"
This reverts commit 2471ba2d2e96261941d21eb10648f3d70e969423.
* Make junit engine execute TestNG test cases
* Fix failing test and use tempDir's for test code generation
* Make test fail with helpful info in case generator throws exception
* Suppress error output from TestUtils
* Remove transitive junit4 dependency
* Sync guava-testlib version with guava version
* Add hint regarding alternative for guava-testlib's FakeTicker
* Mention that Golang generator also supports XML annotations
Looking at src/main/resources/go/model_simple.mustache and
src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
the GoLang seems to cater for withXml=true
* Fix maven plugin config description for `withXml`
* Add basic test for global withXml setting
* Use global withXml setting if not configured in ConfigOptions
Resolves#3839 and #5764
* Don't generate metadata or other files when only Models are tested
* Reformat table for readability
* Remove global property `withXml` from generator and docs
* Move WITH_XML constant out of system constants block
Currently there is only a single reference to this value in the whole
codebase (GoClientOptionsProvider). Maybe we should re-think how this
file is organised (i.e. provide a clearer split / mapping / understanding
what are system properties vs. global properties vs. configOptions and
where to put them).
* Remove global option `withXml` from Maven plugin (Breaking change)
This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes.
* Remove global property `withXml` from Gradle plugin (Breaking change)
This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes, so they can add it
to the `configOptions` map if required, or simply delete it
* Update samples to reflect removed `withXml` property
* Move `withXml` option into ConfigOptions for Java Microprofile sample
* Remove unused local vars and parameters
* Avoid repetition using fluent assertions
* Remove extraneous debug output
* moved service api into shared source
* moved service api into shared source
* This Scala cask change makes the service traits available to
Both JVM and JS platforms.
It does this by moving the api interfaces into the cross-platform
Shared sources
* Added authentication via Bearer-token api_key and basic for server and client
* Improved errorhandling
* Added check on oAuth audience to example
* Updates of the petstore files for Rust-server
* Moved module import to prevent issue in callbacks
* updated samples
* Fix for unused-qualifications issue
* updated sampmles
* Even with .nil? typecheck, compiler still fails due to .empty? call on nillable type. This appears a poor implementation issue by crystal-lang, but this explicit try avoids the issue for now.
* Made call more succinct.
* Fix tests for parsing of additional type annotations
These were comparing the same things with each other and this could
not fail. Now using (as probably intended by the author) the before
unused ArrayList for assertion of the expectation.
* Remove Exception from signature that is never thrown
* Simplify assertions using AssertJ
* Replace stub implementation with abstract Mockito mock
* Cache flat parsed openapi results for faster test execution
Simply caching any calls to TestUtils.parseFlattenSpec that occur
at least twice.
* Fix some "Raw use of parameterized class 'Schema'" warnings
* [kotlin] Target correct library in jvm-spring-webclient sample
* [kotlin] Fixed warning in jvm-spring-restclient
* [kotlin-wiremock] added generator and sample
* [kotlin-wiremock] First version with petstore
* [kotlin-wiremock] Small typo
* [kotlin-wiremock] Added echo-api test
* [kotlin-wiremock] Split stub and stub builder
* [kotlin-wiremock] Added default values and jackson annotations to models
* [kotlin-wiremock] Small default value fix
* [kotlin-wiremock] Use Gradle wrapper version in samples-kotlin-server GitHub workflow
* [kotlin-wiremock] Added default artifact name
* [kotlin-wiremock] Added kotlin docs
* [kotlin-wiremock] Fixed capitalization in kotlin docs
* [kotlin-wiremock] Added kotlin-wiremock echo_api sample to GitHub workflow
* [kotlin-wiremock] Added new generator to README.md
* [kotlin-wiremock] Generated docs
* [kotlin-wiremock] Generated docs (missed commit)
* [kotlin-wiremock] Explicit Gradle wrapper version in kotlin server generators
* Revert "[kotlin-wiremock] Explicit Gradle wrapper version in kotlin server generators"
This reverts commit 71e1c47def93fdcb9c7e4efe999fc34e21d7518c.
* [kotlin-wiremock] Revert Gradle in workflow samples-kotlin-server and moved kotlin-wiremock samples to separate workflow
* [kotlin-wiremock] Use Java 11 instead of Java 8
* [kotlin-wiremock] ensure-up-to-date
* Added support for <inputSpec/> arguments of JAR URLs.
E.g., jar:jar-specific-uri!/spec.yml.
* Resolve and search COMPILE dependencies for inputSpec resource.
* Added test cases for openapi-generator-maven-plugin:generate input
specifications:
* URLs of the form jar:jar-specific-uri!/spec.yaml
* Resources on the compilation classpath
in addition to the existing FILE test case.
* Check for inputSpecFile existence
else it is a remote URL && url is not empty
* replaced deprecated usage
* use Unix separators when on win-os
* example with jar inputSpec
* Comment not required anymore
Was introduced with #7587 could be removed with #10544
* referenced same maven version
these artifacts are referenced by same ${project.version} in https://github.com/apache/maven/blob/master/pom.xml
* updating maven dependencies to 3.9.6
---------
Co-authored-by: Allen D. Ball <ball@hcf.dev>
* Issue-18444: recursively trace variables and support of new option
* Issue-18444: suppoting inheritance, but interfaces
* Issue-18444: build project instructions executed
* code review from wing328: tab-spaces removed
* code review by wing328: added a line of comment for the private method
* custom types support in inheritance fix
* files changed after scripts run
* remove unused method
* move cloneSchema to ModelUtils
* imports
* changes after scripts run
* test cloning array of enums schema
- Handling `std::set` in cpp-restdsk
- Member variables using `std:set` added to `Pet` in cpp-restsdk 3.0 Petstore sample
[cpp-pistache-server] taking into account a remark on this issue about cpp-pistache-server and its set management
- Switching `std::vector` to `std::set` for openapi set type in cpp-pistache-server
* upgrade okhttp-gson and google-api-client to junit5
* add changes in StringUtilTest
* use https instead of http to fix 301 (moved) error
* revert petstore test server url to http://petstore.swagger.io and regenerate samples
* synced gradle/sbt/pom, re-generated samples
* revert removal of port 80 from test url
* udpate google api client tests
* update sha
* update comment
---------
Co-authored-by: Thorsten Hirsch <t.hirsch@web.de>
* Adds useJakartaEe condition to select the appropriate Jackson package to import.
This also removes the import on the apache-httpclient template where it doesn't actually get used, requiring users to declare additional dependencies for compilation that aren't actually required by the generated code other than for import.
* Ran generate-samples.sh
* Add support for Helidon 4 MP client and server generation
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
* Rerun samples generation trying to fix spring jobs
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
* Update copyright
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
* Correct the copyright notice
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
---------
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
* upgrade resteasy to junit5
* fix echo_api tests
* updated gradle/sbt/pom and generated samples with bin/generate-samples.sh
* fix xml syntax error
* forgot to run generate-samples.sh
* fix: Respect `disableValidator` CLI option
Setting the `disableValidator` option to `true` used to generate
validation code but avoid calling it from the route handlers.
This generated invalid code in some cases.
This commit renders the `server-operation-validate` only, when the
`disableValidator` option is set to false (the default value).
* test: Update examples and run integration test
The generated samples are updated with:
`./bin/generate-samples.sh ./bin/configs/manual/*.yaml`
The relevant integration test
`mvn integration-test -f samples/server/petstore/rust-axum/pom.xml`
passes.
* test: Add integration test
This integration tests provokes the generation of code that would
not compile (see #18580). The new change that makes sure validation
logic is not rendered when disabled, makes sure the faulty code is not
generated and therefore the project compiles.
* test: Update examples and run integration test
The generated samples are updated with:
`./bin/generate-samples.sh ./bin/configs/manual/*.yaml`
The relevant integration test
`mvn integration-test -f samples/server/petstore/rust-axum/pom.xml`
passes.
* fix: Fix uuid in header params causing errors
Routes with header parameters with a `format` of `uuid` in the openAPI
specification used to cause a compilation error in the resulting
Rust Axum code.
This commit fixes the issue by including the correct conversion trait
implementation on the condition that at least one header parameter of
`format` `uuid` is included in the specification.
* refactor: Add final to boolean
* fix: Bring str::FromStr optionally into scope
The trait needs to be in scope for the TryFrom implementation:
`TryFrom<HeaderValue> for IntoHeaderValue<uuid::Uuid> `
It will only be brought into scope when the implementation is rendered.
* test: Add integration test and its specification
This commit adds an integration test that tests the bug fix for #18554.
A header parameter of `format: uuid` is included in one route.
This makes the example create a route handler that tries to extract a
Rust `uuid::Uuid` type from the header. The integration test will check
that the generated code compiles.
* test: Update examples and run integration test
The generated samples are updated with:
`./bin/generate-samples.sh ./bin/configs/manual/*.yaml`
Most example projects have their version numbers bumped. Some changes
show, that there are some other unrelated changes to the files, which
indicates that some prior commit did not update the samples accordingly.
The relevant integration test
`mvn integration-test -f samples/server/petstore/rust-axum/pom.xml`
passes.
When components/schema/<object> reference other objects, validate() was
getting called on the referenced objects with no arguments. The return
value was void, but checked as if it was a boolean value.
* [Java/Microprofile] Add support for Jackson serialization & async interfaces using Mutiny in Java Microprofile library
* Regenerate samples & docs
* Add server generator
* Update client to set configKey by classname
* Remove debug remains and comments
* Adapt method override to upstream changes
* Regenerate samples
* Revert "Regenerate samples"
This reverts commit b5bcbdea90c71a2819a3ea6339c3878f249f97b4.
* Move additional 2xx response to dedicated OpenAPI document
Some other generators than those for Micronaut don't seem to be able to
handle this case, so we don't add it to the general pet store document.
* Make filename consistent with other files in the folder
* Regenerate Microprofile client and server samples
* Generate samples
* Update documentation
* Generate samples
* Remove left-over `*.orig` files from Git merges
* Regenerate samples
* Regenerated samples
* changed generator name to "java-microprofile"
* added the new folder to .github/workflows/samples-java-server-jdk8.yaml so that CI will test it moving forward
* Renamed JavaMicroprofileServerCodegen.java
* regenerated samples
* only enable configKeyFromClassName if configKey is not set
* Updated documentation
* Change samples to use junit 4
* Fix junit 4 test classes
* run ensure up-to-date script
* fix kotlin test errors
---------
Co-authored-by: pravussum <pravussum@users.noreply.github.com>
Co-authored-by: frank <frank.buechel@kiwigrid.com>
Co-authored-by: Oscar <oscar.obrien@kiwigrid.com>
Co-authored-by: oscarobr <133783370+oscarobr@users.noreply.github.com>
* Fix generation of remove method for map entries
Map::remove in java removes entries by key, therefore the key must be used as parameter.
* Fix generation of remove method for map entries
Map::remove in java removes entries by key, therefore the key must be used as parameter.
---------
Co-authored-by: Reinhard Handler <reinhard.handler@ssi-schaefer.com>
* refactor: move closure definition to own statement
A clippy lint recommends not using a closure inside of a statement.
The code generation used to produce code that triggered this warning,
which caused the rust-server integration test to fail because clippy is
configured to return lint violations as errors.
For details for the lint see:
https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
* refactor: Remove unnecessary qualification
A GitHub action test used to fail because of a clippy warning that was
emitted due to not using an imported symbol but qualifying its use.
A failed test can be seen here:
https://github.com/OpenAPITools/openapi-generator/actions/runs/8958257509/job/24603984954?pr=18563
With the relevant error being:
error: unnecessary qualification
--> output/openapi-v3/src/client/callbacks.rs:88:9
|
88 | futures::future::ok(Service::new(
This commit simply removes the qualification.
* test: Update examples and run integration test.
Updated examples by running
`./bin/generate-samples.sh ./bin/configs/rust-server-*`
The integration test with the following command passes:
`mvn integration-test -f samples/server/petstore/rust-server/pom.xml`
* [kotlin] Target correct library in jvm-spring-webclient sample
* [kotlin] Fixed warning in jvm-spring-restclient
* [kotlin-client] Bump Gradle version
* [kotlin-client] enableFeaturePreview no longer needed as it's enabled by default
* [kotlin-client] Bump kotlin, spotless, and reactor versions
* [kotlin-client] Generated code
* [kotlin-client] Missed a generated sample
* [kotlin-client] Bumped gradle and java version in kotlin-client workflows
* [kotlin-client] First attempt to fix jvm-volley
* [kotlin-client] Use standard gradle action instead of custom one
* [kotlin-client] Use original gradlew action but without specific version
* [kotlin-client] Moved sample kotlin-spring-cloud to servers instead of clients
* [kotlin-client] Added previously missing generated file
* [kotlin-client] Corrected sample path
* [BUG] [C++][Pistache] cpp-pistache-server generating API include undefined "Object.h" (#2769)
Should handle Object.h, AnyType.h correctly. Set.h also tested.
- #include Object.h removed and replaced by a typeMapping.put(object, nlohmann::json) like suggested in other issues
- object had an invalid syntax: ':' instead of '::' in types with namespace
- extra include of #include nlohmann/json.h removed when there's already #include <nlohmann/json.hpp>
- nlohmann::json is excluded from model namespace
Tested with custom petstore played, with suggested openapi specs coming from issues #2769, #10266, #14234
```bash
rm -rf samples/server/petstore/cpp-pistache-everything/ && ./bin/generate-samples.sh ./bin/configs/cpp-pistache-server-cpp-pistache-everything.yaml && cd samples/server/petstore/cpp-pistache-everything/ && mkdir build && cd build && cmake .. && cmake --build . --parallel
```
* - Adding to samples/server/petstore cpp-pistache-everything
* - .md and FILES missing
Using archive.org snapshots in case the URLs change again, like they
apparently have in the past.
Also fixing formal JavaDoc error, which does not allow bare URLs.
* feat (JAVA SPRING RESTTEMPLATE) 17571: initial commit for Spring RestClient
* feat (JAVA SPRING RESTTEMPLATE) 17571: Copied and changed the webclient mustache files
The RestClient API is oriented on the WebClient API so many parts of the templates can be the same
* fix (JAVA SPRING RESTTEMPLATE) 17571: Renaming error & add README template
The README must be changed because the minimal Java Version for this client is 17
* fix (JAVA SPRING RESTTEMPLATE) 17571: Imports, compile errors and cookie setting
* feat (JAVA SPRING RESTTEMPLATE) 17571: Add generated samples
* test (JAVA SPRING RESTTEMPLATE) 17571: Add tests
* feat (JAVA SPRING RESTTEMPLATE) 17571: Update doc
* Add the restcilent to samples-java-client-jdk17.yam
The minimum Java version of the used Spring Version is 17
* fix (JAVA SPRING RESTTEMPLATE) 17571: Workflow paths to petstore samples
* fix (JAVA SPRING RESTTEMPLATE) 17571: Regenerated samples
* feat (JAVA SPRING RESTTEMPLATE) 17571: Generated echo-api sample for RestClient
* fix (JAVA SPRING RESTTEMPLATE) 17571: Missing import
* fix (JAVA SPRING RESTTEMPLATE) 17571: Missing body class exception when null body is set
* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api Auth test
* fix (JAVA SPRING RESTTEMPLATE) 17571: Gradlew file permissions
* feat (JAVA SPRING RESTTEMPLATE) 17571: Reggenerate samples after rebase
* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api Body gif test
* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api octet stream body test
* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api multipart form data test
* fix (JAVA SPRING RESTTEMPLATE) 17571: Form as body when body is null
Also regenerated the restclient samples
* Update php.md - marked Multiserver as true
Mulitiserver support was fully implemented 2 years ago, on PR #12982
* update php feature
* update
---------
Co-authored-by: Thomas Hansen <thomasphansen@users.noreply.github.com>
Currently when a parsing rule of a field is not respected (eg: min/max
value, required, ...), the api only returns an error message without
providing the field name to help the user to fix the request. This commit
add the field name to the error message to help the user of the API.
* fix imports with go generation
* Wrong copy over
* Missing new line
* tab vs space
* Fix new line between router and std go libs
* Add both use case, add samples to CI validation
* Update samples
This allows users to use APIs that require booleans in query params not to be cast to int, e.g. `&foo=true`. Currently, `true` is cast to `1` so it's passed as `&foo=1`. That might not be supported by the target API.
The fix contains copy-pasted function from guzzlehttp/psr7 `Query::build()` with minor tweak.
* feat: change template to use useSingleRequestParameter
* chore: add useSingleRequestParameter option
* chore: generate-samples, docs and fix spacing in template
* chore: remove random white space
* Update Java version in Github actions
* Generate samples
* [java] Upgrade Gradle wrapper to 8.7
* Generate samples
* [Java] Add resttemplate-jakarta to CI
* Upgrade CI machines to ubuntu-2204:2024.04.4 which use Java 21
* Change CI machines to ubuntu-2204:2024.01.1 which use Java 17
* Change CI machines to ubuntu-2004:2024.01.1
* [ruby] Update Gemfile.locks
* Use gradle wrapper for samples-java-client-jdk17
* feat(go): Add a vendor extension to option out of generating the UnmarshalJSON method
* add generate unmarshal json option in go client generator
* update doc
---------
Co-authored-by: Radoslav Kotsev <radoslav.kotsev@cellpointmobile.com>
* [typescript-angular] Add support for marking model properties with @deprecated
* Add generated samples
* Only add comment if description or deprecated is set. And split description/deprecated on two lines if both are set.
* Update samples with generated output
* Fix indention
* Update samples
* Remove whitespace
* Update samples
* Add `ResumableTask` to `URLSessionImplementations.mustache`
- Makes it testable
- Implementations can return something _other_ than a URLSessionDataTask if they want to implement another request format (sockets maybe?)
- Default implementation for `URLSession` provided
* Regenerate examples
* Add more properties and rename to `CancelableResumableTask`
* Regen samples
* Rename missed reference
* Missed some generated classes somehow
* Rename from `CancellableResumableTask` to `URLSessionDataTaskProtocol`
Rename from `resumableTask` to `dataTaskFromProtocol`
---------
Co-authored-by: welshm-ideogram <welsh@Mikes-MacBook-Pro.local>
* feat: starts accepting async function for fetching access token in typescript-nestjs
* fix: adds Provider in the import to fix build error
* chore: deletes package lock
* chore: deletes package lock for v6
* fix: switches to switchMap for map
* fixOpenAPITools/openapi-generator#18060
* isolate the option as separate flag
* apply modification suggested by @wing328
* remove added newlines
* do not change the handle of multipart body, keep the change only for x-www-form-urlencoded
* delete samples
* rebuild samples
* test to see if the pr gate fails
* make the samples generate twice
* pr gate successfully failed
* minor cleanup
* minor cleanup
* feat(go): Generate compiling stubs for allOf with multiple refs and discriminator
* feat(go): Generate compiling stubs for allOf with multiple refs and discriminator
* feat(go): Generate compiling stubs for allOf with multiple refs and discriminator
Bump requirements
- add Symfony 7 support
- remove support php < 8.2 (EOL)
- remove symfony < 6.4 support
Bug Fix
- add missing $security{{name}} variable when using Bearer Auth
Misc
- getContentType method is deprecated; use getContentTypeFormat
- use match instead of switch for simple assignments
- remove default depth param from json_encode call
- make data provider static (phpunit)
* Update Python mustache templates to fix _form_ typo and correct casing for class name when calling from_dict()
* Results of 'build the project' checklist step
* Added solution for deprecated "UTTypeCopyPreferredTagWithClass"
UTTypeCopyPreferredTagWithClass is deprecated with iOS 15, so apps targeting iOS 15+ were getting this warning on any auto-generated code. This solution will solve that warning and works both iOS 15 and below.
* Project built
* macOS Related fixes applied
* fix issue 18271
* the same update for python-pydantic-v1
* add test
* update samples
* update samples
* put properties under allOf for python client tests
* update samples
* add a test in test model
* Map parameters now carry their container properties when generated from map properties. This solves an issue where a map parameter was not considered a container and induced generation errors.
* Added test specification with fake endpoint for testing map parameters
---------
Co-authored-by: Samuel Kahn <samuel@darewise.com>
* renamed OpenAPIClient-httpclient to Petstore
* updated bin artifacts
* renamed OpenAPIClientCoreAndNet47 to MultipleFrameworks
* updated bin artifacts
* renamed OpenAPIClient-net47 to Petstore
* renamed OpenAPIClient-net48 to Petstore
* updated bin artifacts
* renamed OpenAPIClient-restsharp-name-parameter-mappings to ParameterMappings
* updated bin artifacts
* renamed OpenAPIClientCore to Petstore
* updated bin artifacts
* renamed OpenAPIClient-net7.0-useDateTimeForDate to UseDateTimeForDate
* updated bin artifacts
* renamed OpenAPIClient-net5.0 to EnumMappings
* updated bin artifacts
* renamed OpenAPIClient-ConditionalSerialization to ConditionalSerialization
* updated bin artifacts
* renamed OpenAPIClient to Petstore
* updated bin artifacts
* renamed OpenAPIClient-unityWebRequest to Petstore
* updated bin artifacts
* updated appveyor
* updated bin artifacts
* updated bin artifacts
* comenting out a sample project with no csproj file
* updated bin artifacts
* Add java-jersey2 sample with mixed oneOf
* [java][jersey2]Fix client generation if oneOf contains an array type
Changes:
* Change jersey2/oneof_model template to use composed schema data
* Change adding of imports in AbstractJavaCodegen to use composed schema data
* Add escapedDataType property to CodegenProperty so that the data type
may be part of identifiers (e.g. in getters)
* Update samples
* Add sample for multiple array in oneOf
* Fix generation of constructors with same erasures
* Update samples again
* Version bump
* Add new sample folders to CI
* Make primitive handling more explicit
* Replace escapedDataType property with Mustache lambda
* Update samples with new primitive handling and sanitization lambda
* moved OpenAPIClient-generichost-net6.0
* moved OpenAPIClient-generichost-netcore-latest-allOf
* moved OpenAPIClient-generichost-netcore-latest-anyOf
* moved OpenAPIClient-generichost-netcore-latest-oneOf
* moved OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration
* moved OpenAPIClient-generichost-net6.0-nrt
* moved OpenAPIClient-generichost-net7.0-useDateTimeForDate
* moved OpenAPIClient-generichost-manual-tests
* moved OpenAPIClient-generichost-netstandard2.0
* moved OpenAPIClient-generichost-net6.0
* deleted abandoned files
* updated bin artifacts
* build samples
* updated workflow
* fix manual tests
* moved manual tests
* moved allOf
* moved anyOf
* moved oneOf
* moved OpenAPIClient-generichost-net6.0
* moved OpenAPIClient-generichost-net6.0-nrt
* moved OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration
* moved OpenAPIClient-generichost-net7.0-useDateTimeForDate
* moved OpenAPIClient-generichost-netstandard2.0
* moved OpenAPIClient
* moved OpenAPIClient-ConditionalSerialization
* moved OpenAPIClient-httpclient
* moved OpenAPIClient-net5.0
* moved OpenAPIClient-net7.0-useDateTimeForDate
* moved OpenAPIClient-net47
* moved OpenAPIClient-net48
* moved OpenAPIClient-restsharp-name-parameter-mappings
* moved OpenAPIClient-unityWebRequest
* moved OpenAPIClientCore
* moved OpenAPIClientCoreAndNet47
* renamed standard2 to standard2.0
* renamed standard2 to standard2.0
* fixed workflows
* renamed workflows
* updated bin artifacts
* updated bin artifacts
* pinned the samples to their version
* renamed bin artifacts
* update bin artifact
* update bin artifact
* update bin artifact
* updated appveyor
* reverting changes bc git does not show the rename
* commiting all but the file rename for these two files
A misplaced parenthesis let to a syntax error when generating the code for a nullable set in the FromJSONTyped function. By moving the parenthesis to the correct place the syntax error was resolved.
* #18058 Fix AbstractJavaCodegen.getAccepts() so it returns a String array instead of a comma-separated string, and fixed api.mustache so the @RequestMapping annotation generated produces for x-accepts as a parameter list instead of a (single) string.
* #18058 Updated test case to accept a string array instead of a comma-separated list.
* #18058 Reverted changes on imported compared to the main branch.
* #18058 getAccepts() is now hybrid, and can return both a single String or a String[].
* #18058 Rolled back the hybrid getAccepts(), so it only returns a String array.
* #18058 Updated mustache files to cope with vendorExtensions.x-accepts being a string array instead of a comma-separated string.
* #18058 Generated new sample files with by running `./bin/generate-samples.sh ./bin/configs/*.yaml`
* #18058 Optimization of getAccepts()
* #18058 Regenerated scripts that got broken after resolving conflicts on GitHub
* #18058 Fixed introduced issue with api.mustache causing a redundant accept with @HttpExchange with the PetApi.java, StoreApi.java, and UserApi.java.
* Skip post processing when generating JAXRS spec with Kotlin
This feature was previously added to work with the javalin5 library
* Add sample that proves what we expect after fixing this
* Update sample
* Added new samples to samples workflow
* Revert from jdk17 pipeline
* fix-for-bug-16086
* add to_dict alternative
* fix assertEqual
* remove extra blank line + test_model Argument SecretStr set
* update samples / remove extra blank line
* restore sanitize test for serialization with different data types
* remove empty line in api_client.mustache
* remove 2nd empty line in api_client.mustache
* fix: jersey3 library
fix issue that library failed in case pattern matching was used in
the api.
* add tests, update version
* update
* fix tag
* fix, update samples
* update build
* more update
* update workflow
* test useJakarta
---------
Co-authored-by: holomekc <30546982+holomekc@users.noreply.github.com>
* fix: Fix schema generation for `oneOf` when using TS-FETCH client
This fixes the following errors:
* Spread types may only be created from object types (on `FromJSONTyped` functions).
* Module '"./BlankEnum"' has no exported member 'instanceOfBlankEnum' (enum templaces don't export function used by other API client files).
* chore: Regenerate samples
* add direct invocation methods for java (httpclient)
* add direct invocation methods for java (resttemplate)
* handle methods only if endpoints exist for api client
* preserve previous newline to minimize changes
* update httpclient/resttemplate samples
* add common methods in base class
* regenerate samples with base class
* changed files from rebuilding project and updating samples
* change default value of from_encoding to empty string
- from_encoding = NULL is invalid and produces an error, as only strings are allowed, see https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/iconv
- defaulting to an empty string fixes this issue
* fix map being surrounded by quotes in json
* allow httr2 client to deal with empty response body
* changed files from rebuilding project and updating samples
* added PetMap schema for test of correct map serialization in toJSONString and regenerated samples
- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))?
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
- [ ] Have you searched for related issues/PRs?
- [ ] Have you searched for related issues/PRs?
- [ ] What's the actual output vs expected output?
- [ ] What's the actual output vs expected output?
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
Commit all changed files.
Commit all changed files.
@ -17,5 +17,5 @@
These must match the expectations made by your contribution.
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*`.
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.
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.1.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming `7.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
@ -31,7 +31,7 @@ Please file the pull request against the correct branch, e.g. `master` for non-b
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
### Templates
### Templates
@ -84,6 +84,26 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
- For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.
- For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.
### Building
The `openapi-generator-cli` can be built using the following command. This will generate the `openapi-generator-cli.jar` in the `modules/openapi-generator-cli/target` directory without running the tests and generating the Javadocs.
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help
```
### Testing
### Testing
To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
@ -112,5 +132,5 @@ See [OpenAPI Tools wiki](https://github.com/OpenAPITools/openapi-generator/wiki/
- File a PR with meaningful title, description and commit messages
- File a PR with meaningful title, description and commit messages
- Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
- Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
- Recommended git settings
- Recommended git settings
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
[](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g)
[](https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA)
[](https://twitter.com/oas_generator)
[](https://twitter.com/oas_generator)
[](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator)
[](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator)
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
@ -81,13 +87,13 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page.
For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page.
For decomissioned generators/libraries/frameworks, please refer to [the "Decommission" label](https://github.com/OpenAPITools/openapi-generator/issues?q=label%3ADecommission+is%3Amerged+) in the pull request page.
For decommissioned generators/libraries/frameworks, please refer to [the "Decommission" label](https://github.com/OpenAPITools/openapi-generator/issues?q=label%3ADecommission+is%3Amerged+) in the pull request page.
## [1.2 - Artifacts on Maven Central](#table-of-contents)
## [1.2 - Artifacts on Maven Central](#table-of-contents)
@ -189,16 +196,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
<!-- RELEASE_VERSION -->
<!-- RELEASE_VERSION -->
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.4.0/openapi-generator-cli-7.4.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.13.0/openapi-generator-cli-7.13.0.jar`
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
You can use [locally built JARs](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-locally-built-jar) or [`SNAPSHOT` versions](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-nightly-snapshot-build) as well.
### [1.8 - pip](#table-of-contents)
> **Platform(s)**: Linux, macOS, Windows
**Install** via [PyPI](https://pypi.org/) (`java` executable is needed to run):
```
pip install openapi-generator-cli
```
To install a specific version
```
pip install openapi-generator-cli==7.13.0
```
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml), please run the following
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml), please run the following
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
<!-- RELEASE_VERSION -->
<!-- RELEASE_VERSION -->
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar)
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.13.0/openapi-generator-cli-7.13.0.jar)
<!-- /RELEASE_VERSION -->
<!-- /RELEASE_VERSION -->
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@ -573,9 +606,9 @@ Please refer to [online.md](docs/online.md) on how to run and use the `openapi-g
### [3.4 - License information on Generated Code](#table-of-contents)
### [3.4 - License information on Generated Code](#table-of-contents)
The OpenAPI Generator project is intended as a benefit for users of the Open API Specification. The project itself has the [License](#license) as specified. In addition, please understand the following points:
The OpenAPI Generator project is intended as a benefit for users of the Open API Specification. The project itself has the [License](#7---license) as specified. In addition, please understand the following points:
* The templates included with this project are subject to the [License](#license).
* The templates included with this project are subject to the [License](#7---license).
* Generated code is intentionally _not_ subject to the parent project license
* Generated code is intentionally _not_ subject to the parent project license
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
@ -596,8 +629,10 @@ Here is a list of community-contributed IDE plug-ins that integrate with OpenAPI
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
@ -904,6 +943,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2022-04-06 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/openapi-generator) by Ajil Oommen (Senior Flutter Developer)
- 2022-04-06 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/openapi-generator) by Ajil Oommen (Senior Flutter Developer)
- 2022-05-13 - [A Path From an API To Client Libraries](https://www.youtube.com/watch?v=XC8oVn_efTw) by [Filip Srnec](https://www.devoxx.co.uk/talk/?id=11211) at Infobip
- 2022-05-13 - [A Path From an API To Client Libraries](https://www.youtube.com/watch?v=XC8oVn_efTw) by [Filip Srnec](https://www.devoxx.co.uk/talk/?id=11211) at Infobip
- 2022-06-01 - [API First, using OpenAPI and Spring Boot](https://medium.com/xgeeks/api-first-using-openapi-and-spring-boot-2602c04bb0d3) by [Micael Estrázulas Vianna](https://estrazulas.medium.com/)
- 2022-06-01 - [API First, using OpenAPI and Spring Boot](https://medium.com/xgeeks/api-first-using-openapi-and-spring-boot-2602c04bb0d3) by [Micael Estrázulas Vianna](https://estrazulas.medium.com/)
- 2022-06-10 - [Autogenerating Clients with FastAPI and Github Actions](https://www.propelauth.com/post/autogenerating-clients-with-fastapi-and-github-actions) by [Andrew Israel](https://www.propelauth.com/author/andrew)
- 2022-06-12 - [Mustache templates with OpenAPI specs](https://medium.com/geekculture/mustache-templates-with-openapi-specs-f24711c67dec) by [Beppe Catanese](https://github.com/gcatanese)
- 2022-06-12 - [Mustache templates with OpenAPI specs](https://medium.com/geekculture/mustache-templates-with-openapi-specs-f24711c67dec) by [Beppe Catanese](https://github.com/gcatanese)
- 2022-07-01 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/)
- 2022-07-01 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/)
- 2022-07-22 - [使用OpenAPI Generator Maven plugin开发api优先的java客户端和服务端代码](https://blog.roccoshi.top/2022/java/openapi-generator%E7%9A%84%E4%BD%BF%E7%94%A8/) by [Lincest](https://github.com/Lincest)
- 2022-07-22 - [使用OpenAPI Generator Maven plugin开发api优先的java客户端和服务端代码](https://blog.roccoshi.top/2022/java/openapi-generator%E7%9A%84%E4%BD%BF%E7%94%A8/) by [Lincest](https://github.com/Lincest)
@ -927,12 +967,22 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2023-06-28 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/)
- 2023-06-28 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/)
- 2023-06-30 - [Generate Client SDKs with OpenApi Generator in Springboot](https://medium.com/@ramavathvinayak/generate-client-sdks-with-openapi-generator-in-springboot-f9f012e73c0b) by [Vinayak Ramavath](https://medium.com/@ramavathvinayak)
- 2023-06-30 - [Generate Client SDKs with OpenApi Generator in Springboot](https://medium.com/@ramavathvinayak/generate-client-sdks-with-openapi-generator-in-springboot-f9f012e73c0b) by [Vinayak Ramavath](https://medium.com/@ramavathvinayak)
- 2023-12-10 - [UnityでOpenAPI Generatorを使う](https://www.youtube.com/watch?v=CbNwKVV5LRM) by [Soup Tori](https://www.youtube.com/@souptori8417)
- 2023-12-10 - [UnityでOpenAPI Generatorを使う](https://www.youtube.com/watch?v=CbNwKVV5LRM) by [Soup Tori](https://www.youtube.com/@souptori8417)
- 2024-01-24 - [Comment générer des stubs wiremock avec openapi generator](https://www.youtube.com/watch?v=0jhONfBrcKw) by [Alexis Couvreur](https://github.com/acouvreur)
- 2024-03-04 - [Generating TypeScript Types with OpenAPI for REST API Consumption](https://www.pullrequest.com/blog/generating-typescript-types-with-openapi-for-rest-api-consumption/) by [PullRequest](https://www.pullrequest.com/)
- 2024-03-07 - [Fully typed Web Apps with OpenAPI (Part 1)](https://medium.com/@gfox1984/fully-typed-web-apps-with-openapi-part-1-595d55766670) by [Guillaume Renard](https://medium.com/@gfox1984)
- 2024-03-08 - [Laravel OpenAPIによる "辛くない" スキーマ駆動開発](https://fortee.jp/phperkaigi-2024/proposal/9e2e6c38-d078-4efa-99b4-83ebf9033b34) by [KentarouTakeda](https://twitter.com/KentarouTakeda)
- 2024-04-04 - [Working with OpenAPI using Rust](https://www.shuttle.dev/blog/2024/04/04/using-openapi-rust) by [Joshua Mo](https://twitter.com/joshmo_dev)
- 2024-04-08 - [Implement API first strategy with OpenAPI generator plugin](https://medium.com/javarevisited/implement-api-first-strategy-with-openapi-generator-plugin-e4bbe7f0d778) by [Rui Zhou](https://medium.com/@wirelesser)
- 2024-05-06 - [OpenAPI Generator Custom Templates](https://www.javacodegeeks.com/openapi-generator-custom-templates.html) by [Mary Zheng](https://www.javacodegeeks.com/author/mary-zheng)
- 2025-02-09 - [Custom validation with OpenApiGenerator and Spring Boot 3](https://medium.com/@jugurtha.aitoufella/custom-validation-with-openapigenerator-and-spring-boot-3-34a656e815c8) by [Jugurtha Aitoufella](https://medium.com/@jugurtha.aitoufella)
- 2025-02-20 - [Optimizing API Integration in a Large React Application Using OpenAPI Generator](https://www.youtube.com/watch?v=-B33pQnGQUI) by Stefano Marzo
## [6 - About Us](#table-of-contents)
## [6 - About Us](#table-of-contents)
What's the design philosophy or principle behind OpenAPI Generator?
What's the design philosophy or principle behind OpenAPI Generator?
We focus on developer experience. The generators should produce code, config, documentation, and more that are easily understandable and consumable by users. We focused on simple use cases to start with (bottom-up approach). Since then the project and the community have grown a lot: 300k weekly downloads via NPM CLI wrapper, 20M downloads via openapi-generator-cli docker image just to highlight a few. We've gradually supported more features (e.g. oneOf, anyOf introduced in OpenAPI 3.0) in various generators and we will continue this approach to deliver something based on our understanding of user demand and what they want, and continue to add support of new features introduced in OpenAPI specification (such as v3.1 and future versions of the OpenAPI specification).
We focus on developer experience. The generators should produce code, config, documentation, and more that are easily understandable and consumable by users. We focused on simple use cases to start with (bottom-up approach). Since then the project and the community have grown a lot: 600k weekly downloads via NPM CLI wrapper, 30M downloads via openapi-generator-cli docker image just to highlight a few. We've gradually supported more features (e.g. oneOf, anyOf introduced in OpenAPI 3.0) in various generators and we will continue this approach to deliver something based on our understanding of user demand and what they want, and continue to add support of new features introduced in OpenAPI specification (such as v3.1 and future versions of the OpenAPI specification).
- dotnet test samples\client\petstore\csharp\generichost\latest\Tags\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\OpenAPIClientCoreAndNet47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\latest\HelloWorld\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test c# API client (httpclient)
- dotnet test samples\client\petstore\csharp\OpenAPIClient-httpclient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test c# API client (generichost)
- dotnet test samples\client\petstore\csharp\generichost\net9\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\OpenAPIClient-generichost-netstandard2.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test c# API client (netcore)
- dotnet test samples\client\petstore\csharp\generichost\net9\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# - dotnet test samples\client\petstore\csharp\generichost\net9\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
#- dotnet test samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# - dotnet test samples\client\petstore\csharp\generichost\net9\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
# test C# API client (.net framework 4.7)
- dotnet test samples\client\petstore\csharp\generichost\net9\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\OpenAPIClient-net47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test C# API client (.net framework 4.8)
- dotnet test samples\client\petstore\csharp\generichost\net9\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\OpenAPIClient-net48\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test C# API client (.net 5.0)
- dotnet test samples\client\petstore\csharp\generichost\net9\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\OpenAPIClient-net5.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test C# API Client using conditional-serialization
- dotnet test samples\client\petstore\csharp\generichost\net8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\httpclient\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\MultipleFrameworks\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
### TODO: Execute all generators via powershell or other
### TODO: Execute all generators via powershell or other
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.