* 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.
- [ ] 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?
[](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-2uoef5v0g-XGwo8~2oJ3EoziDSO1CmdQ)
[](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
@ -106,6 +108,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
- [1.5 - Homebrew](#15---homebrew)
- [1.5 - Homebrew](#15---homebrew)
- [1.6 - Docker](#16---docker)
- [1.6 - Docker](#16---docker)
- [1.7 - NPM](#17---npm)
- [1.7 - NPM](#17---npm)
- [1.8 - pip](#18---pip)
- [2 - Getting Started](#2---getting-started)
- [2 - Getting Started](#2---getting-started)
- [3 - Usage](#3---usage)
- [3 - Usage](#3---usage)
- [3.1 - Customization](#31---customization)
- [3.1 - Customization](#31---customization)
@ -129,8 +132,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| OpenAPI Generator Version | Release Date | Notes |
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)
@ -193,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.10.0/openapi-generator-cli-7.10.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.
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.10.0/openapi-generator-cli-7.10.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 -->
<!-- /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`
@ -606,6 +632,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
@ -944,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-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-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-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)
@ -1107,10 +1140,12 @@ Here is a list of template creators:
* Kotlin (Spring Boot): @dr4ke616
* Kotlin (Spring Boot): @dr4ke616
* Kotlin (Vertx): @Wooyme
* Kotlin (Vertx): @Wooyme
* Kotlin (JAX-RS): @anttileppa
* Kotlin (JAX-RS): @anttileppa
* Kotlin Misk: @andrewwilsonnew@guiarn
* Kotlin WireMock: @stefankoppier
* Kotlin WireMock: @stefankoppier
* NodeJS Express: @YishTish
* NodeJS Express: @YishTish
* PHP Flight: @daniel-sc
* PHP Flight: @daniel-sc
* PHP Laravel: @renepardon
* PHP Laravel: @renepardon
* PHP Laravel (refactor in 7.12.0): @gijs-blanken
* PHP Lumen: @abcsun
* PHP Lumen: @abcsun
* PHP Mezzio (with Path Handler): @Articus
* PHP Mezzio (with Path Handler): @Articus
* PHP Slim: @jfastnacht
* PHP Slim: @jfastnacht
@ -1121,6 +1156,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\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\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\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\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.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\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\net8\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\net8\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\net8\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\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\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
- 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.