mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-01-18 00:57:06 +00:00
Compare commits
38 Commits
update-dat
...
remove-dep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7d3bc826d | ||
|
|
2c9a3a0e6c | ||
|
|
8e17d728df | ||
|
|
c596bb7d8a | ||
|
|
ce338a4a23 | ||
|
|
fb444bf15e | ||
|
|
a144678459 | ||
|
|
95b9438fd9 | ||
|
|
7beb8a6102 | ||
|
|
2107686d3d | ||
|
|
7486f12e62 | ||
|
|
600c051fa5 | ||
|
|
f37b8cce58 | ||
|
|
64c8711356 | ||
|
|
65359d8050 | ||
|
|
7ce0096e73 | ||
|
|
0ae50f5a10 | ||
|
|
3347204425 | ||
|
|
93d7821281 | ||
|
|
1e614d4b96 | ||
|
|
66b742038a | ||
|
|
9b8ab659ac | ||
|
|
f9d2b8b579 | ||
|
|
0120486e62 | ||
|
|
44075c9edf | ||
|
|
3d4f29eac7 | ||
|
|
351b601368 | ||
|
|
2c248e6c93 | ||
|
|
68b0dfe6d1 | ||
|
|
31e462dc3e | ||
|
|
74488fa3c3 | ||
|
|
8c54f18f7c | ||
|
|
57d12811ef | ||
|
|
676efae183 | ||
|
|
a4d05b38f5 | ||
|
|
75ae04ecfd | ||
|
|
808d106e0c | ||
|
|
9d810e0fbb |
19
README.md
19
README.md
@@ -15,7 +15,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.17.0`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.18.0`):
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.bitrise.io/app/4a2b10a819d12b67)
|
||||
|
||||
@@ -148,8 +148,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
| OpenAPI Generator Version | Release Date | Notes |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| 7.17.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 24.10.2025 | Minor release with breaking changes (with fallback) |
|
||||
| [7.16.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.16.0) (latest stable release) | 28.09.2025 | Minor release with breaking changes (with fallback) |
|
||||
| 7.18.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 10.12.2025 | Minor release with breaking changes (with fallback) |
|
||||
| [7.17.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.17.0) (latest stable release) | 29.10.2025 | 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) |
|
||||
@@ -212,16 +212,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.16.0/openapi-generator-cli-7.16.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.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.16.0/openapi-generator-cli-7.16.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -456,7 +456,7 @@ openapi-generator-cli version
|
||||
To use a specific version of "openapi-generator-cli"
|
||||
|
||||
```sh
|
||||
openapi-generator-cli version-manager set 7.16.0
|
||||
openapi-generator-cli version-manager set 7.17.0
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -480,7 +480,7 @@ pip install openapi-generator-cli
|
||||
|
||||
To install a specific version
|
||||
```
|
||||
pip install openapi-generator-cli==7.16.0
|
||||
pip install openapi-generator-cli==7.17.0
|
||||
```
|
||||
|
||||
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
|
||||
@@ -506,7 +506,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.16.0/openapi-generator-cli-7.16.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.17.0/openapi-generator-cli-7.17.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`
|
||||
@@ -1182,6 +1182,7 @@ Here is a list of template creators:
|
||||
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||
* Scala Lagom: @gmkumar2005
|
||||
* Scala Play: @adigerber
|
||||
* TypeScript NestJS: @aryobenholzner
|
||||
* Documentation
|
||||
* AsciiDoc: @man-at-home
|
||||
* HTML Doc 2: @jhitchcock
|
||||
|
||||
@@ -6,7 +6,7 @@ library: httpx
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
mapNumberTo: float
|
||||
poetry1: true
|
||||
poetry1: false
|
||||
nameMappings:
|
||||
_type: underscore_type
|
||||
type_: type_with_underscore
|
||||
|
||||
8
bin/configs/rust-reqwest-enum-query-params.yaml
Normal file
8
bin/configs/rust-reqwest-enum-query-params.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: rust
|
||||
outputDir: samples/client/others/rust/reqwest/enum-query-params
|
||||
library: reqwest
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/enum-query-params.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/rust
|
||||
additionalProperties:
|
||||
supportAsync: true
|
||||
packageName: enum-query-params-reqwest
|
||||
@@ -644,6 +644,13 @@ Example:
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/required-properties.yaml -o /tmp/java-okhttp/ --openapi-normalizer NORMALIZER_CLASS=org.openapitools.codegen.OpenAPINormalizerTest$RemoveRequiredNormalizer
|
||||
```
|
||||
|
||||
- `REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT`: When set to true, remove the "properties" of a schema with type other than "object".
|
||||
|
||||
Example:
|
||||
```
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/required-properties.yaml -o /tmp/java-okhttp/ --openapi-normalizer REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT=true
|
||||
```
|
||||
|
||||
- `FILTER`
|
||||
|
||||
The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated. Multiple filters can be separated by a semicolon.
|
||||
|
||||
@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>UUID</li>
|
||||
<li>bool</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|DateTime|✓|OAS2,OAS3
|
||||
|Password|✓|OAS2,OAS3
|
||||
|File|✓|OAS2
|
||||
|Uuid|✗|
|
||||
|Uuid|✓|
|
||||
|Array|✓|OAS2,OAS3
|
||||
|Null|✗|OAS3
|
||||
|AnyType|✗|OAS2,OAS3
|
||||
|
||||
@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>UUID</li>
|
||||
<li>bool</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|DateTime|✓|OAS2,OAS3
|
||||
|Password|✓|OAS2,OAS3
|
||||
|File|✓|OAS2
|
||||
|Uuid|✗|
|
||||
|Uuid|✓|
|
||||
|Array|✓|OAS2,OAS3
|
||||
|Null|✗|OAS3
|
||||
|AnyType|✗|OAS2,OAS3
|
||||
|
||||
@@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>UUID</li>
|
||||
<li>bool</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
@@ -150,7 +151,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|DateTime|✓|OAS2,OAS3
|
||||
|Password|✓|OAS2,OAS3
|
||||
|File|✓|OAS2
|
||||
|Uuid|✗|
|
||||
|Uuid|✓|
|
||||
|Array|✓|OAS2,OAS3
|
||||
|Null|✗|OAS3
|
||||
|AnyType|✗|OAS2,OAS3
|
||||
|
||||
@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>UUID</li>
|
||||
<li>bool</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|DateTime|✓|OAS2,OAS3
|
||||
|Password|✓|OAS2,OAS3
|
||||
|File|✓|OAS2
|
||||
|Uuid|✗|
|
||||
|Uuid|✓|
|
||||
|Array|✓|OAS2,OAS3
|
||||
|Null|✗|OAS3
|
||||
|AnyType|✗|OAS2,OAS3
|
||||
|
||||
@@ -53,6 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>UUID</li>
|
||||
<li>bool</li>
|
||||
<li>bytearray</li>
|
||||
<li>bytes</li>
|
||||
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|DateTime|✓|OAS2,OAS3
|
||||
|Password|✓|OAS2,OAS3
|
||||
|File|✓|OAS2
|
||||
|Uuid|✗|
|
||||
|Uuid|✓|
|
||||
|Array|✓|OAS2,OAS3
|
||||
|Null|✗|OAS3
|
||||
|AnyType|✗|OAS2,OAS3
|
||||
|
||||
@@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g
|
||||
To install a specific version of the tool, pass the version during installation:
|
||||
<!-- RELEASE_VERSION -->
|
||||
```bash
|
||||
openapi-generator-cli version-manager set 7.16.0
|
||||
openapi-generator-cli version-manager set 7.17.0
|
||||
```
|
||||
<!-- /RELEASE_VERSION -->
|
||||
To install the tool as a dev dependency in your current project:
|
||||
@@ -119,18 +119,18 @@ docker run --rm \
|
||||
<!-- 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.16.0/openapi-generator-cli-7.16.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
|
||||
```bash
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.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.
|
||||
|
||||
```powershell
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar
|
||||
```
|
||||
<!-- /RELEASE_VERSION -->
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>7.16.0</version>
|
||||
<version>7.17.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.16.0"
|
||||
id "org.openapi.generator" version "7.17.0"
|
||||
}
|
||||
----
|
||||
|
||||
@@ -113,7 +113,7 @@ buildscript {
|
||||
// url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.16.0"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.17.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.16.0') {
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.17.0') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.17.0-SNAPSHOT
|
||||
openApiGeneratorVersion=7.18.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
# BEGIN placeholders
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.16.0 openApiValidate
|
||||
gradle -PopenApiGeneratorVersion=7.17.0 openApiValidate
|
||||
```
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.17.0-SNAPSHOT
|
||||
openApiGeneratorVersion=7.18.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
@@ -81,12 +81,12 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
|
||||
/**
|
||||
* The template directory holding a custom template.
|
||||
*/
|
||||
val templateDir = project.objects.property<String?>()
|
||||
val templateDir = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* The template location (which may be a directory or a classpath location) holding custom templates.
|
||||
*/
|
||||
val templateResourcePath = project.objects.property<String?>()
|
||||
val templateResourcePath = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Adds authorization headers when fetching the OpenAPI definitions remotely.
|
||||
@@ -109,7 +109,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
|
||||
/**
|
||||
* Specifies if the existing files should be overwritten during the generation.
|
||||
*/
|
||||
val skipOverwrite = project.objects.property<Boolean?>()
|
||||
val skipOverwrite = project.objects.property<Boolean>()
|
||||
|
||||
/**
|
||||
* Package for generated classes (where supported)
|
||||
@@ -244,32 +244,32 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
|
||||
/**
|
||||
* Reference the library template (sub-template) of a generator.
|
||||
*/
|
||||
val library = project.objects.property<String?>()
|
||||
val library = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Git host, e.g. gitlab.com.
|
||||
*/
|
||||
val gitHost = project.objects.property<String?>()
|
||||
val gitHost = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Git user ID, e.g. openapitools.
|
||||
*/
|
||||
val gitUserId = project.objects.property<String?>()
|
||||
val gitUserId = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Git repo ID, e.g. openapi-generator.
|
||||
*/
|
||||
val gitRepoId = project.objects.property<String?>()
|
||||
val gitRepoId = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Release note, default to 'Minor update'.
|
||||
*/
|
||||
val releaseNote = project.objects.property<String?>()
|
||||
val releaseNote = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* HTTP user agent, e.g. codegen_csharp_api_client, default to 'OpenAPI-Generator/{packageVersion}/{language}'
|
||||
*/
|
||||
val httpUserAgent = project.objects.property<String?>()
|
||||
val httpUserAgent = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Specifies how a reserved name should be escaped to. Otherwise, the default _<name> is used.
|
||||
@@ -279,17 +279,17 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
|
||||
/**
|
||||
* Specifies an override location for the .openapi-generator-ignore file. Most useful on initial generation.
|
||||
*/
|
||||
val ignoreFileOverride = project.objects.property<String?>()
|
||||
val ignoreFileOverride = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Remove prefix of operationId, e.g. config_getId => getId
|
||||
*/
|
||||
val removeOperationIdPrefix = project.objects.property<Boolean?>()
|
||||
val removeOperationIdPrefix = project.objects.property<Boolean>()
|
||||
|
||||
/**
|
||||
* Skip examples defined in the operation
|
||||
*/
|
||||
val skipOperationExample = project.objects.property<Boolean?>()
|
||||
val skipOperationExample = project.objects.property<Boolean>()
|
||||
|
||||
/**
|
||||
* Defines which API-related files should be generated. This allows you to create a subset of generated files (or none at all).
|
||||
@@ -394,7 +394,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
|
||||
/**
|
||||
* Templating engine: "mustache" (default) or "handlebars" (beta)
|
||||
*/
|
||||
val engine = project.objects.property<String?>()
|
||||
val engine = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Defines whether the output dir should be cleaned up before generating the output.
|
||||
|
||||
@@ -55,7 +55,6 @@ import org.openapitools.codegen.config.MergedSpecBuilder
|
||||
*
|
||||
* @author Jim Schubert
|
||||
*/
|
||||
@Suppress("UnstableApiUsage")
|
||||
@CacheableTask
|
||||
open class GenerateTask @Inject constructor(private val objectFactory: ObjectFactory) : DefaultTask() {
|
||||
|
||||
@@ -154,14 +153,14 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
@get:Optional
|
||||
@get:InputDirectory
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
val templateDir = project.objects.property<String?>()
|
||||
val templateDir = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Resource path containing template files.
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val templateResourcePath = project.objects.property<String?>()
|
||||
val templateResourcePath = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Adds authorization headers when fetching the OpenAPI definitions remotely.
|
||||
@@ -193,7 +192,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val skipOverwrite = project.objects.property<Boolean?>()
|
||||
val skipOverwrite = project.objects.property<Boolean>()
|
||||
|
||||
/**
|
||||
* Package for generated classes (where supported)
|
||||
@@ -384,42 +383,42 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val library = project.objects.property<String?>()
|
||||
val library = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Git host, e.g. gitlab.com.
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val gitHost = project.objects.property<String?>()
|
||||
val gitHost = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Git user ID, e.g. openapitools.
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val gitUserId = project.objects.property<String?>()
|
||||
val gitUserId = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Git repo ID, e.g. openapi-generator.
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val gitRepoId = project.objects.property<String?>()
|
||||
val gitRepoId = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Release note, default to 'Minor update'.
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val releaseNote = project.objects.property<String?>()
|
||||
val releaseNote = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* HTTP user agent, e.g. codegen_csharp_api_client, default to 'OpenAPI-Generator/{packageVersion}/{language}'
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val httpUserAgent = project.objects.property<String?>()
|
||||
val httpUserAgent = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Specifies how a reserved name should be escaped to.
|
||||
@@ -434,21 +433,21 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
@get:Optional
|
||||
@get:InputFile
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
val ignoreFileOverride = project.objects.property<String?>()
|
||||
val ignoreFileOverride = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Remove prefix of operationId, e.g. config_getId => getId
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val removeOperationIdPrefix = project.objects.property<Boolean?>()
|
||||
val removeOperationIdPrefix = project.objects.property<Boolean>()
|
||||
|
||||
/**
|
||||
* Remove examples defined in the operation
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val skipOperationExample = project.objects.property<Boolean?>()
|
||||
val skipOperationExample = project.objects.property<Boolean>()
|
||||
|
||||
/**
|
||||
* Defines which API-related files should be generated. This allows you to create a subset of generated files (or none at all).
|
||||
@@ -581,7 +580,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
*/
|
||||
@get:Optional
|
||||
@get:Input
|
||||
val engine = project.objects.property<String?>()
|
||||
val engine = project.objects.property<String>()
|
||||
|
||||
/**
|
||||
* Defines whether the output dir should be cleaned up before generating the output.
|
||||
@@ -598,19 +597,11 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
@get:Input
|
||||
val dryRun = project.objects.property<Boolean>()
|
||||
|
||||
private fun <T : Any?> Property<T>.ifNotEmpty(block: Property<T>.(T) -> Unit) {
|
||||
private fun <T> Property<T>.ifNotEmpty(block: Property<T>.(T) -> Unit) {
|
||||
if (isPresent) {
|
||||
val item: T? = get()
|
||||
if (item != null) {
|
||||
when (get()) {
|
||||
is String -> if ((get() as String).isNotEmpty()) {
|
||||
block(get())
|
||||
}
|
||||
is String? -> if (true == (get() as String?)?.isNotEmpty()) {
|
||||
block(get())
|
||||
}
|
||||
else -> block(get())
|
||||
}
|
||||
when (val value = get()) {
|
||||
is String -> if (value.isNotEmpty()) block(value)
|
||||
else -> block(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -725,7 +716,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
}
|
||||
|
||||
skipOverwrite.ifNotEmpty { value ->
|
||||
configurator.setSkipOverwrite(value ?: false)
|
||||
configurator.setSkipOverwrite(value)
|
||||
}
|
||||
|
||||
generatorName.ifNotEmpty { value ->
|
||||
@@ -820,11 +811,11 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
}
|
||||
|
||||
removeOperationIdPrefix.ifNotEmpty { value ->
|
||||
configurator.setRemoveOperationIdPrefix(value!!)
|
||||
configurator.setRemoveOperationIdPrefix(value)
|
||||
}
|
||||
|
||||
skipOperationExample.ifNotEmpty { value ->
|
||||
configurator.setSkipOperationExample(value!!)
|
||||
configurator.setSkipOperationExample(value)
|
||||
}
|
||||
|
||||
logToStderr.ifNotEmpty { value ->
|
||||
|
||||
@@ -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.16.0</version>
|
||||
<version>7.17.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.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.17.0-SNAPSHOT</version>
|
||||
<version>7.18.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -307,29 +307,11 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
return complexType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return dataType
|
||||
* @deprecated since version 3.0.0, use {@link #getDataType()} instead.<br>
|
||||
* May be removed with the next major release (4.0)
|
||||
*/
|
||||
@Deprecated
|
||||
public String getDatatype() {
|
||||
return getDataType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #setDataType(String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setDatatype(String datatype) {
|
||||
this.dataType = datatype;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
|
||||
@@ -356,7 +356,9 @@ public class InlineModelResolver {
|
||||
} else if (schema.getProperties() != null) {
|
||||
// If non-object type is specified but also properties
|
||||
LOGGER.error("Illegal schema found with non-object type combined with properties," +
|
||||
" no properties should be defined:\n " + schema.toString());
|
||||
" no properties should be defined:" +
|
||||
" consider using --openapi-normalizer REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT=true\n " +
|
||||
schema.toString());
|
||||
return;
|
||||
} else if (schema.getAdditionalProperties() != null) {
|
||||
// If non-object type is specified but also additionalProperties
|
||||
|
||||
@@ -124,6 +124,9 @@ public class OpenAPINormalizer {
|
||||
// the allOf contains a new schema containing the properties in the top level
|
||||
final String REFACTOR_ALLOF_WITH_PROPERTIES_ONLY = "REFACTOR_ALLOF_WITH_PROPERTIES_ONLY";
|
||||
|
||||
// when set to true, remove the "properties" of a schema with type other than "object"
|
||||
final String REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT = "REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT";
|
||||
|
||||
// when set to true, normalize OpenAPI 3.1 spec to make it work with the generator
|
||||
final String NORMALIZE_31SPEC = "NORMALIZE_31SPEC";
|
||||
|
||||
@@ -206,6 +209,7 @@ public class OpenAPINormalizer {
|
||||
ruleNames.add(SET_CONTAINER_TO_NULLABLE);
|
||||
ruleNames.add(SET_PRIMITIVE_TYPES_TO_NULLABLE);
|
||||
ruleNames.add(SIMPLIFY_ONEOF_ANYOF_ENUM);
|
||||
ruleNames.add(REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT);
|
||||
|
||||
// rules that are default to true
|
||||
rules.put(SIMPLIFY_ONEOF_ANYOF, true);
|
||||
@@ -702,6 +706,8 @@ public class OpenAPINormalizer {
|
||||
|
||||
markSchemaAsVisited(schema, visitedSchemas);
|
||||
|
||||
processNormalizeOtherThanObjectWithProperties(schema);
|
||||
|
||||
if (ModelUtils.isArraySchema(schema)) { // array
|
||||
Schema result = normalizeArraySchema(schema);
|
||||
normalizeSchema(result.getItems(), visitedSchemas);
|
||||
@@ -1961,6 +1967,23 @@ public class OpenAPINormalizer {
|
||||
private boolean hasMethod(String method) {
|
||||
return methodFilters.contains(method);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When set to true, remove "properties" attribute on schema other than "object"
|
||||
* since it should be ignored and may result in odd generated code
|
||||
*
|
||||
* @param schema Schema
|
||||
* @return Schema
|
||||
*/
|
||||
protected void processNormalizeOtherThanObjectWithProperties(Schema schema) {
|
||||
if (getRule(REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT)) {
|
||||
// Check object models / any type models / composed models for properties,
|
||||
// if the schema has a type defined that is not "object" it should not define
|
||||
// any properties
|
||||
if (schema.getType() != null && !"object".equals(schema.getType())) {
|
||||
schema.setProperties(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1359,20 +1359,20 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
|
||||
return String.format(Locale.ROOT, "new %s<>()",
|
||||
instantiationTypes().getOrDefault("map", "HashMap"));
|
||||
} else if (ModelUtils.isIntegerSchema(schema)) {
|
||||
} else if (ModelUtils.isIntegerSchema(schema) || cp.isInteger || cp.isLong) {
|
||||
if (schema.getDefault() != null) {
|
||||
if (SchemaTypeUtil.INTEGER64_FORMAT.equals(schema.getFormat())) {
|
||||
if (SchemaTypeUtil.INTEGER64_FORMAT.equals(schema.getFormat()) || cp.isLong) {
|
||||
return schema.getDefault().toString() + "l";
|
||||
} else {
|
||||
return schema.getDefault().toString();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else if (ModelUtils.isNumberSchema(schema)) {
|
||||
} else if (ModelUtils.isNumberSchema(schema) || cp.isFloat || cp.isDouble) {
|
||||
if (schema.getDefault() != null) {
|
||||
if (SchemaTypeUtil.FLOAT_FORMAT.equals(schema.getFormat())) {
|
||||
if (SchemaTypeUtil.FLOAT_FORMAT.equals(schema.getFormat()) || cp.isFloat) {
|
||||
return schema.getDefault().toString() + "f";
|
||||
} else if (SchemaTypeUtil.DOUBLE_FORMAT.equals(schema.getFormat())) {
|
||||
} else if (SchemaTypeUtil.DOUBLE_FORMAT.equals(schema.getFormat()) || cp.isDouble) {
|
||||
return schema.getDefault().toString() + "d";
|
||||
} else {
|
||||
return "new BigDecimal(\"" + schema.getDefault().toString() + "\")";
|
||||
@@ -1891,6 +1891,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
model.imports.add("Arrays");
|
||||
} else if ("set".equals(property.containerType)) {
|
||||
model.imports.add("LinkedHashSet");
|
||||
model.imports.add("Arrays");
|
||||
if ((!openApiNullable || !property.isNullable) && jackson) { // cannot be wrapped to nullable
|
||||
model.imports.add("JsonDeserialize");
|
||||
property.vendorExtensions.put("x-setter-extra-annotation", "@JsonDeserialize(as = LinkedHashSet.class)");
|
||||
|
||||
@@ -119,6 +119,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
convertPropertyToStringAndWriteBack(CodegenConstants.IMPL_FOLDER, this::setImplFolder);
|
||||
convertPropertyToBooleanAndWriteBack(USE_BEANVALIDATION, this::setUseBeanValidation);
|
||||
convertPropertyToBooleanAndWriteBack(USE_TAGS, this::setUseTags);
|
||||
convertPropertyToBooleanAndWriteBack(JACKSON, this::setJackson);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||
import org.openapitools.codegen.meta.features.DataTypeFeature;
|
||||
import org.openapitools.codegen.model.ModelMap;
|
||||
import org.openapitools.codegen.model.ModelsMap;
|
||||
import org.openapitools.codegen.model.OperationMap;
|
||||
@@ -71,7 +72,9 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
|
||||
SecurityFeature.BearerToken,
|
||||
SecurityFeature.ApiKey,
|
||||
SecurityFeature.OAuth2_Implicit
|
||||
)));
|
||||
)).includeDataTypeFeatures(
|
||||
DataTypeFeature.Uuid
|
||||
));
|
||||
|
||||
// from https://docs.python.org/3/reference/lexical_analysis.html#keywords
|
||||
setReservedWordsLowerCase(
|
||||
@@ -108,6 +111,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
|
||||
// TODO file and binary is mapped as `file`
|
||||
languageSpecificPrimitives.add("file");
|
||||
languageSpecificPrimitives.add("bytes");
|
||||
languageSpecificPrimitives.add("UUID");
|
||||
|
||||
typeMapping.clear();
|
||||
typeMapping.put("integer", "int");
|
||||
@@ -129,8 +133,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
|
||||
// mapped to String as a workaround
|
||||
typeMapping.put("binary", "str");
|
||||
typeMapping.put("ByteArray", "str");
|
||||
// map uuid to string for the time being
|
||||
typeMapping.put("UUID", "str");
|
||||
typeMapping.put("UUID", "UUID");
|
||||
typeMapping.put("URI", "str");
|
||||
typeMapping.put("null", "none_type");
|
||||
|
||||
@@ -571,7 +574,12 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
|
||||
type = p.dataType;
|
||||
}
|
||||
|
||||
if ("String".equalsIgnoreCase(type) || "str".equalsIgnoreCase(type)) {
|
||||
if (Boolean.TRUE.equals(p.isUuid)) {
|
||||
if (example == null) {
|
||||
example = "38400000-8cf0-11bd-b23e-10b96e4ef00d";
|
||||
}
|
||||
example = "UUID('" + escapeTextInSingleQuotes(example) + "')";
|
||||
} else if ("String".equalsIgnoreCase(type) || "str".equalsIgnoreCase(type)) {
|
||||
if (example == null) {
|
||||
example = p.paramName + "_example";
|
||||
}
|
||||
@@ -671,7 +679,13 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
|
||||
return getSchemaType(p) + "[str, " + getCollectionItemTypeDeclaration(inner) + "]";
|
||||
}
|
||||
|
||||
String openAPIType = getSchemaType(p);
|
||||
String openAPIType = super.getSchemaType(p);
|
||||
|
||||
if (openAPIType == null) {
|
||||
LOGGER.error("OpenAPI Type for {} is null. Default to UNKNOWN_OPENAPI_TYPE instead.", p.getName());
|
||||
openAPIType = "UNKNOWN_OPENAPI_TYPE";
|
||||
}
|
||||
|
||||
if (typeMapping.containsKey(openAPIType)) {
|
||||
return typeMapping.get(openAPIType);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import io.swagger.v3.oas.models.media.Schema;
|
||||
@@ -440,6 +441,17 @@ public class GoClientCodegen extends AbstractGoCodegen {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (ModelUtils.isArraySchema(p)) {
|
||||
StringJoiner joinedDefaultValues = new StringJoiner(", ");
|
||||
Object defaultValues = p.getDefault();
|
||||
if (defaultValues instanceof ArrayNode) {
|
||||
for (var value : (ArrayNode) defaultValues) {
|
||||
joinedDefaultValues.add(value.toString());
|
||||
}
|
||||
return "{" + joinedDefaultValues + "}";
|
||||
}
|
||||
}
|
||||
|
||||
return super.toDefaultValue(p);
|
||||
}
|
||||
|
||||
|
||||
@@ -187,19 +187,22 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
||||
supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")
|
||||
.doNotOverwrite());
|
||||
supportingFiles.add(new SupportingFile("RestResourceRoot.mustache",
|
||||
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestResourceRoot.java")
|
||||
.doNotOverwrite());
|
||||
|
||||
if (!interfaceOnly) {
|
||||
supportingFiles.add(new SupportingFile("RestResourceRoot.mustache",
|
||||
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestResourceRoot.java")
|
||||
.doNotOverwrite());
|
||||
|
||||
supportingFiles.add(new SupportingFile("RestApplication.mustache",
|
||||
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestApplication.java")
|
||||
.doNotOverwrite());
|
||||
}
|
||||
|
||||
if (generatePom) {
|
||||
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")
|
||||
.doNotOverwrite());
|
||||
}
|
||||
|
||||
supportingFiles.add(new SupportingFile("RestApplication.mustache",
|
||||
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestApplication.java")
|
||||
.doNotOverwrite());
|
||||
|
||||
if (StringUtils.isNotEmpty(openApiSpecFileLocation)) {
|
||||
int index = openApiSpecFileLocation.lastIndexOf('/');
|
||||
String fileFolder;
|
||||
@@ -276,6 +279,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
||||
if (!jackson) {
|
||||
codegenModel.imports.remove("JsonValue");
|
||||
codegenModel.imports.remove("JsonProperty");
|
||||
codegenModel.imports.remove("JsonTypeName");
|
||||
}
|
||||
return codegenModel;
|
||||
}
|
||||
|
||||
@@ -271,6 +271,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
|
||||
supportingFiles.add(new SupportingFile("gem.mustache", libFolder, gemName + ".rb"));
|
||||
String gemFolder = libFolder + File.separator + gemName;
|
||||
supportingFiles.add(new SupportingFile("api_error.mustache", gemFolder, "api_error.rb"));
|
||||
supportingFiles.add(new SupportingFile("api_model_base.mustache", gemFolder, "api_model_base.rb"));
|
||||
supportingFiles.add(new SupportingFile("version.mustache", gemFolder, "version.rb"));
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
|
||||
@@ -128,13 +128,13 @@ static {{classname}}_t *{{classname}}_create_internal(
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
@@ -142,21 +142,21 @@ static {{classname}}_t *{{classname}}_create_internal(
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isUuid}}
|
||||
{{#isEmail}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEmail}}
|
||||
{{#isFreeFormObject}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isPrimitiveType}}
|
||||
{{#isPrimitiveType}}
|
||||
{{#isNumeric}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isNumeric}}
|
||||
{{#isBoolean}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isBoolean}}
|
||||
{{#isEnum}}
|
||||
{{#isString}}
|
||||
@@ -165,34 +165,34 @@ static {{classname}}_t *{{classname}}_create_internal(
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#isString}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isString}}
|
||||
{{/isEnum}}
|
||||
{{#isByteArray}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isByteArray}}
|
||||
{{#isBinary}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isBinary}}
|
||||
{{#isDate}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isDate}}
|
||||
{{#isDateTime}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isDateTime}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
{{#isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isArray}}
|
||||
{{#isMap}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isMap}}
|
||||
{{/isContainer}}
|
||||
{{/vars}}
|
||||
@@ -218,13 +218,13 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
@@ -232,21 +232,21 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isUuid}}
|
||||
{{#isEmail}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEmail}}
|
||||
{{#isFreeFormObject}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isPrimitiveType}}
|
||||
{{#isPrimitiveType}}
|
||||
{{#isNumeric}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isNumeric}}
|
||||
{{#isBoolean}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isBoolean}}
|
||||
{{#isEnum}}
|
||||
{{#isString}}
|
||||
@@ -255,34 +255,34 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#isString}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isString}}
|
||||
{{/isEnum}}
|
||||
{{#isByteArray}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isByteArray}}
|
||||
{{#isBinary}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isBinary}}
|
||||
{{#isDate}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isDate}}
|
||||
{{#isDateTime}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isDateTime}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
{{#isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isArray}}
|
||||
{{#isMap}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isMap}}
|
||||
{{/isContainer}}
|
||||
{{/vars}}
|
||||
|
||||
@@ -85,13 +85,13 @@ typedef struct {{classname}}_t {
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}; //enum model
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
struct {{datatype}}_t *{{name}}; //model
|
||||
struct {{dataType}}_t *{{name}}; //model
|
||||
{{/isEnum}}
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}; // custom
|
||||
{{dataType}}_t *{{name}}; // custom
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}; //referenced enum
|
||||
@@ -99,21 +99,21 @@ typedef struct {{classname}}_t {
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
{{datatype}} *{{name}}; // uuid
|
||||
{{dataType}} *{{name}}; // uuid
|
||||
{{/isUuid}}
|
||||
{{#isEmail}}
|
||||
{{datatype}} *{{name}}; // email
|
||||
{{dataType}} *{{name}}; // email
|
||||
{{/isEmail}}
|
||||
{{#isFreeFormObject}}
|
||||
{{datatype}}_t *{{name}}; //object
|
||||
{{dataType}}_t *{{name}}; //object
|
||||
{{/isFreeFormObject}}
|
||||
{{/isPrimitiveType}}
|
||||
{{#isPrimitiveType}}
|
||||
{{#isNumeric}}
|
||||
{{datatype}} {{name}}; //numeric
|
||||
{{dataType}} {{name}}; //numeric
|
||||
{{/isNumeric}}
|
||||
{{#isBoolean}}
|
||||
{{datatype}} {{name}}; //boolean
|
||||
{{dataType}} {{name}}; //boolean
|
||||
{{/isBoolean}}
|
||||
{{#isEnum}}
|
||||
{{#isString}}
|
||||
@@ -122,34 +122,34 @@ typedef struct {{classname}}_t {
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#isString}}
|
||||
{{datatype}} *{{name}}; // string
|
||||
{{dataType}} *{{name}}; // string
|
||||
{{/isString}}
|
||||
{{/isEnum}}
|
||||
{{#isByteArray}}
|
||||
{{datatype}} *{{name}}; //ByteArray
|
||||
{{dataType}} *{{name}}; //ByteArray
|
||||
{{/isByteArray}}
|
||||
{{#isBinary}}
|
||||
{{datatype}} {{name}}; //binary
|
||||
{{dataType}} {{name}}; //binary
|
||||
{{/isBinary}}
|
||||
{{#isDate}}
|
||||
{{datatype}} *{{name}}; //date
|
||||
{{dataType}} *{{name}}; //date
|
||||
{{/isDate}}
|
||||
{{#isDateTime}}
|
||||
{{datatype}} *{{name}}; //date time
|
||||
{{dataType}} *{{name}}; //date time
|
||||
{{/isDateTime}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
{{#isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}; //primitive container
|
||||
{{dataType}}_t *{{name}}; //primitive container
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}; //nonprimitive container
|
||||
{{dataType}}_t *{{name}}; //nonprimitive container
|
||||
{{/isPrimitiveType}}
|
||||
{{/isArray}}
|
||||
{{#isMap}}
|
||||
{{datatype}} {{name}}; //map
|
||||
{{dataType}} {{name}}; //map
|
||||
{{/isMap}}
|
||||
{{/isContainer}}
|
||||
{{/vars}}
|
||||
@@ -166,13 +166,13 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
|
||||
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{/isModel}}
|
||||
{{^isModel}}
|
||||
{{^isFreeFormObject}}
|
||||
{{^isEnum}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEnum}}
|
||||
{{#isEnum}}
|
||||
{{projectName}}_{{dataType}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
|
||||
@@ -180,21 +180,21 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
|
||||
{{/isFreeFormObject}}
|
||||
{{/isModel}}
|
||||
{{#isUuid}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isUuid}}
|
||||
{{#isEmail}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isEmail}}
|
||||
{{#isFreeFormObject}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isFreeFormObject}}
|
||||
{{/isPrimitiveType}}
|
||||
{{#isPrimitiveType}}
|
||||
{{#isNumeric}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isNumeric}}
|
||||
{{#isBoolean}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isBoolean}}
|
||||
{{#isEnum}}
|
||||
{{#isString}}
|
||||
@@ -203,34 +203,34 @@ __attribute__((deprecated)) {{classname}}_t *{{classname}}_create(
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{#isString}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isString}}
|
||||
{{/isEnum}}
|
||||
{{#isByteArray}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isByteArray}}
|
||||
{{#isBinary}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isBinary}}
|
||||
{{#isDate}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isDate}}
|
||||
{{#isDateTime}}
|
||||
{{datatype}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isDateTime}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
{{#isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{datatype}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}}_t *{{name}}{{^-last}},{{/-last}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isArray}}
|
||||
{{#isMap}}
|
||||
{{datatype}} {{name}}{{^-last}},{{/-last}}
|
||||
{{dataType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/isMap}}
|
||||
{{/isContainer}}
|
||||
{{/vars}}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
{{#vars}}
|
||||
**{{name}}** | {{^isContainer}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isEnum}}{{^isEnum}}[**{{datatype}}_t**]({{complexType}}.md) \*{{/isEnum}}{{/isModel}}{{^isModel}}{{^isFreeFormObject}}**{{datatype}}_t \***{{/isFreeFormObject}}{{/isModel}}{{#isUuid}}**{{datatype}} \***{{/isUuid}}{{#isEmail}}**{{datatype}} \***{{/isEmail}}{{#isFreeFormObject}}[**{{datatype}}_t**]({{complexType}}.md) \*{{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isNumeric}}**{{datatype}}**{{/isNumeric}}{{#isBoolean}}**{{datatype}}**{{/isBoolean}}{{#isEnum}}{{#isString}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}**{{datatype}} \***{{/isString}}{{/isEnum}}{{#isByteArray}}**{{datatype}} \***{{/isByteArray}}{{#isBinary}}**{{datatype}}**{{/isBinary}}{{#isDate}}**{{datatype}} \***{{/isDate}}{{#isDateTime}}**{{datatype}} \***{{/isDateTime}}{{/isPrimitiveType}}{{/isContainer}}{{#isContainer}}{{#isArray}}{{#isPrimitiveType}}**{{datatype}}_t \***{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}_t**]({{complexType}}.md) \*{{/isPrimitiveType}}{{/isArray}}{{#isMap}}**{{datatype}}**{{/isMap}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||
**{{name}}** | {{^isContainer}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isEnum}}{{^isEnum}}[**{{dataType}}_t**]({{complexType}}.md) \*{{/isEnum}}{{/isModel}}{{^isModel}}{{^isFreeFormObject}}**{{dataType}}_t \***{{/isFreeFormObject}}{{/isModel}}{{#isUuid}}**{{dataType}} \***{{/isUuid}}{{#isEmail}}**{{dataType}} \***{{/isEmail}}{{#isFreeFormObject}}[**{{dataType}}_t**]({{complexType}}.md) \*{{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isNumeric}}**{{dataType}}**{{/isNumeric}}{{#isBoolean}}**{{dataType}}**{{/isBoolean}}{{#isEnum}}{{#isString}}**{{projectName}}_{{classVarName}}_{{enumName}}_e**{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}**{{dataType}} \***{{/isString}}{{/isEnum}}{{#isByteArray}}**{{dataType}} \***{{/isByteArray}}{{#isBinary}}**{{dataType}}**{{/isBinary}}{{#isDate}}**{{dataType}} \***{{/isDate}}{{#isDateTime}}**{{dataType}} \***{{/isDateTime}}{{/isPrimitiveType}}{{/isContainer}}{{#isContainer}}{{#isArray}}{{#isPrimitiveType}}**{{dataType}}_t \***{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}_t**]({{complexType}}.md) \*{{/isPrimitiveType}}{{/isArray}}{{#isMap}}**{{dataType}}**{{/isMap}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||
{{/vars}}
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@@ -117,7 +117,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
{{#useBeanValidation}}
|
||||
|
||||
@@ -117,7 +117,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
httpclient_version = "5.1.3"
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
|
||||
@@ -107,7 +107,7 @@ ext {
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{/jackson}}
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
feign_version = "13.5"
|
||||
|
||||
@@ -63,7 +63,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
|
||||
{{/gson}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -416,7 +416,7 @@
|
||||
<gson-version>2.10.1</gson-version>
|
||||
{{/gson}}
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
|
||||
@@ -101,7 +101,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
google_api_client_version = "1.32.2"
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
{{#joda}}
|
||||
<jodatime-version>2.9.9</jodatime-version>
|
||||
|
||||
@@ -107,7 +107,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
{{#useBeanValidation}}
|
||||
|
||||
@@ -24,7 +24,7 @@ lazy val root = (project in file(".")).
|
||||
{{/joda}}
|
||||
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.19.2" % "compile",
|
||||
{{#openApiNullable}}
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.7" % "compile",
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.8" % "compile",
|
||||
{{/openApiNullable}}
|
||||
{{#hasOAuthMethods}}
|
||||
"com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile",
|
||||
|
||||
@@ -63,7 +63,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
|
||||
{{/gson}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -407,7 +407,7 @@
|
||||
<jersey-version>2.37</jersey-version>
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
<beanvalidation-version>3.0.2</beanvalidation-version>
|
||||
|
||||
@@ -102,7 +102,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "2.1.0"
|
||||
{{#useBeanValidation}}
|
||||
|
||||
@@ -24,7 +24,7 @@ lazy val root = (project in file(".")).
|
||||
{{/joda}}
|
||||
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.19.2" % "compile",
|
||||
{{#openApiNullable}}
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.7" % "compile",
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.8" % "compile",
|
||||
{{/openApiNullable}}
|
||||
{{#hasOAuthMethods}}
|
||||
"com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile",
|
||||
|
||||
@@ -63,7 +63,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
|
||||
{{/gson}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -407,7 +407,7 @@
|
||||
<jersey-version>3.1.1</jersey-version>
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
<beanvalidation-version>3.0.2</beanvalidation-version>
|
||||
|
||||
@@ -12,9 +12,7 @@ import java.util.Set;
|
||||
import {{rootJavaEEPackage}}.ws.rs.*;
|
||||
import {{rootJavaEEPackage}}.ws.rs.core.Response;
|
||||
import {{rootJavaEEPackage}}.ws.rs.core.MediaType;
|
||||
{{^disableMultipart}}
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
{{/disableMultipart}}
|
||||
|
||||
{{#microprofileMutiny}}
|
||||
import io.smallrye.mutiny.Uni;
|
||||
{{/microprofileMutiny}}
|
||||
@@ -29,6 +27,7 @@ import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||
{{/microprofileRegisterExceptionMapper}}
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
|
||||
|
||||
{{#appName}}
|
||||
/**
|
||||
* {{{appName}}}
|
||||
|
||||
@@ -4,6 +4,9 @@ package {{package}};
|
||||
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
{{#isFile}}
|
||||
import java.io.File;
|
||||
{{/isFile}}
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
@@ -70,7 +73,7 @@ public class {{classname}}Test {
|
||||
public void {{operationId}}Test() {
|
||||
// TODO: test validations
|
||||
{{#allParams}}
|
||||
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}}
|
||||
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}File {{paramName}} = null;{{/isFile}}
|
||||
{{/allParams}}
|
||||
//{{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}} response = {{/vendorExtensions.x-java-is-response-void}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
//{{#returnType}}Assertions.assertNotNull(response);{{/returnType}}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{{#isFormParam}}{{^isFile}}@Multipart(value = "{{baseName}}"{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @Multipart(value = "{{baseName}}" {{^required}}, required = false{{/required}}) Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}
|
||||
{{#isFormParam}}{{^isFile}}{{#required}}{{#useBeanValidation}}@NotNull {{/useBeanValidation}}{{/required}}@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} {{#required}}{{#useBeanValidation}}@NotNull {{/useBeanValidation}}{{/required}}@FormParam("{{baseName}}") File {{paramName}}Detail{{/isFile}}{{/isFormParam}}
|
||||
@@ -1 +1 @@
|
||||
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}
|
||||
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} File {{paramName}}Detail{{/isFile}}{{/isFormParam}}
|
||||
@@ -49,7 +49,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
|
||||
{{#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}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#isContainer}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jboss.jandex</groupId>
|
||||
<groupId>io.smallrye</groupId>
|
||||
<artifactId>jandex-maven-plugin</artifactId>
|
||||
<version>${jandex.maven.plugin.version}</version>
|
||||
<executions>
|
||||
@@ -101,13 +101,7 @@
|
||||
<version>${smallrye.config.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
{{^disableMultipart}}
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-rs-extension-providers</artifactId>
|
||||
<version>${cxf.rt.rs.extension.providers.version}</version>
|
||||
</dependency>
|
||||
{{/disableMultipart}}
|
||||
|
||||
{{#jsonb}}
|
||||
<dependency>
|
||||
<groupId>jakarta.json.bind</groupId>
|
||||
@@ -227,7 +221,6 @@
|
||||
{{#useBeanValidation}}
|
||||
<beanvalidation.version>3.0.2</beanvalidation.version>
|
||||
{{/useBeanValidation}}
|
||||
<cxf.version>3.2.7</cxf.version>
|
||||
<jackson.jaxrs.version>2.17.1</jackson.jaxrs.version>
|
||||
{{#jackson}}
|
||||
<jackson.version>2.17.1</jackson.version>
|
||||
@@ -241,11 +234,10 @@
|
||||
<microprofile.rest.client.api.version>{{microprofileRestClientVersion}}</microprofile.rest.client.api.version>
|
||||
<smallrye.rest.client.version>1.2.1</smallrye.rest.client.version>
|
||||
<smallrye.config.version>1.3.5</smallrye.config.version>
|
||||
<cxf.rt.rs.extension.providers.version>3.2.6</cxf.rt.rs.extension.providers.version>
|
||||
<jaxb.core.version>2.2.11</jaxb.core.version>
|
||||
<jaxb.impl.version>2.2.11</jaxb.impl.version>
|
||||
<hibernate.validator.version>5.2.2.Final</hibernate.validator.version>
|
||||
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
|
||||
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
|
||||
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
|
||||
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
|
||||
{{#microprofileMutiny}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jboss.jandex</groupId>
|
||||
<groupId>io.smallrye</groupId>
|
||||
<artifactId>jandex-maven-plugin</artifactId>
|
||||
<version>${jandex.maven.plugin.version}</version>
|
||||
<executions>
|
||||
@@ -101,13 +101,7 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
{{^disableMultipart}}
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-rs-extension-providers</artifactId>
|
||||
<version>${cxf.rt.rs.extension.providers.version}</version>
|
||||
</dependency>
|
||||
{{/disableMultipart}}
|
||||
|
||||
{{#jsonb}}
|
||||
<dependency>
|
||||
<groupId>jakarta.json.bind</groupId>
|
||||
@@ -178,7 +172,7 @@
|
||||
</dependency>
|
||||
{{#useBeanValidationFeature}}
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernate.validator.version}</version>
|
||||
</dependency>
|
||||
@@ -244,8 +238,8 @@
|
||||
<cxf.rt.rs.extension.providers.version>3.5.1</cxf.rt.rs.extension.providers.version>
|
||||
<jaxb.core.version>3.0.2</jaxb.core.version>
|
||||
<jaxb.impl.version>3.0.2</jaxb.impl.version>
|
||||
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
|
||||
<jandex.maven.plugin.version>1.1.0</jandex.maven.plugin.version>
|
||||
<hibernate.validator.version>8.0.3.Final</hibernate.validator.version>
|
||||
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
|
||||
<maven.failsafe.plugin.version>2.6</maven.failsafe.plugin.version>
|
||||
<build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
|
||||
{{#microprofileMutiny}}
|
||||
|
||||
@@ -102,7 +102,7 @@ dependencies {
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:0.2.7"
|
||||
implementation "org.openapitools:jackson-databind-nullable:0.2.8"
|
||||
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
|
||||
{{#useBeanValidation}}
|
||||
implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version"
|
||||
|
||||
@@ -66,7 +66,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
|
||||
{{/gson}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
<beanvalidation-version>3.0.2</beanvalidation-version>
|
||||
|
||||
@@ -132,7 +132,7 @@ dependencies {
|
||||
implementation 'io.gsonfire:gson-fire:1.9.0'
|
||||
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
|
||||
{{#openApiNullable}}
|
||||
implementation 'org.openapitools:jackson-databind-nullable:0.2.7'
|
||||
implementation 'org.openapitools:jackson-databind-nullable:0.2.8'
|
||||
{{/openApiNullable}}
|
||||
{{#withAWSV4Signature}}
|
||||
implementation 'software.amazon.awssdk:auth:2.20.157'
|
||||
|
||||
@@ -16,7 +16,7 @@ lazy val root = (project in file(".")).
|
||||
"org.apache.commons" % "commons-lang3" % "3.18.0",
|
||||
"jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6",
|
||||
{{#openApiNullable}}
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.7",
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.8",
|
||||
{{/openApiNullable}}
|
||||
{{#withAWSV4Signature}}
|
||||
"software.amazon.awssdk" % "auth" % "2.20.157",
|
||||
|
||||
@@ -71,7 +71,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
{{/deprecated}}
|
||||
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{>nullable_var_annotations}}{{! prevent indent}}
|
||||
{{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
|
||||
@@ -343,9 +343,9 @@
|
||||
{{#performBeanValidation}}
|
||||
<!-- Bean Validation Impl. used to perform BeanValidation -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>5.4.3.Final</version>
|
||||
<version>8.0.3.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.el</groupId>
|
||||
@@ -416,7 +416,7 @@
|
||||
<gson-version>2.10.1</gson-version>
|
||||
<commons-lang3-version>3.18.0</commons-lang3-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
{{#joda}}
|
||||
<jodatime-version>2.12.0</jodatime-version>
|
||||
|
||||
@@ -109,7 +109,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
{{/jackson}}
|
||||
{{#gson}}
|
||||
|
||||
@@ -18,7 +18,7 @@ lazy val root = (project in file(".")).
|
||||
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.19.2",
|
||||
"com.fasterxml.jackson.core" % "jackson-databind" % "2.19.2",
|
||||
{{#openApiNullable}}
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.7",
|
||||
"org.openapitools" % "jackson-databind-nullable" % "0.2.8",
|
||||
{{/openApiNullable}}
|
||||
{{#withXml}}
|
||||
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.13.4.1",
|
||||
|
||||
@@ -324,9 +324,9 @@
|
||||
{{#performBeanValidation}}
|
||||
<!-- Bean Validation Impl. used to perform BeanValidation -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>6.2.0.Final</version>
|
||||
<version>8.0.3.Final</version>
|
||||
</dependency>
|
||||
{{/performBeanValidation}}
|
||||
<!-- test dependencies -->
|
||||
@@ -354,7 +354,7 @@
|
||||
{{#jackson}}
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/jackson}}
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
|
||||
@@ -106,7 +106,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
spring_web_version = "6.1.21"
|
||||
jakarta_annotation_version = "2.1.1"
|
||||
|
||||
@@ -74,7 +74,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
|
||||
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
|
||||
{{/isDiscriminator}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
{{#performBeanValidation}}
|
||||
<!-- Bean Validation Impl. used to perform BeanValidation -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernate-validator-version}</version>
|
||||
</dependency>
|
||||
@@ -350,7 +350,7 @@
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
{{#joda}}
|
||||
@@ -358,7 +358,7 @@
|
||||
{{/joda}}
|
||||
<beanvalidation-version>3.0.2</beanvalidation-version>
|
||||
{{#performBeanValidation}}
|
||||
<hibernate-validator-version>5.4.3.Final</hibernate-validator-version>
|
||||
<hibernate-validator-version>8.0.3.Final</hibernate-validator-version>
|
||||
{{/performBeanValidation}}
|
||||
<junit-version>5.10.2</junit-version>
|
||||
</properties>
|
||||
|
||||
@@ -101,7 +101,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
threetenbp_version = "2.9.10"
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
|
||||
@@ -118,7 +118,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
{{#useJakartaEe}}
|
||||
spring_web_version = "6.2.8"
|
||||
|
||||
@@ -74,7 +74,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
|
||||
{{/isDiscriminator}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
{{#performBeanValidation}}
|
||||
<!-- Bean Validation Impl. used to perform BeanValidation -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernate-validator-version}</version>
|
||||
</dependency>
|
||||
@@ -364,7 +364,7 @@
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
{{#useJakartaEe}}
|
||||
<spring-web-version>6.2.8</spring-web-version>
|
||||
@@ -380,7 +380,7 @@
|
||||
<jodatime-version>2.9.9</jodatime-version>
|
||||
{{/joda}}
|
||||
{{#performBeanValidation}}
|
||||
<hibernate-validator-version>5.4.3.Final</hibernate-validator-version>
|
||||
<hibernate-validator-version>8.0.3.Final</hibernate-validator-version>
|
||||
{{/performBeanValidation}}
|
||||
<junit-version>5.10.2</junit-version>
|
||||
</properties>
|
||||
|
||||
@@ -104,7 +104,7 @@ ext {
|
||||
jackson_databind_version = "2.19.2"
|
||||
javax_ws_rs_api_version = "2.1.1"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
{{/jackson}}
|
||||
{{#usePlayWS}}
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
|
||||
{{/jackson}}
|
||||
|
||||
@@ -35,7 +35,7 @@ ext {
|
||||
vertx_version = "{{#supportVertxFuture}}4.0.0{{/supportVertxFuture}}{{^supportVertxFuture}}3.5.2{{/supportVertxFuture}}"
|
||||
junit_version = "5.10.3"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
jakarta_annotation_version = "1.3.5"
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind>2.19.2</jackson-databind>
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{#useJakartaEe}}
|
||||
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
|
||||
{{/useJakartaEe}}
|
||||
|
||||
@@ -147,7 +147,7 @@ ext {
|
||||
jackson_version = "2.19.2"
|
||||
jackson_databind_version = "2.19.2"
|
||||
{{#openApiNullable}}
|
||||
jackson_databind_nullable_version = "0.2.7"
|
||||
jackson_databind_nullable_version = "0.2.8"
|
||||
{{/openApiNullable}}
|
||||
{{#joda}}
|
||||
jodatime_version = "2.9.9"
|
||||
|
||||
@@ -74,7 +74,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
|
||||
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
|
||||
{{/isDiscriminator}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
<jackson-version>2.19.2</jackson-version>
|
||||
<jackson-databind-version>2.19.2</jackson-databind-version>
|
||||
{{#openApiNullable}}
|
||||
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
|
||||
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
|
||||
{{/openApiNullable}}
|
||||
{{#useJakartaEe}}
|
||||
<spring-boot-version>3.2.12</spring-boot-version>
|
||||
|
||||
@@ -74,7 +74,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
|
||||
{{/isDiscriminator}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
|
||||
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
{{/vars}}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'hh:mm:ss.SSSX")
|
||||
{{/isDateTime}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
{{/vars}}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
|
||||
@Valid
|
||||
{{/useBeanValidation}}{{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#isContainer}}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
|
||||
{{/gson}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
|
||||
{{/gson}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
|
||||
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
|
||||
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{{.}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}}
|
||||
|
||||
|
||||
@@ -23,7 +23,10 @@ import {{javaxPackage}}.validation.Valid;{{/useBeanValidation}}
|
||||
/**
|
||||
* Represents a collection of functions to interact with the API endpoints.
|
||||
*/
|
||||
@Path("{{commonPath}}"){{#useSwaggerAnnotations}}
|
||||
{{^interfaceOnly}}
|
||||
@Path("{{commonPath}}")
|
||||
{{/interfaceOnly}}
|
||||
{{#useSwaggerAnnotations}}
|
||||
@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#hasConsumes}}
|
||||
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}}
|
||||
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
* @return {{{message}}}
|
||||
{{/responses}}
|
||||
*/
|
||||
@{{httpMethod}}{{#subresourceOperation}}
|
||||
@Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}}
|
||||
@{{httpMethod}}
|
||||
@Path("{{commonPath}}{{{path}}}"){{#hasConsumes}}
|
||||
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}}
|
||||
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}}
|
||||
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}"{{#hasAuthMethods}}, authorizations = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user