* 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
- [ ] 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 searched for related issues/PRs?
- [ ] 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.
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
[](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://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
@ -87,7 +89,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
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)
@ -194,16 +196,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
<!-- 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):
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.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.
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
(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 -->
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.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 -->
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@ -607,6 +632,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
@ -943,6 +971,12 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 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)
@ -996,6 +1030,7 @@ Here is a list of template creators:
- dotnet test samples\client\petstore\csharp\generichost\latest\Tags\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
- dotnet test samples\client\petstore\csharp\generichost\net9\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AnyOf\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
- dotnet test samples\client\petstore\csharp\generichost\net9\FormModels\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\generichost\net9\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\NullReferenceTypes\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
- dotnet test samples\client\petstore\csharp\generichost\net9\Petstore\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
- dotnet test samples\client\petstore\csharp\generichost\net9\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AllOf\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
@ -78,10 +93,10 @@ test_script:
- 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\net6\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\UseDateTimeForDate\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
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.