mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-04-26 11:44:11 +00:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 48ef1e6cf1 | |||
| 12e29e4eeb | |||
| ba5ecbccde | |||
| 52b5b8fb76 | |||
| 387fd9986c | |||
| f603f04bc4 | |||
| 8035da8639 | |||
| 6ba311e85c | |||
| b2507777e6 | |||
| f406f78978 | |||
| 05d4aa9f62 | |||
| 8a07557865 | |||
| ee15594da7 | |||
| b582764d99 | |||
| 71ccc88037 | |||
| 0183620854 | |||
| 4a6dbace73 | |||
| e131d52ad0 | |||
| b3d172a44f | |||
| 24cb797a58 | |||
| c37a5e771f | |||
| 3915e020cf | |||
| 423ba6739a | |||
| cf78f1028d | |||
| 26609e9ad3 | |||
| 25d780ee6d | |||
| b9f6fe6b1f | |||
| 06f0b68eee | |||
| 1eaa75bd36 | |||
| 88be078c68 | |||
| 3f6c3de029 | |||
| 878148e66d | |||
| 2aa49227b0 | |||
| 706c0a177e | |||
| 711e53a90c | |||
| 34bd02109e | |||
| 326f100f0e | |||
| 25cfac0523 | |||
| e3e06af5f4 | |||
| 037cb12f34 | |||
| f8ca36b97e | |||
| 47665aaa97 | |||
| 8a94fc667e | |||
| 705261978d | |||
| 7b35613cfc | |||
| 7072009ab5 | |||
| 19e21416ed | |||
| ed211050f1 | |||
| 55f02e995b | |||
| af89ed8043 | |||
| a7cacce30e | |||
| 4c5a57fe7b | |||
| 8ce332a540 | |||
| cdafa5a0cc | |||
| 5ae8c03e6f | |||
| 6399a7a97e | |||
| c33d3aaae9 | |||
| c831983866 | |||
| 093a51ee21 | |||
| 1ba18a09a1 | |||
| 23aa2e2cb2 | |||
| 2b891f6da9 | |||
| c06db15750 | |||
| 18b01ca455 | |||
| 654f62ce3c |
@@ -5,10 +5,12 @@ on:
|
||||
paths:
|
||||
- 'samples/client/petstore/c/**'
|
||||
- 'samples/client/petstore/c-useJsonUnformatted/**'
|
||||
- 'samples/client/others/c/bearerAuth/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/c/**'
|
||||
- 'samples/client/petstore/c-useJsonUnformatted/**'
|
||||
- 'samples/client/others/c/bearerAuth/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -20,6 +22,7 @@ jobs:
|
||||
sample:
|
||||
- 'samples/client/petstore/c/'
|
||||
- 'samples/client/petstore/c-useJsonUnformatted/'
|
||||
- 'samples/client/others/c/bearerAuth/'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -3,10 +3,12 @@ name: Samples Elm
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/samples-elm.yaml
|
||||
- samples/client/petstore/elm/**
|
||||
- samples/openapi3/client/elm/**
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/samples-elm.yaml
|
||||
- samples/client/petstore/elm/**
|
||||
- samples/openapi3/client/elm/**
|
||||
jobs:
|
||||
@@ -32,4 +34,4 @@ jobs:
|
||||
# An .elm file couldn't be compiled
|
||||
# No .elm files were found
|
||||
# No elm.json file could be found in the root of the working directory
|
||||
run: elm make $(find . -name *.elm) --output=/dev/null
|
||||
run: elm make $(find . -name "*.elm") --output=/dev/null
|
||||
|
||||
@@ -16,6 +16,11 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php:
|
||||
- "8.1"
|
||||
- "8.2"
|
||||
- "8.3"
|
||||
- "8.4"
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/
|
||||
@@ -25,7 +30,7 @@ jobs:
|
||||
- name: Setup PHP with tools
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.1'
|
||||
php-version: "${{ matrix.php }}"
|
||||
tools: php-cs-fixer, phpunit
|
||||
- name: composer install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
|
||||
@@ -80,6 +80,7 @@ elif [ "$NODE_INDEX" = "3" ]; then
|
||||
(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v17-provided-in-root && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v18-provided-in-root && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v19-provided-in-root && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.10.0`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.11.0`):
|
||||
[](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
|
||||
@@ -87,7 +87,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
|
||||
|
||||
| | Languages/Frameworks |
|
||||
| -------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, Spring 6 RestClient, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x, 6.x), **Typescript** (AngularJS, Angular (9.x - 18.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
|
||||
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, Spring 6 RestClient, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x, 6.x), **Typescript** (AngularJS, Angular (9.x - 19.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
|
||||
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
|
||||
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
|
||||
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
|
||||
@@ -129,9 +129,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
| OpenAPI Generator Version | Release Date | Notes |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| 7.10.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.10.0-SNAPSHOT/) | 07.11.2024 | Minor release with breaking changes (with fallback) |
|
||||
| [7.9.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.9.0) (latest stable release) | 07.10.2024 | Minor release with breaking changes (with fallback) |
|
||||
| [7.8.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.8.0) (latest stable release) | 19.08.2024 | Minor release with breaking changes (with fallback) |
|
||||
| 7.11.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.11.0-SNAPSHOT/) | 20.12.2024 | Minor release with breaking changes (with fallback) |
|
||||
| [7.10.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.10.0) (latest stable release) | 18.11.2024 | Minor release with breaking changes (with fallback) |
|
||||
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
|
||||
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
|
||||
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
|
||||
@@ -194,16 +193,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.10.0/openapi-generator-cli-7.10.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.10.0/openapi-generator-cli-7.10.0.jar -O openapi-generator-cli.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.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.10.0/openapi-generator-cli-7.10.0.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -438,7 +437,7 @@ openapi-generator-cli version
|
||||
To use a specific version of "openapi-generator-cli"
|
||||
|
||||
```sh
|
||||
openapi-generator-cli version-manager set 7.9.0
|
||||
openapi-generator-cli version-manager set 7.10.0
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -465,7 +464,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
||||
(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.10.0/openapi-generator-cli-7.10.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`
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
generatorName: c
|
||||
outputDir: samples/client/others/c/bearerAuth
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/c/bearer_auth.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/C-libcurl
|
||||
@@ -1,6 +1,6 @@
|
||||
generatorName: elixir
|
||||
outputDir: samples/client/petstore/elixir
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/elixir/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/elixir
|
||||
additionalProperties:
|
||||
invokerPackage: OpenapiPetstore
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-jackson
|
||||
library: microprofile
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
serializationLibrary: jackson
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0
|
||||
library: microprofile
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: microprofile-rest-client-3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/microprofile-rest-client
|
||||
library: microprofile
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: microprofile-rest-client
|
||||
|
||||
@@ -15,5 +15,6 @@ additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
enumPropertyNaming: legacy
|
||||
openapiNormalizer:
|
||||
FIX_DUPLICATED_OPERATIONID: true
|
||||
|
||||
@@ -8,3 +8,4 @@ additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
supportStreaming: true
|
||||
serializableModel: true
|
||||
enumPropertyNaming: legacy
|
||||
|
||||
@@ -5,6 +5,7 @@ templateDir: modules/openapi-generator/src/main/resources/swift5
|
||||
generateAliasAsModel: true
|
||||
additionalProperties:
|
||||
podAuthors: ""
|
||||
identifiableModels: false
|
||||
podSummary: PetstoreClient
|
||||
objcCompatible: true
|
||||
projectName: PetstoreClient
|
||||
|
||||
@@ -6,6 +6,7 @@ generateAliasAsModel: true
|
||||
additionalProperties:
|
||||
responseAs: ObjcBlock
|
||||
podAuthors: ""
|
||||
identifiableModels: false
|
||||
podSummary: PetstoreClient
|
||||
objcCompatible: true
|
||||
projectName: PetstoreClient
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v19-with-angular-dependency-params/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 19.0.1
|
||||
npmName: sample-angular-19-0-0-with-angular-dependency-params
|
||||
supportsES6: true
|
||||
tsVersion: 5.6.3
|
||||
zonejsVersion: 0.15.0
|
||||
ngPackagrVersion: 19.0.1
|
||||
rxjsVersion: 6.5.3
|
||||
@@ -0,0 +1,8 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v19/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 19.0.0
|
||||
npmName: sample-angular-19-0-0
|
||||
supportsES6: true
|
||||
@@ -0,0 +1,6 @@
|
||||
generatorName: typescript-nestjs
|
||||
outputDir: samples/client/petstore/typescript-nestjs/builds/reservedParamNames
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/typescript-nestjs/reserved-param-names.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-nestjs
|
||||
additionalProperties:
|
||||
"useSingleRequestParameter" : true
|
||||
+1
-1
@@ -5,7 +5,7 @@ title: "FAQ: General"
|
||||
|
||||
## Do you have a chat room?
|
||||
|
||||
[](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g)
|
||||
[](https://join.slack.com/t/openapi-generator/shared_invite/zt-2uoef5v0g-XGwo8~2oJ3EoziDSO1CmdQ)
|
||||
|
||||
## What is the governance structure of the OpenAPI Generator project?
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -51,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -54,6 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**source**</dt><dd>Publish the original input OpenAPI specification.</dd><dt>**springfox**</dt><dd>Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.</dd><dt>**springdoc**</dt><dd>Generate an OpenAPI 3 specification using SpringDoc.</dd></dl>|springdoc|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -71,7 +72,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|fullProject|If set to true, it will generate all files; if set to false, it will only generate API files. If unspecified, the behavior depends on whether a project exists or not: if it does not, same as true; if it does, same as false. Note that test files are never overwritten.| ||
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
@@ -52,7 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.client.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|
||||
@@ -35,6 +35,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|fullProject|If set to true, it will generate all files; if set to false, it will only generate API files. If unspecified, the behavior depends on whether a project exists or not: if it does not, same as true; if it does, same as false. Note that test files are never overwritten.| ||
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
@@ -52,7 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.server.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|performBeanValidation|Perform BeanValidation| |false|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -53,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -11,7 +11,7 @@ title: Documentation for the java-micronaut-client Generator
|
||||
| generator type | CLIENT | |
|
||||
| generator language | Java | |
|
||||
| generator default templating engine | mustache | |
|
||||
| helpTxt | Generates a Java Micronaut Client. | |
|
||||
| helpTxt | Generates a Java Micronaut Client. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi. | |
|
||||
|
||||
## CONFIG OPTIONS
|
||||
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
|
||||
@@ -49,6 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -65,7 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -11,7 +11,7 @@ title: Documentation for the java-micronaut-server Generator
|
||||
| generator type | SERVER | |
|
||||
| generator language | Java | |
|
||||
| generator default templating engine | mustache | |
|
||||
| helpTxt | Generates a Java Micronaut Server. | |
|
||||
| helpTxt | Generates a Java Micronaut Server. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi. | |
|
||||
|
||||
## CONFIG OPTIONS
|
||||
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
|
||||
@@ -44,6 +44,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -63,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -47,6 +47,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**source**</dt><dd>Publish the original input OpenAPI specification.</dd></dl>|source|
|
||||
|dynamicOperations|Generate operations dynamically at runtime from an OAS| |false|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|errorObjectType|Error Object type. (This option is for okhttp-gson only)| |null|
|
||||
|failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false|
|
||||
@@ -68,7 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null|
|
||||
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
|
||||
|modelPackage|package for generated models| |org.openapitools.client.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -55,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|eurekaUri|Eureka URI| |null|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
@@ -55,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |com.prokarma.pkmst.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -43,6 +43,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -57,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |apimodels|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -53,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |null|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -53,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -53,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.server.api.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -53,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |null|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -47,6 +47,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**source**</dt><dd>Publish the original input OpenAPI specification.</dd></dl>|source|
|
||||
|dynamicOperations|Generate operations dynamically at runtime from an OAS| |false|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|errorObjectType|Error Object type. (This option is for okhttp-gson only)| |null|
|
||||
|failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false|
|
||||
@@ -68,7 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null|
|
||||
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
|
||||
|modelPackage|package for generated models| |org.openapitools.client.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -57,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -53,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -61,7 +62,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|loadTestDataFromFile|Load test data from a generated JSON file| |false|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -59,7 +60,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -55,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -55,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -55,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -57,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -27,7 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |original|
|
||||
|explicitApi|Generates code with explicit access modifiers to comply with Kotlin Explicit API Mode.| |false|
|
||||
|failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false|
|
||||
|generateOneOfAnyOfWrappers|Generate oneOf, anyOf schemas as wrappers.| |false|
|
||||
|generateOneOfAnyOfWrappers|Generate oneOf, anyOf schemas as wrappers. Only `jvm-retrofit2`(library), `gson`(serializationLibrary) support this option.| |false|
|
||||
|generateRoomModels|Generate Android Room database models in addition to API models (JVM Volley library only)| |false|
|
||||
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|
||||
|idea|Add IntellJ Idea plugin and mark Kotlin main and test folders as source folders.| |false|
|
||||
|
||||
@@ -47,6 +47,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**source**</dt><dd>Publish the original input OpenAPI specification.</dd><dt>**springfox**</dt><dd>Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.</dd><dt>**springdoc**</dt><dd>Generate an OpenAPI 3 specification using SpringDoc.</dd></dl>|springdoc|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE' and 'legacy'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
@@ -64,7 +65,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|
||||
@@ -26,6 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|generateModelAdditionalProperties|Generate model additional properties (default: true)| |true|
|
||||
|hashableModels|Make hashable models (default: true)| |true|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|identifiableModels|Make models conform to Identifiable when an id is present (default: true)| |true|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|Library template (sub-template) to use|<dl><dt>**urlsession**</dt><dd>[DEFAULT] HTTP client: URLSession</dd><dt>**alamofire**</dt><dd>HTTP client: Alamofire</dd><dt>**vapor**</dt><dd>HTTP client: Vapor</dd></dl>|urlsession|
|
||||
|mapFileBinaryToData|[WARNING] This option will be removed and enabled by default in the future once we've enhanced the code to work with `Data` in all the different situations. Map File and Binary to Data (default: false)| |false|
|
||||
|
||||
@@ -28,6 +28,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|generateModelAdditionalProperties|Generate model additional properties (default: true)| |true|
|
||||
|hashableModels|Make hashable models (default: true)| |true|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|identifiableModels|Make models conform to Identifiable when an id is present (default: true)| |true|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|Library template (sub-template) to use|<dl><dt>**urlsession**</dt><dd>[DEFAULT] HTTP client: URLSession</dd><dt>**alamofire**</dt><dd>HTTP client: Alamofire</dd><dt>**vapor**</dt><dd>HTTP client: Vapor</dd></dl>|urlsession|
|
||||
|mapFileBinaryToData|Map File and Binary to Data (default: false)| |false|
|
||||
|
||||
@@ -11,7 +11,7 @@ title: Documentation for the typescript-angular Generator
|
||||
| generator type | CLIENT | |
|
||||
| generator language | Typescript | |
|
||||
| generator default templating engine | mustache | |
|
||||
| helpTxt | Generates a TypeScript Angular (9.x - 18.x) client library. | |
|
||||
| helpTxt | Generates a TypeScript Angular (9.x - 19.x) client library. | |
|
||||
|
||||
## CONFIG OPTIONS
|
||||
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
|
||||
@@ -33,7 +33,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null|
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|
||||
|modelSuffix|The suffix of the generated model.| |null|
|
||||
|ngVersion|The version of Angular. (At least 9.0.0)| |18.0.0|
|
||||
|ngPackagrVersion|The version of ng-packagr compatible with Angular (see ngVersion option).| |null|
|
||||
|ngVersion|The version of Angular. (At least 9.0.0)| |19.0.0|
|
||||
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|
||||
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
|
||||
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
|
||||
@@ -42,6 +43,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|providedIn|Use this property to provide Injectables in wanted level.|<dl><dt>**root**</dt><dd>The application-level injector in most apps.</dd><dt>**none**</dt><dd>No providedIn)</dd><dt>**any**</dt><dd>Provides a unique instance in each lazy loaded module while all eagerly loaded modules share one instance.</dd><dt>**platform**</dt><dd>A special singleton platform injector shared by all applications on the page.</dd></dl>|root|
|
||||
|queryParamObjectFormat|The format for query param objects: 'dot', 'json', 'key'.| |dot|
|
||||
|rxjsVersion|The version of RxJS compatible with Angular (see ngVersion option).| |null|
|
||||
|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service|
|
||||
|serviceSuffix|The suffix of the generated service.| |Service|
|
||||
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|
||||
@@ -50,9 +52,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|stringEnums|Generate string enums instead of objects for enum values.| |false|
|
||||
|supportsES6|Generate code that conforms to ES6.| |false|
|
||||
|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false|
|
||||
|tsVersion|The version of typescript compatible with Angular (see ngVersion option).| |null|
|
||||
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false|
|
||||
|useSquareBracketsInArrayNames|Setting this property to true will add brackets to array attribute names, e.g. my_values[].| |false|
|
||||
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|
||||
|zonejsVersion|The version of zone.js compatible with Angular (see ngVersion option).| |null|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
|
||||
@@ -116,9 +116,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>float</li>
|
||||
<li>for</li>
|
||||
<li>formParams</li>
|
||||
<li>from</li>
|
||||
<li>function</li>
|
||||
<li>goto</li>
|
||||
<li>headerParams</li>
|
||||
<li>headers</li>
|
||||
<li>if</li>
|
||||
<li>implements</li>
|
||||
<li>import</li>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -97,7 +97,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid
|
||||
[source,group]
|
||||
----
|
||||
plugins {
|
||||
id "org.openapi.generator" version "7.8.0"
|
||||
id "org.openapi.generator" version "7.10.0"
|
||||
}
|
||||
----
|
||||
|
||||
@@ -113,7 +113,7 @@ buildscript {
|
||||
// url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.8.0"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.10.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.8.0') {
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.10.0') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.10.0
|
||||
openApiGeneratorVersion=7.11.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
# BEGIN placeholders
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -19,5 +19,5 @@ gradle generateGoWithInvalidSpec # expected outcome: BUILD FAILED
|
||||
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
|
||||
|
||||
```bash
|
||||
gradle -PopenApiGeneratorVersion=7.8.0 openApiValidate
|
||||
gradle -PopenApiGeneratorVersion=7.10.0 openApiValidate
|
||||
```
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.10.0
|
||||
openApiGeneratorVersion=7.10.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
@@ -12,7 +12,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.8.0</version>
|
||||
<version>7.10.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.10.0</version>
|
||||
<version>7.11.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
@@ -459,6 +459,11 @@
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>${snakeyaml.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
+1
-1
@@ -4323,7 +4323,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
|
||||
if (baseItem != null) {
|
||||
// set both datatype and datetypeWithEnum as only the inner type is enum
|
||||
property.datatypeWithEnum = property.datatypeWithEnum.replace(", " + baseItem.baseType, ", " + toEnumName(baseItem));
|
||||
property.datatypeWithEnum = property.datatypeWithEnum.replace(baseItem.baseType + ">", toEnumName(baseItem) + ">");
|
||||
|
||||
// naming the enum with respect to the language enum naming convention
|
||||
// e.g. remove [], {} from array/map of enum
|
||||
|
||||
+1
-1
@@ -1619,7 +1619,7 @@ public class DefaultGenerator implements Generator {
|
||||
}
|
||||
|
||||
private static String generateParameterId(Parameter parameter) {
|
||||
return parameter.getName() + ":" + parameter.getIn();
|
||||
return null == parameter.get$ref() ? parameter.getName() + ":" + parameter.getIn() : parameter.get$ref() ;
|
||||
}
|
||||
|
||||
private OperationsMap processOperations(CodegenConfig config, String tag, List<CodegenOperation> ops, List<ModelMap> allModels) {
|
||||
|
||||
+24
-1
@@ -22,6 +22,8 @@ import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
|
||||
import com.fasterxml.jackson.databind.MapperFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.swagger.v3.core.util.Json;
|
||||
import io.swagger.v3.oas.annotations.Webhook;
|
||||
import io.swagger.v3.oas.annotations.Webhooks;
|
||||
import io.swagger.v3.oas.models.*;
|
||||
import io.swagger.v3.oas.models.PathItem.HttpMethod;
|
||||
import io.swagger.v3.oas.models.callbacks.Callback;
|
||||
@@ -35,6 +37,7 @@ import org.openapitools.codegen.utils.ModelUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
|
||||
public class InlineModelResolver {
|
||||
@@ -106,10 +109,22 @@ public class InlineModelResolver {
|
||||
}
|
||||
|
||||
flattenPaths();
|
||||
flattenWebhooks();
|
||||
flattenComponents();
|
||||
flattenComponentResponses();
|
||||
}
|
||||
|
||||
/**
|
||||
* Flatten inline models in Webhooks
|
||||
*/
|
||||
private void flattenWebhooks() {
|
||||
Map<String, PathItem> webhooks = openAPI.getWebhooks();
|
||||
if (webhooks == null) {
|
||||
return;
|
||||
}
|
||||
flattenPathItems(webhooks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flatten inline models in Paths
|
||||
*/
|
||||
@@ -118,8 +133,16 @@ public class InlineModelResolver {
|
||||
if (paths == null) {
|
||||
return;
|
||||
}
|
||||
flattenPathItems(paths);
|
||||
}
|
||||
|
||||
for (Map.Entry<String, PathItem> pathsEntry : paths.entrySet()) {
|
||||
/**
|
||||
* Flatten inline models in path items
|
||||
*
|
||||
* @param pathItemMap Map of path items
|
||||
*/
|
||||
private void flattenPathItems(Map<String, PathItem> pathItemMap) {
|
||||
for (Map.Entry<String, PathItem> pathsEntry : pathItemMap.entrySet()) {
|
||||
PathItem path = pathsEntry.getValue();
|
||||
List<Map.Entry<HttpMethod, Operation>> toFlatten = new ArrayList<>(path.readOperationsMap().entrySet());
|
||||
|
||||
|
||||
+4
-1
@@ -232,7 +232,10 @@ public class OpenAPINormalizer {
|
||||
LOGGER.error("FILTER rule must be in the form of `operationId:name1|name2|name3`: {}", inputRules.get(FILTER));
|
||||
} else {
|
||||
if ("operationId".equals(filterStrs[0])) {
|
||||
operationIdFilters = new HashSet<>(Arrays.asList(filterStrs[1].split("[|]")));
|
||||
operationIdFilters = Arrays.stream(filterStrs[1].split("[|]"))
|
||||
.filter(Objects::nonNull)
|
||||
.map(String::trim)
|
||||
.collect(Collectors.toCollection(HashSet::new));
|
||||
} else {
|
||||
LOGGER.error("FILTER rule must be in the form of `operationId:name1|name2|name3`: {}", inputRules.get(FILTER));
|
||||
}
|
||||
|
||||
+42
-6
@@ -140,6 +140,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
protected String sourceFolder = projectFolder + "/java";
|
||||
@Getter @Setter
|
||||
protected String testFolder = projectTestFolder + "/java";
|
||||
|
||||
protected static enum ENUM_PROPERTY_NAMING_TYPE {MACRO_CASE, legacy};
|
||||
protected static final String ENUM_PROPERTY_NAMING_DESC = "Naming convention for enum properties: 'MACRO_CASE' and 'legacy'";
|
||||
@Getter protected ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = ENUM_PROPERTY_NAMING_TYPE.MACRO_CASE;
|
||||
|
||||
/**
|
||||
* -- SETTER --
|
||||
* Set whether discriminator value lookup is case-sensitive or not.
|
||||
@@ -321,7 +326,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
cliOptions.add(CliOption.newString(ADDITIONAL_ENUM_TYPE_ANNOTATIONS, "Additional annotations for enum type(class level annotations)"));
|
||||
cliOptions.add(CliOption.newString(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
|
||||
cliOptions.add(CliOption.newString(ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS, "Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
|
||||
cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library", this.openApiNullable));
|
||||
cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.", this.openApiNullable));
|
||||
cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", implicitHeaders));
|
||||
cliOptions.add(CliOption.newString(IMPLICIT_HEADERS_REGEX, "Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true"));
|
||||
cliOptions.add(CliOption.newBoolean(CAMEL_CASE_DOLLAR_SIGN, "Fix camelCase when starting with $ sign. when true : $Value when false : $value"));
|
||||
@@ -356,6 +361,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
annotationLibraryCliOption.addEnum(al.toCliOptValue(), al.getDescription()));
|
||||
cliOptions.add(annotationLibraryCliOption);
|
||||
}
|
||||
|
||||
CliOption enumPropertyNamingOpt = new CliOption(CodegenConstants.ENUM_PROPERTY_NAMING, ENUM_PROPERTY_NAMING_DESC);
|
||||
cliOptions.add(enumPropertyNamingOpt.defaultValue(enumPropertyNaming.name()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -540,11 +548,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
convertPropertyToStringAndWriteBack(CodegenConstants.LIBRARY, this::setLibrary);
|
||||
convertPropertyToBooleanAndWriteBack(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, this::setSerializeBigDecimalAsString );
|
||||
// need to put back serializableModel (boolean) into additionalProperties as value in additionalProperties is string
|
||||
// additionalProperties.put(CodegenConstants.SERIALIZABLE_MODEL, serializableModel);
|
||||
// additionalProperties.put(CodegenConstants.SERIALIZABLE_MODEL, serializableModel);
|
||||
|
||||
// By default, the discriminator lookup should be case sensitive. There is nothing in the OpenAPI specification
|
||||
// that indicates the lookup should be case insensitive. However, some implementations perform
|
||||
// a case-insensitive lookup.
|
||||
// By default, the discriminator lookup should be case sensitive. There is nothing in the OpenAPI specification
|
||||
// that indicates the lookup should be case insensitive. However, some implementations perform
|
||||
// a case-insensitive lookup.
|
||||
convertPropertyToBooleanAndWriteBack(DISCRIMINATOR_CASE_SENSITIVE, this::setDiscriminatorCaseSensitive);
|
||||
convertPropertyToBooleanAndWriteBack(WITH_XML, this::setWithXml);
|
||||
convertPropertyToBooleanAndWriteBack(OPENAPI_NULLABLE, this::setOpenApiNullable);
|
||||
@@ -555,6 +563,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
convertPropertyToStringAndWriteBack(IMPLICIT_HEADERS_REGEX, this::setImplicitHeadersRegex);
|
||||
convertPropertyToBooleanAndWriteBack(CAMEL_CASE_DOLLAR_SIGN, this::setCamelCaseDollarSign);
|
||||
convertPropertyToBooleanAndWriteBack(USE_ONE_OF_INTERFACES, this::setUseOneOfInterfaces);
|
||||
convertPropertyToStringAndWriteBack(CodegenConstants.ENUM_PROPERTY_NAMING, this::setEnumPropertyNaming);
|
||||
|
||||
if (!StringUtils.isEmpty(parentGroupId) && !StringUtils.isEmpty(parentArtifactId) && !StringUtils.isEmpty(parentVersion)) {
|
||||
additionalProperties.put("parentOverridden", true);
|
||||
@@ -2009,7 +2018,17 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
|
||||
// string
|
||||
String var = underscore(value.replaceAll("\\W+", "_")).toUpperCase(Locale.ROOT);
|
||||
String var;
|
||||
switch (getEnumPropertyNaming()) {
|
||||
case legacy:
|
||||
// legacy ,e.g. WITHNUMBER1
|
||||
var = value.replaceAll("\\W+", "_").toUpperCase(Locale.ROOT);
|
||||
break;
|
||||
default:
|
||||
// default to MACRO_CASE, e.g. WITH_NUMBER1
|
||||
var = underscore(value.replaceAll("\\W+", "_")).toUpperCase(Locale.ROOT);
|
||||
break;
|
||||
}
|
||||
if (var.matches("\\d.*")) {
|
||||
var = "_" + var;
|
||||
}
|
||||
@@ -2367,4 +2386,21 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
public boolean isTypeErasedGenerics() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the naming convention for Java enum properties
|
||||
*
|
||||
* @param enumPropertyNamingType The string representation of the naming convention, as defined by {@link ENUM_PROPERTY_NAMING_TYPE}
|
||||
*/
|
||||
public void setEnumPropertyNaming(final String enumPropertyNamingType) {
|
||||
try {
|
||||
this.enumPropertyNaming = ENUM_PROPERTY_NAMING_TYPE.valueOf(enumPropertyNamingType);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
StringBuilder sb = new StringBuilder(enumPropertyNamingType + " is an invalid enum property naming option. Please choose from:");
|
||||
for (ENUM_PROPERTY_NAMING_TYPE t : ENUM_PROPERTY_NAMING_TYPE.values()) {
|
||||
sb.append("\n ").append(t.name());
|
||||
}
|
||||
throw new RuntimeException(sb.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -368,6 +368,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
||||
// Object files in model folder
|
||||
supportingFiles.add(new SupportingFile("object-body.mustache", "model", "object.c"));
|
||||
supportingFiles.add(new SupportingFile("object-header.mustache", "model", "object.h"));
|
||||
supportingFiles.add(new SupportingFile("any_type-header.mustache", "model", "any_type.h"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ import static org.openapitools.codegen.utils.StringUtils.underscore;
|
||||
public class ElixirClientCodegen extends DefaultCodegen {
|
||||
private final Logger LOGGER = LoggerFactory.getLogger(ElixirClientCodegen.class);
|
||||
|
||||
private final Pattern simpleAtomPattern = Pattern.compile("\\A(?:(?:[_@\\p{Alpha}][_@\\p{Alnum}]*[?!]?)|-)\\z");
|
||||
private final Pattern simpleAtomPattern = Pattern.compile("\\A(?:(?:[_\\p{Alpha}][_@\\p{Alnum}]*[?!]?)|-|@)\\z");
|
||||
|
||||
@Setter protected String packageVersion = "1.0.0";
|
||||
@Setter protected String moduleName;
|
||||
|
||||
+14
-1
@@ -228,10 +228,23 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
|
||||
@Override
|
||||
public String toVarName(String name) {
|
||||
final String varName = camelize(name.replaceAll("[^a-zA-Z0-9_]", ""), LOWERCASE_FIRST_LETTER);
|
||||
// Replace space with _ (underscore) so camelize works as expected
|
||||
final String varName = camelize(name.replaceAll(" ", "_").replaceAll("[^a-zA-Z0-9_]", ""),
|
||||
LOWERCASE_FIRST_LETTER);
|
||||
return isReservedWord(varName) ? escapeReservedWord(name) : varName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toParamName(String name) {
|
||||
// obtain the name from parameterNameMapping directly if provided
|
||||
if (parameterNameMapping.containsKey(name)) {
|
||||
return parameterNameMapping.get(name);
|
||||
}
|
||||
|
||||
// params should be lowerCamelCase
|
||||
return toVarName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toEnumVarName(String value, String datatype) {
|
||||
String camelized = camelize(value.replace(" ", "_").replace("(", "_").replace(")", "")); // TODO FIXME escape properly
|
||||
|
||||
+7
@@ -628,6 +628,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
forceSerializationLibrary(SERIALIZATION_LIBRARY_JSONB);
|
||||
}
|
||||
|
||||
// currently not supported for Microprofile (neither for Jackson nor JSON-B)
|
||||
openApiNullable = false;
|
||||
additionalProperties.put(OPENAPI_NULLABLE, false);
|
||||
|
||||
if (microprofileFramework.equals(MICROPROFILE_KUMULUZEE)) {
|
||||
supportingFiles.add(new SupportingFile("kumuluzee.pom.mustache", "", "pom.xml"));
|
||||
supportingFiles.add(new SupportingFile("kumuluzee.config.yaml.mustache", "src/main/resources", "config.yaml"));
|
||||
@@ -636,6 +640,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
|
||||
if ("3.0".equals(microprofileRestClientVersion)) {
|
||||
additionalProperties.put("microprofile3", true);
|
||||
if (getSerializationLibrary().equals(SERIALIZATION_LIBRARY_JSONB)) {
|
||||
additionalProperties.put("jsonbPolymorphism", true);
|
||||
}
|
||||
}
|
||||
} else if (APACHE.equals(getLibrary())) {
|
||||
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
|
||||
|
||||
+26
@@ -27,6 +27,14 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE;
|
||||
|
||||
/**
|
||||
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(forRemoval = true)
|
||||
public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, OptionalFeatures {
|
||||
public static final String OPT_TITLE = "title";
|
||||
public static final String OPT_BUILD = "build";
|
||||
@@ -712,4 +720,22 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i
|
||||
throw new RuntimeException(sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcess() {
|
||||
System.out.println("################################################################################");
|
||||
System.out.println("# Thanks for using OpenAPI Generator. #");
|
||||
System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #");
|
||||
System.out.println("# https://opencollective.com/openapi_generator/donate #");
|
||||
System.out.println("# #");
|
||||
System.out.println("# WARNING! This generator is outdated. Please use the official generator for #");
|
||||
System.out.println("# Micronaut: https://github.com/micronaut-projects/micronaut-openapi with the #");
|
||||
System.out.println("# help of the plugin for Gradle #");
|
||||
System.out.println("# (https://github.com/micronaut-projects/micronaut-gradle-plugin) and Maven #");
|
||||
System.out.println("# (https://github.com/micronaut-projects/micronaut-maven-plugin). #");
|
||||
System.out.println("# #");
|
||||
System.out.println("# Supported generators for micronaut client / server side, java and kotlin #");
|
||||
System.out.println("# languages. #");
|
||||
System.out.println("################################################################################");
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -11,7 +11,14 @@ import org.openapitools.codegen.SupportingFile;
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||
import org.openapitools.codegen.meta.Stability;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(forRemoval = true)
|
||||
public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
|
||||
|
||||
public static final String OPT_CONFIGURE_AUTH = "configureAuth";
|
||||
@@ -60,7 +67,7 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
|
||||
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "Generates a Java Micronaut Client.";
|
||||
return "Generates a Java Micronaut Client. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi.";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+9
-2
@@ -12,7 +12,14 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated WARNING! This generator is outdated. Please use the official generator for Micronaut:
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-openapi">micronaut-openapi</a> with the help of the plugin for
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-gradle-plugin">Gradle</a> and
|
||||
* <a href="https://github.com/micronaut-projects/micronaut-maven-plugin">Maven</a>.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(forRemoval = true)
|
||||
public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen {
|
||||
public static final String OPT_CONTROLLER_PACKAGE = "controllerPackage";
|
||||
public static final String OPT_GENERATE_CONTROLLER_FROM_EXAMPLES = "generateControllerFromExamples";
|
||||
@@ -86,7 +93,7 @@ public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen {
|
||||
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "Generates a Java Micronaut Server.";
|
||||
return "Generates a Java Micronaut Server. IMPORTANT: this generator has been deprecated. Please use the official one instead: https://github.com/micronaut-projects/micronaut-openapi.";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-2
@@ -279,7 +279,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
|
||||
|
||||
cliOptions.add(new CliOption(MAP_FILE_BINARY_TO_BYTE_ARRAY, "Map File and Binary to ByteArray (default: false)").defaultValue(Boolean.FALSE.toString()));
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(GENERATE_ONEOF_ANYOF_WRAPPERS, "Generate oneOf, anyOf schemas as wrappers."));
|
||||
cliOptions.add(CliOption.newBoolean(GENERATE_ONEOF_ANYOF_WRAPPERS, "Generate oneOf, anyOf schemas as wrappers. Only `jvm-retrofit2`(library), `gson`(serializationLibrary) support this option."));
|
||||
|
||||
CliOption serializationLibraryOpt = new CliOption(CodegenConstants.SERIALIZATION_LIBRARY, SERIALIZATION_LIBRARY_DESC);
|
||||
cliOptions.add(serializationLibraryOpt.defaultValue(serializationLibrary.name()));
|
||||
@@ -962,7 +962,9 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
|
||||
).trim();
|
||||
return "multipart/form-data".equals(mediaType)
|
||||
|| "application/x-www-form-urlencoded".equals(mediaType)
|
||||
|| (mediaType.startsWith("application/") && (mediaType.endsWith("json") || mediaType.endsWith("octet-stream")));
|
||||
|| (mediaType.startsWith("application/") && mediaType.endsWith("json"))
|
||||
|| "application/octet-stream".equals(mediaType)
|
||||
|| "text/plain".equals(mediaType);
|
||||
};
|
||||
operation.consumes = operation.consumes == null ? null : operation.consumes.stream()
|
||||
.filter(isSerializable)
|
||||
|
||||
+1
-1
@@ -809,7 +809,7 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
|
||||
}
|
||||
} else if (ModelUtils.isStringSchema(p)) {
|
||||
if (p.getDefault() != null) {
|
||||
defaultValue = "\"" + p.getDefault() + "\".to_string()";
|
||||
defaultValue = "r#\"" + p.getDefault() + "\"#.to_string()";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
@@ -70,6 +70,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
public static final String USE_BACKTICK_ESCAPES = "useBacktickEscapes";
|
||||
public static final String GENERATE_MODEL_ADDITIONAL_PROPERTIES = "generateModelAdditionalProperties";
|
||||
public static final String HASHABLE_MODELS = "hashableModels";
|
||||
public static final String IDENTIFIABLE_MODELS = "identifiableModels";
|
||||
public static final String USE_JSON_ENCODABLE = "useJsonEncodable";
|
||||
public static final String MAP_FILE_BINARY_TO_DATA = "mapFileBinaryToData";
|
||||
public static final String USE_CUSTOM_DATE_WITHOUT_TIME = "useCustomDateWithoutTime";
|
||||
@@ -95,6 +96,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
@Setter protected boolean useBacktickEscapes = false;
|
||||
@Setter protected boolean generateModelAdditionalProperties = true;
|
||||
@Setter protected boolean hashableModels = true;
|
||||
@Setter protected boolean identifiableModels = true;
|
||||
@Setter protected boolean useJsonEncodable = true;
|
||||
@Getter @Setter
|
||||
protected boolean mapFileBinaryToData = false;
|
||||
@@ -303,6 +305,10 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
"Make hashable models (default: true)")
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
|
||||
cliOptions.add(new CliOption(IDENTIFIABLE_MODELS,
|
||||
"Make models conform to Identifiable when an id is present (default: true)")
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
|
||||
cliOptions.add(new CliOption(USE_JSON_ENCODABLE,
|
||||
"Make models conform to JSONEncodable protocol (default: true)")
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
@@ -507,6 +513,11 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
}
|
||||
additionalProperties.put(HASHABLE_MODELS, hashableModels);
|
||||
|
||||
if (additionalProperties.containsKey(IDENTIFIABLE_MODELS)) {
|
||||
setIdentifiableModels(convertPropertyToBooleanAndWriteBack(IDENTIFIABLE_MODELS));
|
||||
}
|
||||
additionalProperties.put(IDENTIFIABLE_MODELS, identifiableModels);
|
||||
|
||||
if (additionalProperties.containsKey(USE_JSON_ENCODABLE)) {
|
||||
setUseJsonEncodable(convertPropertyToBooleanAndWriteBack(USE_JSON_ENCODABLE));
|
||||
}
|
||||
@@ -940,6 +951,15 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
if (hashableModels) {
|
||||
codegenModel.vendorExtensions.put("x-swift-hashable", true);
|
||||
}
|
||||
if (identifiableModels && !codegenModel.vendorExtensions.containsKey("x-swift-identifiable")) {
|
||||
for (CodegenProperty cp : codegenModel.getVars()) {
|
||||
if (!cp.getBaseName().equals("id")) continue;
|
||||
if (cp.isString || cp.isUuid || cp.isInteger || cp.isLong) {
|
||||
codegenModel.vendorExtensions.put("x-swift-identifiable", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return codegenModel;
|
||||
}
|
||||
|
||||
|
||||
+20
@@ -70,6 +70,7 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
public static final String USE_BACKTICK_ESCAPES = "useBacktickEscapes";
|
||||
public static final String GENERATE_MODEL_ADDITIONAL_PROPERTIES = "generateModelAdditionalProperties";
|
||||
public static final String HASHABLE_MODELS = "hashableModels";
|
||||
public static final String IDENTIFIABLE_MODELS = "identifiableModels";
|
||||
public static final String USE_JSON_ENCODABLE = "useJsonEncodable";
|
||||
public static final String MAP_FILE_BINARY_TO_DATA = "mapFileBinaryToData";
|
||||
public static final String USE_CUSTOM_DATE_WITHOUT_TIME = "useCustomDateWithoutTime";
|
||||
@@ -98,6 +99,7 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
@Setter protected boolean useBacktickEscapes = false;
|
||||
@Setter protected boolean generateModelAdditionalProperties = true;
|
||||
@Setter protected boolean hashableModels = true;
|
||||
@Setter protected boolean identifiableModels = true;
|
||||
@Setter protected boolean useJsonEncodable = true;
|
||||
@Getter @Setter protected boolean mapFileBinaryToData = false;
|
||||
@Setter protected boolean useCustomDateWithoutTime = false;
|
||||
@@ -307,6 +309,10 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
"Make hashable models (default: true)")
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
|
||||
cliOptions.add(new CliOption(IDENTIFIABLE_MODELS,
|
||||
"Make models conform to Identifiable when an id is present (default: true)")
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
|
||||
cliOptions.add(new CliOption(USE_JSON_ENCODABLE,
|
||||
"Make models conform to JSONEncodable protocol (default: true)")
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
@@ -527,6 +533,11 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
}
|
||||
additionalProperties.put(HASHABLE_MODELS, hashableModels);
|
||||
|
||||
if (additionalProperties.containsKey(IDENTIFIABLE_MODELS)) {
|
||||
setIdentifiableModels(convertPropertyToBooleanAndWriteBack(IDENTIFIABLE_MODELS));
|
||||
}
|
||||
additionalProperties.put(IDENTIFIABLE_MODELS, identifiableModels);
|
||||
|
||||
if (additionalProperties.containsKey(USE_JSON_ENCODABLE)) {
|
||||
setUseJsonEncodable(convertPropertyToBooleanAndWriteBack(USE_JSON_ENCODABLE));
|
||||
}
|
||||
@@ -973,6 +984,15 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
if (hashableModels) {
|
||||
codegenModel.vendorExtensions.put("x-swift-hashable", true);
|
||||
}
|
||||
if (identifiableModels && !codegenModel.vendorExtensions.containsKey("x-swift-identifiable")) {
|
||||
for (CodegenProperty cp : codegenModel.getVars()) {
|
||||
if (!cp.getBaseName().equals("id")) continue;
|
||||
if (cp.isString || cp.isUuid || cp.isInteger || cp.isLong) {
|
||||
codegenModel.vendorExtensions.put("x-swift-identifiable", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return codegenModel;
|
||||
}
|
||||
|
||||
|
||||
+44
-107
@@ -19,6 +19,7 @@ package org.openapitools.codegen.languages;
|
||||
|
||||
import io.swagger.v3.oas.models.media.Schema;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.openapitools.codegen.*;
|
||||
@@ -31,6 +32,7 @@ import org.openapitools.codegen.model.OperationMap;
|
||||
import org.openapitools.codegen.model.OperationsMap;
|
||||
import org.openapitools.codegen.utils.ModelUtils;
|
||||
import org.openapitools.codegen.utils.SemVer;
|
||||
import org.openapitools.codegen.utils.YamlConfigUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -76,8 +78,12 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
|
||||
public static final String STRING_ENUMS_DESC = "Generate string enums instead of objects for enum values.";
|
||||
public static final String QUERY_PARAM_OBJECT_FORMAT = "queryParamObjectFormat";
|
||||
public static final String USE_SQUARE_BRACKETS_IN_ARRAY_NAMES = "useSquareBracketsInArrayNames";
|
||||
public static final String TS_VERSION = "tsVersion";
|
||||
public static final String RXJS_VERSION = "rxjsVersion";
|
||||
public static final String NGPACKAGR_VERSION = "ngPackagrVersion";
|
||||
public static final String ZONEJS_VERSION = "zonejsVersion";
|
||||
|
||||
protected String ngVersion = "18.0.0";
|
||||
protected String ngVersion = "19.0.0";
|
||||
@Getter @Setter
|
||||
protected String npmRepository = null;
|
||||
@Setter(AccessLevel.PRIVATE) private boolean useSingleRequestParameter = false;
|
||||
@@ -144,6 +150,10 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
|
||||
this.cliOptions.add(new CliOption(STRING_ENUMS, STRING_ENUMS_DESC).defaultValue(String.valueOf(this.stringEnums)));
|
||||
this.cliOptions.add(new CliOption(QUERY_PARAM_OBJECT_FORMAT, "The format for query param objects: 'dot', 'json', 'key'.").defaultValue(this.queryParamObjectFormat.name()));
|
||||
this.cliOptions.add(CliOption.newBoolean(USE_SQUARE_BRACKETS_IN_ARRAY_NAMES, "Setting this property to true will add brackets to array attribute names, e.g. my_values[].", false));
|
||||
this.cliOptions.add(new CliOption(TS_VERSION, "The version of typescript compatible with Angular (see ngVersion option)."));
|
||||
this.cliOptions.add(new CliOption(RXJS_VERSION, "The version of RxJS compatible with Angular (see ngVersion option)."));
|
||||
this.cliOptions.add(new CliOption(NGPACKAGR_VERSION, "The version of ng-packagr compatible with Angular (see ngVersion option)."));
|
||||
this.cliOptions.add(new CliOption(ZONEJS_VERSION, "The version of zone.js compatible with Angular (see ngVersion option)."));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,7 +169,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
|
||||
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "Generates a TypeScript Angular (9.x - 18.x) client library.";
|
||||
return "Generates a TypeScript Angular (9.x - 19.x) client library.";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,126 +296,53 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
static class AngularDependencies {
|
||||
String tsVersion;
|
||||
String rxjsVersion;
|
||||
String ngPackagrVersion;
|
||||
String zonejsVersion;
|
||||
String tsickleVersion;
|
||||
}
|
||||
|
||||
private void addNpmPackageGeneration(SemVer ngVersion) {
|
||||
|
||||
if (additionalProperties.containsKey(NPM_REPOSITORY)) {
|
||||
this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString());
|
||||
}
|
||||
|
||||
// Set the typescript version compatible to the Angular version
|
||||
// based on https://angular.io/guide/versions#actively-supported-versions
|
||||
if (ngVersion.atLeast("18.1.0")) {
|
||||
additionalProperties.put("tsVersion", ">=5.4.0 <5.6.0");
|
||||
} else if (ngVersion.atLeast("18.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=5.4.0 <5.5.0");
|
||||
} else if (ngVersion.atLeast("17.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.9.3 <5.3.0");
|
||||
} else if (ngVersion.atLeast("16.1.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.9.3 <5.2.0");
|
||||
} else if (ngVersion.atLeast("16.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.9.3 <5.1.0");
|
||||
} else if (ngVersion.atLeast("15.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.8.2 <4.10.0");
|
||||
} else if (ngVersion.atLeast("14.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.6.0 <=4.8.0");
|
||||
} else if (ngVersion.atLeast("13.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.4.2 <4.5.0");
|
||||
} else if (ngVersion.atLeast("12.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.3.0 <4.4.0");
|
||||
} else if (ngVersion.atLeast("11.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=4.0.0 <4.1.0");
|
||||
} else if (ngVersion.atLeast("10.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=3.9.2 <4.0.0");
|
||||
} else if (ngVersion.atLeast("9.0.0")) {
|
||||
additionalProperties.put("tsVersion", ">=3.6.0 <3.8.0");
|
||||
} else {
|
||||
throw new IllegalArgumentException("Invalid ngVersion. Only Angular v9+ is supported.");
|
||||
Map<String, AngularDependencies> angularDependenciesByVersion = YamlConfigUtils.loadAsMap("typescript-angular/angularDependenciesByVersion.yaml", AngularDependencies.class);
|
||||
|
||||
AngularDependencies angularDependencies = angularDependenciesByVersion.entrySet().stream()
|
||||
// we filter only config version above or equal the current one
|
||||
.filter(versionMatrix -> ngVersion.atLeast(versionMatrix.getKey()))
|
||||
// get can the latest version configured that match the current one
|
||||
.max(Comparator.comparing(s -> new SemVer(s.getKey())))
|
||||
.map(Map.Entry::getValue)
|
||||
.orElseThrow(() -> new IllegalArgumentException("Invalid ngVersion. Only Angular v9+ is supported."));
|
||||
|
||||
if (!additionalProperties.containsKey(TS_VERSION)) {
|
||||
additionalProperties.put(TS_VERSION, angularDependencies.getTsVersion());
|
||||
}
|
||||
|
||||
// Set the rxJS version compatible to the Angular version
|
||||
if (ngVersion.atLeast("18.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "7.4.0");
|
||||
} else if (ngVersion.atLeast("17.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "7.4.0");
|
||||
} else if (ngVersion.atLeast("16.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "7.4.0");
|
||||
} else if (ngVersion.atLeast("15.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "7.5.5");
|
||||
} else if (ngVersion.atLeast("14.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "7.5.5");
|
||||
} else if (ngVersion.atLeast("13.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "7.4.0");
|
||||
} else if (ngVersion.atLeast("10.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "6.6.0");
|
||||
} else if (ngVersion.atLeast("9.0.0")) {
|
||||
additionalProperties.put("rxjsVersion", "6.5.3");
|
||||
if (!additionalProperties.containsKey(RXJS_VERSION)) {
|
||||
additionalProperties.put(RXJS_VERSION, angularDependencies.getRxjsVersion());
|
||||
}
|
||||
|
||||
supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json"));
|
||||
|
||||
// Specific ng-packagr configuration
|
||||
if (ngVersion.atLeast("18.1.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "18.1.0");
|
||||
// tsTickle is not required and there is no available version compatible with
|
||||
// versions of TypeScript compatible with Angular 18.
|
||||
} else if (ngVersion.atLeast("18.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "18.0.0");
|
||||
// tsTickle is not required and there is no available version compatible with
|
||||
// versions of TypeScript compatible with Angular 18.
|
||||
} else if (ngVersion.atLeast("17.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "17.0.3");
|
||||
// tsTickle is not required and there is no available version compatible with
|
||||
// versions of TypeScript compatible with Angular 17.
|
||||
} else if (ngVersion.atLeast("16.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "16.0.0");
|
||||
// tsTickle is not required and there is no available version compatible with
|
||||
// versions of TypeScript compatible with Angular 16.
|
||||
} else if (ngVersion.atLeast("15.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "15.0.2");
|
||||
// tsTickle is not required and there is no available version compatible with
|
||||
// versions of TypeScript compatible with Angular 15.
|
||||
} else if (ngVersion.atLeast("14.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "14.0.2");
|
||||
additionalProperties.put("tsickleVersion", "0.46.3");
|
||||
} else if (ngVersion.atLeast("13.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "13.0.3");
|
||||
additionalProperties.put("tsickleVersion", "0.43.0");
|
||||
} else if (ngVersion.atLeast("12.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "12.2.1");
|
||||
additionalProperties.put("tsickleVersion", "0.43.0");
|
||||
} else if (ngVersion.atLeast("11.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "11.0.2");
|
||||
additionalProperties.put("tsickleVersion", "0.39.1");
|
||||
} else if (ngVersion.atLeast("10.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "10.0.3");
|
||||
additionalProperties.put("tsickleVersion", "0.39.1");
|
||||
} else if (ngVersion.atLeast("9.0.0")) {
|
||||
additionalProperties.put("ngPackagrVersion", "9.0.1");
|
||||
additionalProperties.put("tsickleVersion", "0.38.0");
|
||||
if (!additionalProperties.containsKey(NGPACKAGR_VERSION)) {
|
||||
additionalProperties.put(NGPACKAGR_VERSION, angularDependencies.getNgPackagrVersion());
|
||||
}
|
||||
|
||||
// set zone.js version
|
||||
if (ngVersion.atLeast("18.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.14.7");
|
||||
} else if (ngVersion.atLeast("17.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.14.0");
|
||||
} else if (ngVersion.atLeast("16.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.13.0");
|
||||
} else if (ngVersion.atLeast("15.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.11.5");
|
||||
} else if (ngVersion.atLeast("14.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.11.5");
|
||||
} else if (ngVersion.atLeast("12.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.11.4");
|
||||
} else if (ngVersion.atLeast("11.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.11.3");
|
||||
} else if (ngVersion.atLeast("9.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.10.2");
|
||||
} else if (ngVersion.atLeast("8.0.0")) {
|
||||
additionalProperties.put("zonejsVersion", "0.9.1");
|
||||
if (!additionalProperties.containsKey(ZONEJS_VERSION)) {
|
||||
additionalProperties.put(ZONEJS_VERSION, angularDependencies.getZonejsVersion());
|
||||
}
|
||||
|
||||
if (angularDependencies.getTsickleVersion() != null) {
|
||||
additionalProperties.put("tsickleVersion", angularDependencies.getTsickleVersion());
|
||||
}
|
||||
|
||||
//Files for building our lib
|
||||
supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json"));
|
||||
supportingFiles.add(new SupportingFile("package.mustache", getIndexDirectory(), "package.json"));
|
||||
supportingFiles.add(new SupportingFile("tsconfig.mustache", getIndexDirectory(), "tsconfig.json"));
|
||||
}
|
||||
|
||||
+6
@@ -88,6 +88,8 @@ public class TypeScriptNestjsClientCodegen extends AbstractTypeScriptClientCodeg
|
||||
apiPackage = "api";
|
||||
modelPackage = "model";
|
||||
|
||||
reservedWords.addAll(Arrays.asList("from", "headers"));
|
||||
|
||||
this.cliOptions.add(new CliOption(NPM_REPOSITORY,
|
||||
"Use this property to set an url your private npmRepo in the package.json"));
|
||||
this.cliOptions.add(CliOption.newBoolean(WITH_INTERFACES,
|
||||
@@ -327,6 +329,10 @@ public class TypeScriptNestjsClientCodegen extends AbstractTypeScriptClientCodeg
|
||||
|
||||
// Overwrite path to TypeScript template string, after applying everything we just did.
|
||||
op.path = pathBuffer.toString();
|
||||
|
||||
for (CodegenParameter param : op.allParams) {
|
||||
param.vendorExtensions.putIfAbsent("x-param-has-sanitized-name", !param.baseName.equals(param.paramName));
|
||||
}
|
||||
}
|
||||
|
||||
operations.put("hasSomeFormParams", hasSomeFormParams);
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package org.openapitools.codegen.utils;
|
||||
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.TypeDescription;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.Constructor;
|
||||
import org.yaml.snakeyaml.introspector.BeanAccess;
|
||||
import org.yaml.snakeyaml.nodes.MappingNode;
|
||||
import org.yaml.snakeyaml.nodes.Node;
|
||||
import org.yaml.snakeyaml.nodes.Tag;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class YamlConfigUtils {
|
||||
|
||||
/**
|
||||
* Load yaml config file as map
|
||||
*
|
||||
* @param configFile yaml config file to load
|
||||
* @param clazz class of object to map data
|
||||
* @param <T> type of config object to generate
|
||||
* @return config object generated
|
||||
*/
|
||||
public static <T> Map<String, T> loadAsMap(String configFile, Class<T> clazz) {
|
||||
LoaderOptions loaderOptions = new LoaderOptions();
|
||||
loaderOptions.setAllowDuplicateKeys(false);
|
||||
|
||||
Yaml yaml = new Yaml(new MapConstructor(loaderOptions, clazz));
|
||||
yaml.setBeanAccess(BeanAccess.FIELD);
|
||||
InputStream inputStream = YamlConfigUtils.class
|
||||
.getClassLoader()
|
||||
.getResourceAsStream(configFile);
|
||||
|
||||
return yaml.load(inputStream);
|
||||
}
|
||||
|
||||
private static class MapConstructor extends Constructor {
|
||||
private final TypeDescription itemType;
|
||||
|
||||
public <T> MapConstructor(LoaderOptions loaderOptions, Class<T> clazz) {
|
||||
super(loaderOptions);
|
||||
this.rootTag = new Tag("root");
|
||||
itemType = new TypeDescription(clazz);
|
||||
this.addTypeDescription(itemType);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object constructObject(Node node) {
|
||||
if ("root".equals(node.getTag().getValue()) && node instanceof MappingNode) {
|
||||
MappingNode mNode = (MappingNode) node;
|
||||
return mNode.getValue().stream().collect(
|
||||
Collectors.toMap(
|
||||
t -> super.constructObject(t.getKeyNode()),
|
||||
t -> {
|
||||
Node child = t.getValueNode();
|
||||
child.setType(itemType.getType());
|
||||
return super.constructObject(child);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
} else {
|
||||
return super.constructObject(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -76,6 +76,7 @@ set(HDRS
|
||||
include/keyValuePair.h
|
||||
external/cJSON.h
|
||||
model/object.h
|
||||
model/any_type.h
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
model/{{classFilename}}.h
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
* any_type.h
|
||||
*
|
||||
* A placeholder for now, this type isn't really needed.
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ end:
|
||||
// {{{.}}}
|
||||
//
|
||||
{{/notes}}
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#returnProperty}}{{^isEnum}}{{{returnType}}}_t*{{/isEnum}}{{#isEnum}}{{projectName}}_{{{returnType}}}_{{returnEnumName}}_e{{/isEnum}}{{/returnProperty}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
{{{classname}}}_{{{operationId}}}(apiClient_t *apiClient{{#allParams}}, {{#isPrimitiveType}}{{#isNumber}}{{{dataType}}} {{/isNumber}}{{#isLong}}{{{dataType}}} {{/isLong}}{{#isInteger}}{{{dataType}}} *{{/isInteger}}{{#isDouble}}{{{dataType}}} {{/isDouble}}{{#isFloat}}{{{dataType}}} {{/isFloat}}{{#isBoolean}}{{dataType}} *{{/isBoolean}}{{#isEnum}}{{#isString}}{{projectName}}_{{operationId}}_{{baseName}}_e {{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}{{{dataType}}} *{{/isString}}{{/isEnum}}{{#isByteArray}}{{{dataType}}} *{{/isByteArray}}{{#isDate}}{{{dataType}}} {{/isDate}}{{#isDateTime}}{{{dataType}}} {{/isDateTime}}{{#isFile}}{{{dataType}}} {{/isFile}}{{#isFreeFormObject}}{{dataType}}_t *{{/isFreeFormObject}}{{/isPrimitiveType}}{{^isArray}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}{{datatypeWithEnum}}_e {{/isEnum}}{{^isEnum}}{{{dataType}}}_t *{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}{{datatypeWithEnum}}_e {{/isEnum}}{{/isModel}}{{#isUuid}}{{dataType}} *{{/isUuid}}{{#isEmail}}{{dataType}} {{/isEmail}}{{/isPrimitiveType}}{{/isArray}}{{#isContainer}}{{#isArray}}{{dataType}}_t *{{/isArray}}{{#isMap}}{{dataType}} {{/isMap}}{{/isContainer}}{{{paramName}}}{{/allParams}})
|
||||
{
|
||||
list_t *localVarQueryParameters = {{#hasQueryParams}}list_createList();{{/hasQueryParams}}{{^hasQueryParams}}NULL;{{/hasQueryParams}}
|
||||
@@ -263,7 +263,7 @@ end:
|
||||
{{#isPrimitiveType}}{{#isNumber}}{{{dataType}}}{{/isNumber}}{{#isLong}}{{{dataType}}}{{/isLong}}{{#isInteger}}{{{dataType}}}{{/isInteger}}{{#isDouble}}{{{dataType}}}{{/isDouble}}{{#isFloat}}{{{dataType}}}{{/isFloat}}{{#isBoolean}}{{dataType}}{{/isBoolean}}{{#isEnum}}{{#isString}}{{projectName}}_{{operationId}}_{{baseName}}_e{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}{{{dataType}}} *{{/isString}}{{/isEnum}}{{#isByteArray}}{{{dataType}}} *{{/isByteArray}}{{#isDate}}{{{dataType}}}{{/isDate}}{{#isDateTime}}{{{dataType}}}{{/isDateTime}}{{#isFile}}{{{dataType}}}{{/isFile}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{^isEnum}}{{{dataType}}}_t *{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{/isModel}}{{#isUuid}}{{dataType}} *{{/isUuid}}{{#isEmail}}{{dataType}}{{/isEmail}}{{/isPrimitiveType}} valueForm_{{paramName}} = 0;
|
||||
keyValuePair_t *keyPairForm_{{paramName}} = 0;
|
||||
{{/isFile}}
|
||||
if ({{paramName}} != NULL)
|
||||
if ({{paramName}} != {{^isEnum}}NULL{{/isEnum}}{{#isEnum}}0{{/isEnum}})
|
||||
{
|
||||
{{#isFile}}
|
||||
keyForm_{{paramName}} = strdup("{{{baseName}}}");
|
||||
@@ -324,6 +324,10 @@ end:
|
||||
}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
{{#isString}}
|
||||
localVarBodyParameters = strdup({{paramName}});
|
||||
{{/isString}}
|
||||
{{^isString}}
|
||||
cJSON *localVarSingleItemJSON_{{paramName}} = NULL;
|
||||
if ({{paramName}} != NULL)
|
||||
{
|
||||
@@ -331,6 +335,7 @@ end:
|
||||
localVarSingleItemJSON_{{paramName}} = {{dataType}}_convertToJSON({{paramName}});
|
||||
localVarBodyParameters = {{{cJSONPrint}}}(localVarSingleItemJSON_{{paramName}});
|
||||
}
|
||||
{{/isString}}
|
||||
{{/isArray}}
|
||||
{{/bodyParam}}
|
||||
{{#produces}}
|
||||
@@ -399,9 +404,9 @@ end:
|
||||
{{^returnContainer}}
|
||||
//nonprimitive not container
|
||||
cJSON *{{classname}}localVarJSON = cJSON_Parse(apiClient->dataReceived);
|
||||
{{{returnBaseType}}}_t *elementToReturn = {{{returnBaseType}}}_parseFromJSON({{classname}}localVarJSON);
|
||||
{{#returnProperty}}{{^isEnum}}{{{returnBaseType}}}_t *{{/isEnum}}{{#isEnum}}{{projectName}}_{{{returnType}}}_{{returnEnumName}}_e {{/isEnum}}{{/returnProperty}}elementToReturn = {{{returnBaseType}}}_parseFromJSON({{classname}}localVarJSON);
|
||||
cJSON_Delete({{classname}}localVarJSON);
|
||||
if(elementToReturn == NULL) {
|
||||
if(elementToReturn == {{#returnProperty}}{{^isEnum}}NULL{{/isEnum}}{{#isEnum}}0{{/isEnum}}{{/returnProperty}}) {
|
||||
// return 0;
|
||||
}
|
||||
|
||||
@@ -458,10 +463,12 @@ end:
|
||||
free(localVarBodyParameters);
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
{{^isString}}
|
||||
if (localVarSingleItemJSON_{{paramName}}) {
|
||||
cJSON_Delete(localVarSingleItemJSON_{{paramName}});
|
||||
localVarSingleItemJSON_{{paramName}} = NULL;
|
||||
}
|
||||
{{/isString}}
|
||||
free(localVarBodyParameters);
|
||||
{{/isArray}}
|
||||
{{/bodyParams}}
|
||||
@@ -524,8 +531,10 @@ end:
|
||||
keyForm_{{{paramName}}} = NULL;
|
||||
}
|
||||
if (valueForm_{{{paramName}}}) {
|
||||
{{^isEnum}}
|
||||
free(valueForm_{{{paramName}}});
|
||||
valueForm_{{{paramName}}} = NULL;
|
||||
{{/isEnum}}
|
||||
valueForm_{{{paramName}}} = {{^isEnum}}NULL{{/isEnum}}{{#isEnum}}0{{/isEnum}};
|
||||
}
|
||||
free(keyPairForm_{{paramName}});
|
||||
{{/isString}}
|
||||
@@ -541,7 +550,7 @@ end:
|
||||
return elementToReturn;
|
||||
end:
|
||||
free(localVarPath);
|
||||
return NULL;
|
||||
return {{#returnProperty}}{{^isEnum}}NULL{{/isEnum}}{{#isEnum}}0{{/isEnum}}{{/returnProperty}};
|
||||
{{/returnType}}
|
||||
{{^returnType}}
|
||||
//No return type
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef enum { {{projectName}}_{{operationId}}_{{enumName}}_NULL = 0{{#enumVars
|
||||
// {{{.}}}
|
||||
//
|
||||
{{/notes}}
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
{{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#returnProperty}}{{^isEnum}}{{{returnType}}}_t*{{/isEnum}}{{#isEnum}}{{projectName}}_{{{returnType}}}_{{returnEnumName}}_e{{/isEnum}}{{/returnProperty}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
{{{classname}}}_{{{operationId}}}(apiClient_t *apiClient{{#allParams}}, {{#isPrimitiveType}}{{#isNumber}}{{{dataType}}} {{/isNumber}}{{#isLong}}{{{dataType}}} {{/isLong}}{{#isInteger}}{{{dataType}}} *{{/isInteger}}{{#isDouble}}{{{dataType}}} {{/isDouble}}{{#isFloat}}{{{dataType}}} {{/isFloat}}{{#isBoolean}}{{dataType}} *{{/isBoolean}}{{#isEnum}}{{#isString}}{{projectName}}_{{operationId}}_{{baseName}}_e {{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}{{{dataType}}} *{{/isString}}{{/isEnum}}{{#isByteArray}}{{{dataType}}} *{{/isByteArray}}{{#isDate}}{{{dataType}}} {{/isDate}}{{#isDateTime}}{{{dataType}}} {{/isDateTime}}{{#isFile}}{{{dataType}}} {{/isFile}}{{#isFreeFormObject}}{{dataType}}_t *{{/isFreeFormObject}}{{/isPrimitiveType}}{{^isArray}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}{{datatypeWithEnum}}_e {{/isEnum}}{{^isEnum}}{{{dataType}}}_t *{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}{{datatypeWithEnum}}_e {{/isEnum}}{{/isModel}}{{#isUuid}}{{dataType}} *{{/isUuid}}{{#isEmail}}{{dataType}} {{/isEmail}}{{/isPrimitiveType}}{{/isArray}}{{#isContainer}}{{#isArray}}{{dataType}}_t *{{/isArray}}{{#isMap}}{{dataType}} {{/isMap}}{{/isContainer}}{{{paramName}}}{{/allParams}});
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ apiClient_t *apiClient_create() {
|
||||
apiClient->username = NULL;
|
||||
apiClient->password = NULL;
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
apiClient->accessToken = NULL;
|
||||
{{/isBasicBearer}}
|
||||
{{#isOAuth}}
|
||||
apiClient->accessToken = NULL;
|
||||
{{/isOAuth}}
|
||||
@@ -69,6 +72,9 @@ apiClient_t *apiClient_create_with_base_path(const char *basePath
|
||||
apiClient->username = NULL;
|
||||
apiClient->password = NULL;
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
apiClient->accessToken = NULL;
|
||||
{{/isBasicBearer}}
|
||||
{{#isOAuth}}
|
||||
apiClient->accessToken = NULL;
|
||||
{{/isOAuth}}
|
||||
@@ -108,6 +114,11 @@ void apiClient_free(apiClient_t *apiClient) {
|
||||
free(apiClient->password);
|
||||
}
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
if(apiClient->accessToken) {
|
||||
free(apiClient->accessToken);
|
||||
}
|
||||
{{/isBasicBearer}}
|
||||
{{#isOAuth}}
|
||||
if(apiClient->accessToken) {
|
||||
free(apiClient->accessToken);
|
||||
@@ -467,6 +478,20 @@ void apiClient_invoke(apiClient_t *apiClient,
|
||||
}
|
||||
}
|
||||
{{/isApiKey}}
|
||||
{{#isBasicBearer}}
|
||||
// this would only be generated for bearer token authentication
|
||||
if(apiClient->accessToken != NULL)
|
||||
{
|
||||
int authHeaderSize;
|
||||
char *authHeader = NULL;
|
||||
|
||||
authHeaderSize = snprintf(NULL, 0, "Authorization: Bearer %s", apiClient->accessToken) + 1;
|
||||
authHeader = malloc(authHeaderSize);
|
||||
snprintf(authHeader, authHeaderSize, "Authorization: Bearer %s", apiClient->accessToken);
|
||||
headers = curl_slist_append(headers, authHeader);
|
||||
free(authHeader);
|
||||
}
|
||||
{{/isBasicBearer}}
|
||||
{{/authMethods}}
|
||||
{{/hasAuthMethods}}
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ typedef struct apiClient_t {
|
||||
char *username;
|
||||
char *password;
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
char *accessToken;
|
||||
{{/isBasicBearer}}
|
||||
{{#isOAuth}}
|
||||
char *accessToken;
|
||||
{{/isOAuth}}
|
||||
|
||||
+39
-17
@@ -25,7 +25,7 @@ char* {{classFilename}}_{{classname}}_ToString({{projectName}}_{{classVarName}}_
|
||||
return 0;
|
||||
}
|
||||
|
||||
cJSON *{{classFilename}}_{{classname}}_convertToJSON({{projectName}}_{{classVarName}}_{{enumName}}_e {{classname}}) {
|
||||
cJSON *{{classname}}_convertToJSON({{projectName}}_{{classVarName}}_{{enumName}}_e {{classname}}) {
|
||||
cJSON *item = cJSON_CreateObject();
|
||||
{{#isString}}
|
||||
if(cJSON_AddStringToObject(item, "{{{classname}}}", {{classFilename}}_{{{classname}}}_ToString({{{classname}}})) == NULL) {
|
||||
@@ -48,33 +48,27 @@ fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{classFilename}}_{{classname}}_parseFromJSON(cJSON *{{classname}}JSON) {
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e *{{classname}} = NULL;
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{classname}}_parseFromJSON(cJSON *{{classname}}JSON) {
|
||||
{{#isEnum}}
|
||||
{{#isNumeric}}
|
||||
cJSON *{{{classname}}}Var = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{classname}}}");
|
||||
if(!cJSON_IsNumber({{{classname}}}Var))
|
||||
{
|
||||
goto end;
|
||||
if(!cJSON_IsNumber({{{classname}}}JSON)) {
|
||||
return 0;
|
||||
}
|
||||
return {{classname}}JSON->valueint;
|
||||
{{/isNumeric}}
|
||||
{{#isString}}
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{classname}}Variable;
|
||||
cJSON *{{{classname}}}Var = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{classname}}}");
|
||||
if(!cJSON_IsString({{{classname}}}Var) || ({{{classname}}}Var->valuestring == NULL)){
|
||||
goto end;
|
||||
if(!cJSON_IsString({{{classname}}}JSON) || ({{{classname}}}JSON->valuestring == NULL)) {
|
||||
return 0;
|
||||
}
|
||||
{{classname}}Variable = {{classFilename}}_{{classname}}_FromString({{{classname}}}Var->valuestring);
|
||||
return {{classFilename}}_{{classname}}_FromString({{{classname}}}JSON->valuestring);
|
||||
{{/isString}}
|
||||
{{/isEnum}}
|
||||
return {{classname}}Variable;
|
||||
end:
|
||||
return 0;
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#vars}}
|
||||
{{^isContainer}}
|
||||
{{#isPrimitiveType}}
|
||||
{{^isModel}}
|
||||
{{#isEnum}}
|
||||
char* {{classname}}_{{name}}_ToString({{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}) {
|
||||
@@ -96,6 +90,7 @@ char* {{classname}}_{{name}}_ToString({{projectName}}_{{classVarName}}_{{enumNam
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{/isModel}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#items}}
|
||||
@@ -138,7 +133,12 @@ char* {{classname}}_{{name}}_ToString({{projectName}}_{{classVarName}}_{{enumNam
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
@@ -227,10 +227,12 @@ void {{classname}}_free({{classname}}_t *{{classname}}) {
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
if ({{{classname}}}->{{{name}}}) {
|
||||
{{{complexType}}}_free({{{classname}}}->{{{name}}});
|
||||
{{classname}}->{{name}} = NULL;
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
@@ -337,7 +339,12 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) {
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{#isPrimitiveType}}
|
||||
if ({{projectName}}_{{classVarName}}_{{enumName}}_NULL == {{{classname}}}->{{{name}}}) {
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
if ({{projectName}}_{{dataType}}_{{enumName}}_NULL == {{{classname}}}->{{{name}}}) {
|
||||
{{/isPrimitiveType}}
|
||||
goto fail;
|
||||
}
|
||||
{{/isEnum}}
|
||||
@@ -347,7 +354,12 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) {
|
||||
if({{{classname}}}->{{{name}}}) {
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{#isPrimitiveType}}
|
||||
if({{{classname}}}->{{{name}}} != {{projectName}}_{{classVarName}}_{{enumName}}_NULL) {
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
if({{{classname}}}->{{{name}}} != {{projectName}}_{{dataType}}_{{enumName}}_NULL) {
|
||||
{{/isPrimitiveType}}
|
||||
{{/isEnum}}
|
||||
{{/required}}
|
||||
{{^isContainer}}
|
||||
@@ -589,7 +601,12 @@ fail:
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
// define the local variable for {{{classname}}}->{{{name}}}
|
||||
{{^isEnum}}
|
||||
{{complexType}}_t *{{name}}_local_nonprim = NULL;
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}_local_nonprim = 0;
|
||||
{{/isEnum}}
|
||||
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
@@ -599,6 +616,9 @@ fail:
|
||||
{{#vars}}
|
||||
// {{{classname}}}->{{{name}}}
|
||||
cJSON *{{{name}}} = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{baseName}}}");
|
||||
if (cJSON_IsNull({{{name}}})) {
|
||||
{{{name}}} = NULL;
|
||||
}
|
||||
{{#required}}
|
||||
if (!{{{name}}}) {
|
||||
goto end;
|
||||
@@ -853,7 +873,7 @@ fail:
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim{{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
|
||||
{{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim{{^required}} : {{^isEnum}}NULL{{/isEnum}}{{#isEnum}}0{{/isEnum}}{{/required}}{{^-last}},{{/-last}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
@@ -929,8 +949,10 @@ end:
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
if ({{{name}}}_local_nonprim) {
|
||||
{{^isEnum}}
|
||||
{{complexType}}_free({{{name}}}_local_nonprim);
|
||||
{{{name}}}_local_nonprim = NULL;
|
||||
{{/isEnum}}
|
||||
{{{name}}}_local_nonprim = {{^isEnum}}NULL{{/isEnum}}{{#isEnum}}0{{/isEnum}};
|
||||
}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
|
||||
+14
-2
@@ -30,14 +30,15 @@ char* {{classFilename}}_{{classname}}_ToString({{projectName}}_{{classVarName}}_
|
||||
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{classFilename}}_{{classname}}_FromString(char* {{classname}});
|
||||
|
||||
//cJSON *{{classFilename}}_{{classname}}_convertToJSON({{projectName}}_{{classVarName}}_{{enumName}}_e {{classname}});
|
||||
cJSON *{{classname}}_convertToJSON({{projectName}}_{{classVarName}}_{{enumName}}_e {{classname}});
|
||||
|
||||
//{{projectName}}_{{classVarName}}_{{enumName}}_e {{classFilename}}_{{classname}}_parseFromJSON(cJSON *{{classname}}JSON);
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{classname}}_parseFromJSON(cJSON *{{classname}}JSON);
|
||||
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#vars}}
|
||||
{{^isContainer}}
|
||||
{{#isPrimitiveType}}
|
||||
{{^isModel}}
|
||||
{{#isEnum}}
|
||||
// Enum {{enumName}} for {{classVarName}}
|
||||
@@ -52,6 +53,7 @@ char* {{classFilename}}_{{name}}_ToString({{projectName}}_{{classVarName}}_{{enu
|
||||
|
||||
{{/isEnum}}
|
||||
{{/isModel}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#items}}
|
||||
@@ -88,7 +90,12 @@ typedef struct {{classname}}_t {
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}; // custom
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}; //referenced enum
|
||||
{{/isEnum}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
@@ -163,7 +170,12 @@ typedef struct {{classname}}_t {
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
|
||||
+5
-2
@@ -37,9 +37,12 @@ import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext;
|
||||
import {{rootJavaEEPackage}}.json.stream.JsonGenerator;
|
||||
import {{rootJavaEEPackage}}.json.stream.JsonParser;
|
||||
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty;
|
||||
{{#vendorExtensions.x-has-readonly-properties}}
|
||||
{{#jsonbPolymorphism}}
|
||||
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbSubtype;
|
||||
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTransient;
|
||||
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeInfo;
|
||||
{{/jsonbPolymorphism}}
|
||||
import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator;
|
||||
{{/vendorExtensions.x-has-readonly-properties}}
|
||||
{{/jsonb}}
|
||||
{{#useBeanValidation}}
|
||||
import {{rootJavaEEPackage}}.validation.constraints.*;
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
* {{{.}}}
|
||||
*/
|
||||
{{/description}}
|
||||
{{>additionalModelTypeAnnotations}}
|
||||
{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
|
||||
{{#vendorExtensions.x-class-extra-annotation}}
|
||||
{{{vendorExtensions.x-class-extra-annotation}}}
|
||||
{{/vendorExtensions.x-class-extra-annotation}}
|
||||
@@ -45,7 +45,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
|
||||
*/
|
||||
{{/description}}
|
||||
{{^withXml}}
|
||||
{{#jsonb}}@JsonbProperty("{{baseName}}"){{/jsonb}}
|
||||
{{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}}
|
||||
{{/withXml}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@
|
||||
{{/jackson}}
|
||||
<jakarta.activation.version>2.1.0</jakarta.activation.version>
|
||||
<jakarta.annotation.version>2.0.0</jakarta.annotation.version>
|
||||
<jakarta.json.bind.version>2.0.0</jakarta.json.bind.version>
|
||||
<jakarta.json.bind.version>3.0.0</jakarta.json.bind.version>
|
||||
<jakarta.json.version>2.0.1</jakarta.json.version>
|
||||
<jakarta.ws.rs.version>3.0.0</jakarta.ws.rs.version>
|
||||
<jakarta.xml.bind.version>3.0.1</jakarta.xml.bind.version>
|
||||
|
||||
+3
-3
@@ -156,9 +156,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
||||
|
||||
{{/withXml}}
|
||||
Consumer<List<HttpMessageConverter<?>>> messageConverters = converters -> {
|
||||
converters.add(new MappingJackson2HttpMessageConverter(mapper));
|
||||
converters.add(0, new MappingJackson2HttpMessageConverter(mapper));
|
||||
{{#withXml}}
|
||||
converters.add(new MappingJackson2XmlHttpMessageConverter(xmlMapper));
|
||||
converters.add(0, new MappingJackson2XmlHttpMessageConverter(xmlMapper));
|
||||
{{/withXml}}
|
||||
};
|
||||
|
||||
@@ -750,4 +750,4 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
||||
|
||||
return collectionFormat.collectionToString(values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,3 +15,9 @@
|
||||
{{/-last}}
|
||||
{{/discriminator.mappedModels}}
|
||||
{{/jackson}}
|
||||
{{#jsonbPolymorphism}}
|
||||
@JsonbTypeInfo(key = "{{{discriminator.propertyBaseName}}}"{{#discriminator.mappedModels}}{{#-first}}, value = {
|
||||
{{/-first}}
|
||||
@JsonbSubtype(alias = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}", type = {{modelName}}.class),
|
||||
{{#-last}}
|
||||
}{{/-last}}{{/discriminator.mappedModels}}){{/jsonbPolymorphism}}
|
||||
@@ -34,9 +34,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{#isContainer}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{/isContainer}}{{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
{{/vars}}
|
||||
|
||||
{{#generateBuilders}}
|
||||
{{^additionalProperties}}
|
||||
|
||||
protected {{classname}}({{classname}}Builder<?, ?> b) {
|
||||
{{#parent}}
|
||||
super(b);
|
||||
@@ -46,11 +46,33 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
public {{classname}}() {
|
||||
}
|
||||
{{/additionalProperties}}
|
||||
{{/generateBuilders}}
|
||||
public {{classname}}() {
|
||||
}
|
||||
|
||||
{{#hasRequired}}
|
||||
@JsonCreator
|
||||
public {{classname}}(
|
||||
{{#requiredVars}}
|
||||
@JsonProperty(required = {{required}}, value = "{{baseName}}") {{>beanValidatedType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/requiredVars}}
|
||||
) {
|
||||
{{#parent}}
|
||||
super(
|
||||
{{#parentRequiredVars}}
|
||||
{{name}}{{^-last}},{{/-last}}
|
||||
{{/parentRequiredVars}}
|
||||
);
|
||||
{{/parent}}
|
||||
{{#vars}}
|
||||
{{#required}}
|
||||
this.{{name}} = {{name}};
|
||||
{{/required}}
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
{{/hasRequired}}
|
||||
{{#vars}}
|
||||
/**
|
||||
{{#description}}
|
||||
@@ -71,12 +93,12 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
{{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}}{{#useSwaggerAnnotations}}
|
||||
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}
|
||||
@org.eclipse.microprofile.openapi.annotations.media.Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}description = "{{{description}}}"){{/useMicroProfileOpenAPIAnnotations}}
|
||||
@JsonProperty("{{baseName}}")
|
||||
@JsonProperty({{#required}}required = {{required}}, value = {{/required}}"{{baseName}}")
|
||||
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}public {{>beanValidatedType}} {{getter}}() {
|
||||
return {{name}};
|
||||
}
|
||||
|
||||
@JsonProperty("{{baseName}}")
|
||||
@JsonProperty({{#required}}required = {{required}}, value = {{/required}}"{{baseName}}")
|
||||
{{#vendorExtensions.x-setter-extra-annotation}}{{{vendorExtensions.x-setter-extra-annotation}}}
|
||||
{{/vendorExtensions.x-setter-extra-annotation}}public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
|
||||
this.{{name}} = {{name}};
|
||||
|
||||
+76
-5
@@ -8,6 +8,9 @@
|
||||
#ifndef {{modelHeaderGuardPrefix}}_{{classname}}_H_
|
||||
#define {{modelHeaderGuardPrefix}}_{{classname}}_H_
|
||||
|
||||
{{#hasEnums}}
|
||||
#include <stdexcept>
|
||||
{{/hasEnums}}
|
||||
{{#oneOf}}
|
||||
{{#-first}}
|
||||
#include <variant>
|
||||
@@ -125,9 +128,11 @@ public:
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
|
||||
{{#description}}
|
||||
/// <summary>
|
||||
/// {{description}}
|
||||
/// </summary>
|
||||
{{/description}}
|
||||
class {{declspec}} {{classname}}
|
||||
: public {{{parent}}}{{^parent}}ModelBase{{/parent}}
|
||||
{
|
||||
@@ -146,35 +151,101 @@ public:
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// {{classname}} members
|
||||
|
||||
{{! ENUM DEFINITIONS }}
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{#isEnum}}
|
||||
enum class {{#isContainer}}{{{enumName}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}{{/isContainer}}
|
||||
{
|
||||
{{#allowableValues}}{{#enumVars}}{{value}},
|
||||
{{/enumVars}}{{/allowableValues}}
|
||||
};
|
||||
{{#description}}
|
||||
/// <summary>
|
||||
/// {{description}}
|
||||
/// </summary>
|
||||
{{#isContainer}}{{{dataType}}}& {{getter}}();
|
||||
{{/isContainer}}{{^isContainer}}{{{dataType}}} {{getter}}() const;
|
||||
{{/isContainer}}bool {{nameInCamelCase}}IsSet() const;
|
||||
void unset{{name}}();
|
||||
{{/description}}
|
||||
{{/isEnum}}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{#isEnum}}
|
||||
{{#isContainer}}
|
||||
{{! ENUM CONVERSIONS }}
|
||||
{{{enumName}}} to{{{enumName}}}(const utility::string_t& value) const;
|
||||
const utility::string_t from{{{enumName}}}(const {{{enumName}}} value) const;
|
||||
{{#isArray}}
|
||||
{{{datatypeWithEnum}}} to{{{enumName}}}(const {{{dataType}}}& value) const;
|
||||
{{{dataType}}} from{{{enumName}}}(const {{{datatypeWithEnum}}}& value) const;
|
||||
{{/isArray}}{{/isContainer}}{{^isContainer}}
|
||||
{{{datatypeWithEnum}}} to{{{datatypeWithEnum}}}(const utility::string_t& value) const;
|
||||
const utility::string_t from{{{datatypeWithEnum}}}(const {{{datatypeWithEnum}}} value) const;
|
||||
{{/isContainer}}
|
||||
|
||||
{{/isEnum}}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
|
||||
{{! SETTER AND GETTERS }}
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{#description}}
|
||||
/// <summary>
|
||||
/// {{description}}
|
||||
/// </summary>
|
||||
{{/description}}
|
||||
{{#isContainer}}
|
||||
{{^isEnum}}
|
||||
{{{dataType}}} {{getter}}() const;
|
||||
{{/isEnum}}
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
{{^isEnum}}
|
||||
{{{dataType}}} {{getter}}() const;
|
||||
{{/isEnum}}
|
||||
{{/isContainer}}
|
||||
{{#isEnum}}
|
||||
{{^isMap}}
|
||||
{{{datatypeWithEnum}}} {{getter}}() const;
|
||||
{{/isMap}}
|
||||
{{#isMap}}
|
||||
{{{dataType}}} {{getter}}() const;
|
||||
{{/isMap}}
|
||||
{{/isEnum}}
|
||||
bool {{nameInCamelCase}}IsSet() const;
|
||||
void unset{{name}}();
|
||||
{{#isPrimitiveType}}
|
||||
void {{setter}}({{{dataType}}} value);
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{^isEnum}}
|
||||
void {{setter}}(const {{{dataType}}}& value);
|
||||
{{/isEnum}}
|
||||
{{/isPrimitiveType}}
|
||||
|
||||
{{#isEnum}}
|
||||
void {{setter}}(const {{^isMap}}{{{datatypeWithEnum}}}{{/isMap}}{{#isMap}}{{{dataType}}}{{/isMap}} value);
|
||||
{{/isEnum}}
|
||||
{{/isInherited}}
|
||||
|
||||
{{/vars}}
|
||||
|
||||
protected:
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{^isEnum}}
|
||||
{{{dataType}}} m_{{name}};
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{^isMap}}{{{datatypeWithEnum}}}{{/isMap}}{{#isMap}}{{{dataType}}}{{/isMap}} m_{{name}};
|
||||
{{/isEnum}}
|
||||
bool m_{{name}}IsSet;
|
||||
{{/isInherited}}
|
||||
|
||||
{{/vars}}
|
||||
};
|
||||
|
||||
|
||||
+143
-18
@@ -6,7 +6,8 @@
|
||||
{{#modelNamespaceDeclarations}}
|
||||
namespace {{this}} {
|
||||
{{/modelNamespaceDeclarations}}
|
||||
{{#oneOf}}{{#-first}}
|
||||
{{#oneOf}}
|
||||
{{#-first}}
|
||||
|
||||
void {{classname}}::validate()
|
||||
{
|
||||
@@ -54,7 +55,8 @@ template bool {{classname}}::fromJson<{{.}}>(const web::json::value& json);
|
||||
template bool {{classname}}::fromMultiPart<{{.}}>(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix);
|
||||
{{/oneOf}}
|
||||
|
||||
{{/-first}}{{/oneOf}}
|
||||
{{/-first}}
|
||||
{{/oneOf}}
|
||||
{{^oneOf}}
|
||||
{{#isEnum}}
|
||||
|
||||
@@ -175,7 +177,6 @@ void {{classname}}::setValue({{classname}}::e{{classname}} const value)
|
||||
}
|
||||
|
||||
{{/isEnum}}
|
||||
|
||||
{{^isEnum}}
|
||||
|
||||
{{classname}}::{{classname}}()
|
||||
@@ -183,6 +184,7 @@ void {{classname}}::setValue({{classname}}::e{{classname}} const value)
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{^isContainer}}
|
||||
{{^isEnum}}
|
||||
{{#isPrimitiveType}}
|
||||
m_{{name}} = {{{defaultValue}}};
|
||||
{{/isPrimitiveType}}
|
||||
@@ -194,6 +196,7 @@ void {{classname}}::setValue({{classname}}::e{{classname}} const value)
|
||||
m_{{name}} = {{{defaultValue}}};
|
||||
{{/isDateTime}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isEnum}}
|
||||
{{/isContainer}}
|
||||
m_{{name}}IsSet = false;
|
||||
{{/isInherited}}
|
||||
@@ -212,15 +215,29 @@ void {{classname}}::validate()
|
||||
web::json::value {{classname}}::toJson() const
|
||||
{
|
||||
{{#parent}}
|
||||
web::json::value val = this->{{{.}}}::toJson();{{/parent}}
|
||||
web::json::value val = this->{{{.}}}::toJson();
|
||||
{{/parent}}
|
||||
{{^parent}}
|
||||
web::json::value val = web::json::value::object();
|
||||
{{/parent}}
|
||||
{{#vars}}{{^isInherited}}
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
if(m_{{name}}IsSet)
|
||||
{
|
||||
{
|
||||
{{#isEnum}}{{#isContainer}}{{#isArray}}
|
||||
{{{dataType}}} refVal = from{{{enumName}}}(m_{{name}});
|
||||
{{/isArray}}{{#isMap}}
|
||||
val[utility::conversions::to_string_t(U("{{baseName}}"))] = ModelBase::toJson(m_{{name}});
|
||||
}{{/isInherited}}{{/vars}}
|
||||
{{/isMap}}{{/isContainer}}{{^isContainer}}
|
||||
utility::string_t refVal = from{{{datatypeWithEnum}}}(m_{{name}});
|
||||
{{/isContainer}}{{^isMap}}val[utility::conversions::to_string_t(U("{{baseName}}"))] = ModelBase::toJson(refVal);
|
||||
{{/isMap}}{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
val[utility::conversions::to_string_t(U("{{baseName}}"))] = ModelBase::toJson(m_{{name}});
|
||||
{{/isEnum}}
|
||||
}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
|
||||
return val;
|
||||
}
|
||||
@@ -231,7 +248,8 @@ bool {{classname}}::fromJson(const web::json::value& val)
|
||||
{{#parent}}
|
||||
ok &= this->{{{.}}}::fromJson(val);
|
||||
{{/parent}}
|
||||
{{#vars}}{{^isInherited}}
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("{{baseName}}"))))
|
||||
{
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("{{baseName}}")));
|
||||
@@ -239,9 +257,20 @@ bool {{classname}}::fromJson(const web::json::value& val)
|
||||
{
|
||||
{{{dataType}}} refVal_{{setter}};
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_{{setter}});
|
||||
{{^isEnum}}
|
||||
{{setter}}(refVal_{{setter}});
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}{{#isContainer}}{{#isArray}}
|
||||
{{setter}}(to{{{enumName}}}(refVal_{{setter}}));
|
||||
{{/isArray}}{{#isMap}}
|
||||
{{setter}}(refVal_{{setter}});
|
||||
{{/isMap}}{{/isContainer}}{{^isContainer}}
|
||||
{{setter}}(to{{{datatypeWithEnum}}}(refVal_{{setter}}));
|
||||
{{/isContainer}}{{/isEnum}}
|
||||
}
|
||||
}{{/isInherited}}{{/vars}}
|
||||
}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -255,7 +284,21 @@ void {{classname}}::toMultipart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
{{#vars}}
|
||||
if(m_{{name}}IsSet)
|
||||
{
|
||||
{{^isEnum}}
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("{{baseName}}")), m_{{name}}));
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("{{baseName}}")), from{{{enumName}}}(m_{{name}})));
|
||||
{{/isArray}}{{#isMap}}
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("{{baseName}}")), m_{{name}}));
|
||||
{{/isMap}}
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("{{baseName}}")), from{{{datatypeWithEnum}}}(m_{{name}})));
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
}
|
||||
{{/vars}}
|
||||
}
|
||||
@@ -274,7 +317,22 @@ bool {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
{
|
||||
{{{dataType}}} refVal_{{setter}};
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("{{baseName}}"))), refVal_{{setter}} );
|
||||
{{^isEnum}}
|
||||
{{setter}}(refVal_{{setter}});
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
{{setter}}(to{{{enumName}}}(refVal_{{setter}}));
|
||||
{{/isArray}}
|
||||
{{#isMap}}
|
||||
{{setter}}(refVal_{{setter}});
|
||||
{{/isMap}}
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
{{setter}}(to{{{datatypeWithEnum}}}(refVal_{{setter}}));
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
}
|
||||
{{/vars}}
|
||||
return ok;
|
||||
@@ -282,25 +340,93 @@ bool {{classname}}::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{#isEnum}}
|
||||
{{#isContainer}}
|
||||
{{{dataType}}}& {{classname}}::{{getter}}()
|
||||
{
|
||||
return m_{{name}};
|
||||
}
|
||||
{{classname}}::{{{enumName}}} {{classname}}::to{{{enumName}}}(const utility::string_t& value) const
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
{{classname}}::{{{datatypeWithEnum}}} {{classname}}::to{{{datatypeWithEnum}}}(const {{dataType}}& value) const
|
||||
{{/isContainer}}
|
||||
{
|
||||
{{#allowableValues}}{{#enumVars}}
|
||||
if (value == utility::conversions::to_string_t("{{value}}")) {
|
||||
return {{#isContainer}}{{{enumName}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}{{/isContainer}}::{{value}};
|
||||
}
|
||||
{{/enumVars}}{{/allowableValues}}
|
||||
throw std::invalid_argument("Invalid value for conversion to {{{datatypeWithEnum}}}");
|
||||
}
|
||||
|
||||
{{#isContainer}}
|
||||
const utility::string_t {{classname}}::from{{{enumName}}}(const {{{enumName}}} value) const
|
||||
{{/isContainer}}{{^isContainer}}
|
||||
const {{dataType}} {{classname}}::from{{{datatypeWithEnum}}}(const {{{datatypeWithEnum}}} value) const
|
||||
{{/isContainer}}
|
||||
{
|
||||
switch(value)
|
||||
{
|
||||
{{#allowableValues}}{{#enumVars}}
|
||||
case {{#isContainer}}{{{enumName}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}{{/isContainer}}::{{value}}: return utility::conversions::to_string_t("{{value}}");
|
||||
{{/enumVars}}{{/allowableValues}}
|
||||
}
|
||||
}
|
||||
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
{{{dataType}}} {{{classname}}}::from{{{enumName}}}(const {{{datatypeWithEnum}}}& value) const
|
||||
{
|
||||
{{{dataType}}} ret;
|
||||
for (auto it = value.begin(); it != value.end(); it++) {
|
||||
ret.push_back(from{{{enumName}}}(*it));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
{{{baseType}}}<{{classname}}::{{{enumName}}}> {{{classname}}}::to{{{enumName}}}(const {{{dataType}}}& value) const
|
||||
{
|
||||
{{{datatypeWithEnum}}} ret;
|
||||
for (auto it = value.begin(); it != value.end(); it++) {
|
||||
ret.push_back(to{{{enumName}}}(*it));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
{{/isArray}}
|
||||
{{/isContainer}}
|
||||
{{/isEnum}}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
|
||||
{{#vars}}
|
||||
{{^isInherited}}
|
||||
{{#isContainer}}
|
||||
{{^isEnum}}
|
||||
{{{dataType}}} {{classname}}::{{getter}}() const
|
||||
{
|
||||
return m_{{name}};
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{/isContainer}}
|
||||
{{^isContainer}}
|
||||
{{^isEnum}}
|
||||
{{{dataType}}} {{classname}}::{{getter}}() const
|
||||
{
|
||||
return m_{{name}};
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{/isContainer}}
|
||||
{{#isEnum}}
|
||||
{{^isMap}}{{#isArray}}{{{baseType}}}<{{/isArray}}{{{classname}}}::{{{enumName}}}{{#isArray}}>{{/isArray}}{{/isMap}}{{#isMap}}{{{dataType}}}{{/isMap}} {{classname}}::{{getter}}() const
|
||||
{
|
||||
return m_{{name}};
|
||||
}
|
||||
{{/isEnum}}
|
||||
|
||||
{{#isPrimitiveType}}
|
||||
void {{classname}}::{{setter}}({{{dataType}}} value)
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isEnum}}
|
||||
void {{classname}}::{{setter}}(const {{{dataType}}}& value)
|
||||
{{/isPrimitiveType}}
|
||||
{{/isEnum}}{{/isPrimitiveType}}{{#isEnum}}
|
||||
void {{classname}}::{{setter}}(const {{^isMap}}{{{datatypeWithEnum}}}{{/isMap}}{{#isMap}}{{{dataType}}}{{/isMap}} value)
|
||||
{{/isEnum}}
|
||||
{
|
||||
m_{{name}} = value;
|
||||
m_{{name}}IsSet = true;
|
||||
@@ -315,8 +441,7 @@ void {{classname}}::unset{{name}}()
|
||||
{
|
||||
m_{{name}}IsSet = false;
|
||||
}
|
||||
{{/isInherited}}
|
||||
{{/vars}}
|
||||
{{/isInherited}}{{/vars}}
|
||||
{{/isEnum}}
|
||||
{{/oneOf}}
|
||||
{{#modelNamespaceDeclarations}}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user