Compare commits

..

1 Commits

Author SHA1 Message Date
William Cheng
e6f94c5d8b Auto fix invalid schemas in inline resolver 2025-10-21 15:13:26 +08:00
8735 changed files with 28564 additions and 17428 deletions

View File

@@ -62,7 +62,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Upload Maven build artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with:
name: artifact
@@ -98,7 +98,7 @@ jobs:
maven-version: 3.8.8
cache: gradle
- name: Download build artifact
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
name: artifact
- name: Run Ensures Script

View File

@@ -42,7 +42,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: ls -la modules/openapi-generator-cli/target
- name: Upload openapi-generator-cli.jar artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
@@ -81,7 +81,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish unit test reports
if: ${{ always() }}
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml'
@@ -99,7 +99,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
@@ -138,7 +138,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target

View File

@@ -15,7 +15,7 @@
<div align="center">
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.18.0`):
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.17.0`):
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](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.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) |
| 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) |
| [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.17.0/openapi-generator-cli-7.17.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar`
For **Mac/Linux** users:
```sh
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
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
```
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.17.0/openapi-generator-cli-7.17.0.jar
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
```
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.17.0
openapi-generator-cli version-manager set 7.16.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.17.0
pip install openapi-generator-cli==7.16.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.17.0/openapi-generator-cli-7.17.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.16.0/openapi-generator-cli-7.16.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,7 +1182,6 @@ 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

View File

@@ -6,7 +6,7 @@ library: httpx
additionalProperties:
packageName: petstore_api
mapNumberTo: float
poetry1: false
poetry1: true
nameMappings:
_type: underscore_type
type_: type_with_underscore

View File

@@ -1,8 +0,0 @@
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

View File

@@ -59,6 +59,6 @@
sha256: 45cdaba3d2adc212cd4f0184ad475419a95e2326254c2ef84175e210c922b2f3
# rust axum test files
- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
sha256: b2093528aac971193f2863a70f46eea45cf8bda79120b133a614599e80d8b46d
sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
sha256: 1d3fb01f65e98290b1d3eece28014c7d3e3f2fdf18e7110249d3c591cc4642ab

View File

@@ -644,13 +644,6 @@ 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.

View File

@@ -55,7 +55,6 @@ 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>
@@ -156,7 +155,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

View File

@@ -55,7 +55,6 @@ 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>
@@ -156,7 +155,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

View File

@@ -50,7 +50,6 @@ 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>
@@ -151,7 +150,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

View File

@@ -55,7 +55,6 @@ 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>
@@ -156,7 +155,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

View File

@@ -53,7 +53,6 @@ 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>
@@ -156,7 +155,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

View File

@@ -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.17.0
openapi-generator-cli version-manager set 7.16.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.17.0/openapi-generator-cli-7.17.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar`
For **Mac/Linux** users:
```bash
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
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
```
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.17.0/openapi-generator-cli-7.17.0.jar
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
```
<!-- /RELEASE_VERSION -->

View File

@@ -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.17.0</version>
<version>7.16.0</version>
<executions>
<execution>
<goals>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -6,7 +6,7 @@
<artifactId>openapi-generator-project</artifactId>
<groupId>org.openapitools</groupId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -97,7 +97,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid
[source,group]
----
plugins {
id "org.openapi.generator" version "7.17.0"
id "org.openapi.generator" version "7.16.0"
}
----
@@ -113,7 +113,7 @@ buildscript {
// url "https://plugins.gradle.org/m2/"
}
dependencies {
classpath "org.openapitools:openapi-generator-gradle-plugin:7.17.0"
classpath "org.openapitools:openapi-generator-gradle-plugin:7.16.0"
}
}
@@ -759,7 +759,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath('org.openapitools:openapi-generator-gradle-plugin:7.17.0') {
classpath('org.openapitools:openapi-generator-gradle-plugin:7.16.0') {
exclude group: 'com.google.guava'
}
}

View File

@@ -1,5 +1,5 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.18.0-SNAPSHOT
openApiGeneratorVersion=7.17.0-SNAPSHOT
# /RELEASE_VERSION
# BEGIN placeholders

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -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.17.0 openApiValidate
gradle -PopenApiGeneratorVersion=7.16.0 openApiValidate
```

View File

@@ -1,3 +1,3 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.18.0-SNAPSHOT
openApiGeneratorVersion=7.17.0-SNAPSHOT
# /RELEASE_VERSION

View File

@@ -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.

View File

@@ -55,6 +55,7 @@ import org.openapitools.codegen.config.MergedSpecBuilder
*
* @author Jim Schubert
*/
@Suppress("UnstableApiUsage")
@CacheableTask
open class GenerateTask @Inject constructor(private val objectFactory: ObjectFactory) : DefaultTask() {
@@ -153,14 +154,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.
@@ -192,7 +193,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)
@@ -383,42 +384,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.
@@ -433,21 +434,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).
@@ -580,7 +581,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.
@@ -597,11 +598,19 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
@get:Input
val dryRun = project.objects.property<Boolean>()
private fun <T> Property<T>.ifNotEmpty(block: Property<T>.(T) -> Unit) {
private fun <T : Any?> Property<T>.ifNotEmpty(block: Property<T>.(T) -> Unit) {
if (isPresent) {
when (val value = get()) {
is String -> if (value.isNotEmpty()) block(value)
else -> block(value)
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())
}
}
}
}
@@ -716,7 +725,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
}
skipOverwrite.ifNotEmpty { value ->
configurator.setSkipOverwrite(value)
configurator.setSkipOverwrite(value ?: false)
}
generatorName.ifNotEmpty { value ->
@@ -811,11 +820,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 ->

View File

@@ -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.17.0</version>
<version>7.16.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -15,7 +15,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -19,7 +19,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<dependencies>
<dependency>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -20,7 +20,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -5,7 +5,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.18.0-SNAPSHOT</version>
<version>7.17.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -307,11 +307,29 @@ 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;

View File

@@ -353,20 +353,22 @@ 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:" +
" 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
LOGGER.error("Illegal schema found with non-object type combined with" +
" additionalProperties, no additionalProperties should be defined:\n " +
schema.toString());
return;
} else {
if (schema.getProperties() != null) {
// If non-object type is specified but also properties
LOGGER.warn("Illegal schema found with non-object type ({}) combined with properties. Properties automatically removed.", schema.getType());
schema.setProperties(null);
return;
}
if (schema.getAdditionalProperties() != null) {
// If non-object type is specified but also additionalProperties
LOGGER.error("Illegal schema found with non-object type ({}) combined with additionalProperties. AdditionalProperties automatically removed.", schema.getType());
schema.setAdditionalProperties(null);
return;
}
}
// Check array items
if (ModelUtils.isArraySchema(schema)) {
Schema items = ModelUtils.getSchemaItems(schema);

View File

@@ -124,9 +124,6 @@ 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";
@@ -209,7 +206,6 @@ 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);
@@ -706,8 +702,6 @@ public class OpenAPINormalizer {
markSchemaAsVisited(schema, visitedSchemas);
processNormalizeOtherThanObjectWithProperties(schema);
if (ModelUtils.isArraySchema(schema)) { // array
Schema result = normalizeArraySchema(schema);
normalizeSchema(result.getItems(), visitedSchemas);
@@ -1967,23 +1961,6 @@ 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);
}
}
}
}

View File

@@ -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) || cp.isInteger || cp.isLong) {
} else if (ModelUtils.isIntegerSchema(schema)) {
if (schema.getDefault() != null) {
if (SchemaTypeUtil.INTEGER64_FORMAT.equals(schema.getFormat()) || cp.isLong) {
if (SchemaTypeUtil.INTEGER64_FORMAT.equals(schema.getFormat())) {
return schema.getDefault().toString() + "l";
} else {
return schema.getDefault().toString();
}
}
return null;
} else if (ModelUtils.isNumberSchema(schema) || cp.isFloat || cp.isDouble) {
} else if (ModelUtils.isNumberSchema(schema)) {
if (schema.getDefault() != null) {
if (SchemaTypeUtil.FLOAT_FORMAT.equals(schema.getFormat()) || cp.isFloat) {
if (SchemaTypeUtil.FLOAT_FORMAT.equals(schema.getFormat())) {
return schema.getDefault().toString() + "f";
} else if (SchemaTypeUtil.DOUBLE_FORMAT.equals(schema.getFormat()) || cp.isDouble) {
} else if (SchemaTypeUtil.DOUBLE_FORMAT.equals(schema.getFormat())) {
return schema.getDefault().toString() + "d";
} else {
return "new BigDecimal(\"" + schema.getDefault().toString() + "\")";
@@ -1891,7 +1891,6 @@ 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)");

View File

@@ -119,7 +119,6 @@ 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

View File

@@ -25,7 +25,6 @@ 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;
@@ -72,9 +71,7 @@ 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(
@@ -111,7 +108,6 @@ 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");
@@ -133,7 +129,8 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
// mapped to String as a workaround
typeMapping.put("binary", "str");
typeMapping.put("ByteArray", "str");
typeMapping.put("UUID", "UUID");
// map uuid to string for the time being
typeMapping.put("UUID", "str");
typeMapping.put("URI", "str");
typeMapping.put("null", "none_type");
@@ -574,12 +571,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
type = p.dataType;
}
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 ("String".equalsIgnoreCase(type) || "str".equalsIgnoreCase(type)) {
if (example == null) {
example = p.paramName + "_example";
}
@@ -679,13 +671,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
return getSchemaType(p) + "[str, " + getCollectionItemTypeDeclaration(inner) + "]";
}
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";
}
String openAPIType = getSchemaType(p);
if (typeMapping.containsKey(openAPIType)) {
return typeMapping.get(openAPIType);
}

View File

@@ -17,7 +17,6 @@
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;
@@ -441,17 +440,6 @@ 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);
}

View File

@@ -187,22 +187,19 @@ 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());
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());
}
supportingFiles.add(new SupportingFile("RestResourceRoot.mustache",
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestResourceRoot.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;
@@ -279,7 +276,6 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
if (!jackson) {
codegenModel.imports.remove("JsonValue");
codegenModel.imports.remove("JsonProperty");
codegenModel.imports.remove("JsonTypeName");
}
return codegenModel;
}

View File

@@ -271,7 +271,6 @@ 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"));

View File

@@ -648,7 +648,7 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
}
private void postProcessPolymorphism(final List<ModelMap> allModels) {
final HashMap<String, List<CodegenDiscriminator>> discriminatorsForModel = new HashMap<>();
final HashMap<String, List<String>> discriminatorsForModel = new HashMap<>();
for (final ModelMap mo : allModels) {
final CodegenModel cm = mo.getModel();
@@ -656,17 +656,15 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
final CodegenComposedSchemas cs = cm.getComposedSchemas();
if (cs != null) {
final List<CodegenProperty> csOneOf = cs.getOneOf();
CodegenDiscriminator discriminator = cm.getDiscriminator();
if (csOneOf != null) {
processPolymorphismDataType(csOneOf, discriminator);
processPolymorphismDataType(csOneOf);
cs.setOneOf(csOneOf);
cm.setComposedSchemas(cs);
}
final List<CodegenProperty> csAnyOf = cs.getAnyOf();
if (csAnyOf != null) {
processPolymorphismDataType(csAnyOf, discriminator);
processPolymorphismDataType(csAnyOf);
cs.setAnyOf(csAnyOf);
cm.setComposedSchemas(cs);
}
@@ -674,14 +672,14 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
if (cm.discriminator != null) {
for (final String model : cm.oneOf) {
final List<CodegenDiscriminator> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator);
final List<String> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator.getPropertyName());
discriminatorsForModel.put(model, discriminators);
}
for (final String model : cm.anyOf) {
final List<CodegenDiscriminator> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator);
final List<String> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator.getPropertyName());
discriminatorsForModel.put(model, discriminators);
}
}
@@ -691,11 +689,11 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
for (ModelMap mo : allModels) {
final CodegenModel cm = mo.getModel();
final List<CodegenDiscriminator> discriminators = discriminatorsForModel.get(cm.getSchemaName());
final List<String> discriminators = discriminatorsForModel.get(cm.getSchemaName());
if (discriminators != null) {
// If the discriminator field is not a defined attribute in the variant structure, create it.
if (!discriminating(discriminators, cm)) {
final CodegenDiscriminator discriminator = discriminators.get(0);
final String discriminator = discriminators.get(0);
CodegenProperty property = new CodegenProperty();
@@ -712,18 +710,17 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
property.isDiscriminator = true;
// Attributes based on the discriminator value
property.baseName = discriminator.getPropertyBaseName();
property.name = discriminator.getPropertyName();
property.nameInCamelCase = camelize(discriminator.getPropertyName());
property.baseName = discriminator;
property.name = discriminator;
property.nameInCamelCase = camelize(discriminator);
property.nameInPascalCase = property.nameInCamelCase.substring(0, 1).toUpperCase(Locale.ROOT) + property.nameInCamelCase.substring(1);
property.nameInSnakeCase = underscore(discriminator.getPropertyName()).toUpperCase(Locale.ROOT);
property.nameInSnakeCase = underscore(discriminator).toUpperCase(Locale.ROOT);
property.getter = String.format(Locale.ROOT, "get%s", property.nameInPascalCase);
property.setter = String.format(Locale.ROOT, "set%s", property.nameInPascalCase);
property.defaultValueWithParam = String.format(Locale.ROOT, " = data.%s;", property.name);
// Attributes based on the model name
property.defaultValue = String.format(Locale.ROOT, "r#\"%s\"#.to_string()", cm.getSchemaName());
property.discriminatorValue = getDiscriminatorValue(cm.getClassname(), discriminator);
property.jsonSchema = String.format(Locale.ROOT, "{ \"default\":\"%s\"; \"type\":\"string\" }", cm.getSchemaName());
cm.vars.add(property);
@@ -746,27 +743,14 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
}
}
private static String getDiscriminatorValue(String modelName, CodegenDiscriminator discriminator) {
if (discriminator == null || discriminator.getMappedModels() == null) {
return modelName;
}
return discriminator
.getMappedModels()
.stream()
.filter(m -> m.getModelName().equals(modelName) && m.getMappingName() != null)
.map(CodegenDiscriminator.MappedModel::getMappingName)
.findFirst()
.orElse(modelName);
}
private static boolean discriminating(final List<CodegenDiscriminator> discriminatorsForModel, final CodegenModel cm) {
private static boolean discriminating(final List<String> discriminatorsForModel, final CodegenModel cm) {
resetDiscriminatorProperty(cm);
// Discriminator will be presented as enum tag -> One and only one tag is allowed
int countString = 0;
int countNonString = 0;
for (final CodegenProperty var : cm.vars) {
if (discriminatorsForModel.stream().anyMatch(discriminator -> var.baseName.equals(discriminator.getPropertyBaseName()) || var.name.equals(discriminator.getPropertyName()))) {
if (discriminatorsForModel.stream().anyMatch(discriminator -> var.baseName.equals(discriminator) || var.name.equals(discriminator))) {
if (var.isString) {
var.isDiscriminator = true;
++countString;
@@ -789,7 +773,7 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
}
}
private static void processPolymorphismDataType(final List<CodegenProperty> cp, CodegenDiscriminator discriminator) {
private static void processPolymorphismDataType(final List<CodegenProperty> cp) {
final HashSet<String> dedupDataTypeWithEnum = new HashSet<>();
final HashMap<String, Integer> dedupDataType = new HashMap<>();
@@ -799,7 +783,6 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
// Mainly needed for primitive types.
model.datatypeWithEnum = camelize(model.dataType.replaceAll("(?:\\w+::)+(\\w+)", "$1")
.replace("<", "Of").replace(">", "")).replace(" ", "").replace(",", "");
model.discriminatorValue = getDiscriminatorValue(model.datatypeWithEnum, discriminator);
if (!dedupDataTypeWithEnum.add(model.datatypeWithEnum)) {
model.datatypeWithEnum += ++idx;
}

View File

@@ -461,9 +461,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
}
}
// backup path in extensions
op.vendorExtensions.put("x-path-from-spec", op.path);
// Overwrite path to TypeScript template string, after applying everything we just did.
op.path = pathBuffer.toString();
}

View File

@@ -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}}

View File

@@ -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}}

View File

@@ -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)

View File

@@ -117,7 +117,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
{{#useBeanValidation}}

View File

@@ -117,7 +117,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
httpclient_version = "5.1.3"

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -107,7 +107,7 @@ ext {
jackson_databind_version = "2.19.2"
{{/jackson}}
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
feign_version = "13.5"

View File

@@ -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}}

View File

@@ -416,7 +416,7 @@
<gson-version>2.10.1</gson-version>
{{/gson}}
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -101,7 +101,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
google_api_client_version = "1.32.2"

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#joda}}
<jodatime-version>2.9.9</jodatime-version>

View File

@@ -107,7 +107,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
{{#useBeanValidation}}

View File

@@ -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.8" % "compile",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7" % "compile",
{{/openApiNullable}}
{{#hasOAuthMethods}}
"com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile",

View File

@@ -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}}

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
<beanvalidation-version>3.0.2</beanvalidation-version>

View File

@@ -102,7 +102,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "2.1.0"
{{#useBeanValidation}}

View File

@@ -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.8" % "compile",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7" % "compile",
{{/openApiNullable}}
{{#hasOAuthMethods}}
"com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile",

View File

@@ -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}}

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
<beanvalidation-version>3.0.2</beanvalidation-version>

View File

@@ -12,7 +12,9 @@ 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}}
@@ -27,7 +29,6 @@ import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
{{/microprofileRegisterExceptionMapper}}
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
{{#appName}}
/**
* {{{appName}}}

View File

@@ -4,9 +4,6 @@ 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;
@@ -73,7 +70,7 @@ public class {{classname}}Test {
public void {{operationId}}Test() {
// TODO: test validations
{{#allParams}}
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}File {{paramName}} = null;{{/isFile}}
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{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}}

View File

@@ -1 +1 @@
{{#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}}
{{#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}}

View File

@@ -1 +1 @@
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} File {{paramName}}Detail{{/isFile}}{{/isFormParam}}
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}

View File

@@ -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}};

View File

@@ -12,7 +12,7 @@
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>io.smallrye</groupId>
<groupId>org.jboss.jandex</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.maven.plugin.version}</version>
<executions>
@@ -101,7 +101,13 @@
<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>
@@ -217,10 +223,11 @@
<swagger.core.version>1.5.18</swagger.core.version>
<jetty.version>9.2.9.v20150224</jetty.version>
<junit.version>5.10.2</junit.version>
<logback.version>1.5.19</logback.version>
<logback.version>1.5.13</logback.version>
{{#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>
@@ -234,10 +241,11 @@
<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>3.2.7</jandex.maven.plugin.version>
<jandex.maven.plugin.version>1.1.0</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}}

View File

@@ -12,7 +12,7 @@
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>io.smallrye</groupId>
<groupId>org.jboss.jandex</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.maven.plugin.version}</version>
<executions>
@@ -101,7 +101,13 @@
<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>
@@ -172,7 +178,7 @@
</dependency>
{{#useBeanValidationFeature}}
<dependency>
<groupId>org.hibernate.validator</groupId>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate.validator.version}</version>
</dependency>
@@ -217,7 +223,7 @@
<swagger.core.version>1.5.18</swagger.core.version>
<jetty.version>9.2.9.v20150224</jetty.version>
<junit.version>5.10.2</junit.version>
<logback.version>1.5.19</logback.version>
<logback.version>1.5.13</logback.version>
{{#useBeanValidation}}
<beanvalidation.version>3.0.1</beanvalidation.version>
{{/useBeanValidation}}
@@ -238,8 +244,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>8.0.3.Final</hibernate.validator.version>
<jandex.maven.plugin.version>3.2.7</jandex.maven.plugin.version>
<hibernate.validator.version>7.0.4.Final</hibernate.validator.version>
<jandex.maven.plugin.version>1.1.0</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}}

View File

@@ -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.8"
implementation "org.openapitools:jackson-databind-nullable:0.2.7"
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
{{#useBeanValidation}}
implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version"

View File

@@ -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}}

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
<beanvalidation-version>3.0.2</beanvalidation-version>

View File

@@ -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.8'
implementation 'org.openapitools:jackson-databind-nullable:0.2.7'
{{/openApiNullable}}
{{#withAWSV4Signature}}
implementation 'software.amazon.awssdk:auth:2.20.157'

View File

@@ -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.8",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7",
{{/openApiNullable}}
{{#withAWSV4Signature}}
"software.amazon.awssdk" % "auth" % "2.20.157",

View File

@@ -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}};

View File

@@ -343,9 +343,9 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>8.0.3.Final</version>
<version>5.4.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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#joda}}
<jodatime-version>2.12.0</jodatime-version>

View File

@@ -109,7 +109,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{/jackson}}
{{#gson}}

View File

@@ -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.8",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7",
{{/openApiNullable}}
{{#withXml}}
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.13.4.1",

View File

@@ -324,9 +324,9 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>8.0.3.Final</version>
<version>6.2.0.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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/jackson}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -106,7 +106,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
spring_web_version = "6.1.21"
jakarta_annotation_version = "2.1.1"

View File

@@ -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}}

View File

@@ -318,7 +318,7 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<groupId>org.hibernate</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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</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>8.0.3.Final</hibernate-validator-version>
<hibernate-validator-version>5.4.3.Final</hibernate-validator-version>
{{/performBeanValidation}}
<junit-version>5.10.2</junit-version>
</properties>

View File

@@ -101,7 +101,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
threetenbp_version = "2.9.10"

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -118,7 +118,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{#useJakartaEe}}
spring_web_version = "6.2.8"

View File

@@ -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}}

View File

@@ -333,7 +333,7 @@
{{#performBeanValidation}}
<!-- Bean Validation Impl. used to perform BeanValidation -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<groupId>org.hibernate</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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</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>8.0.3.Final</hibernate-validator-version>
<hibernate-validator-version>5.4.3.Final</hibernate-validator-version>
{{/performBeanValidation}}
<junit-version>5.10.2</junit-version>
</properties>

View File

@@ -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.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{/jackson}}
{{#usePlayWS}}

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
{{/jackson}}

View File

@@ -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.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
}

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
{{/useJakartaEe}}

View File

@@ -147,7 +147,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{#joda}}
jodatime_version = "2.9.9"

View File

@@ -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}}

View File

@@ -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.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<spring-boot-version>3.2.12</spring-boot-version>

View File

@@ -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}}

View File

@@ -162,7 +162,7 @@
<maven-plugin-version>1.0.0</maven-plugin-version>
<swagger-inflector-version>1.0.14</swagger-inflector-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
{{/useJakartaEe}}

View File

@@ -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}}

View File

@@ -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}}

View File

@@ -220,7 +220,7 @@ for this project used jakarta.validation-api -->
<swagger-core-version>1.5.22</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<junit-version>4.13.2</junit-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
{{#useBeanValidation}}
<beanvalidation-version>2.0.2</beanvalidation-version>
{{/useBeanValidation}}

Some files were not shown because too many files have changed in this diff Show More