Skip to content

Commit 7407e6e

Browse files
committed
Merge branch 'master' into feature/fix-values3
2 parents 67ee557 + 878d821 commit 7407e6e

8,897 files changed

Lines changed: 12641 additions & 9371 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<div align="center">
1717

18-
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.22.0`):
18+
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.23.0`):
1919
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
2020
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
2121

@@ -154,8 +154,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
154154

155155
| OpenAPI Generator Version | Release Date | Notes |
156156
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
157-
| 7.22.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 24.04.2026 | Minor release with breaking changes (with fallback) |
158-
| [7.21.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.21.0) (latest stable release) | 24.03.2026 | Minor release with breaking changes (with fallback) |
157+
| 7.23.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 28.05.2026 | Minor release with breaking changes (with fallback) |
158+
| [7.22.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.22.0) (latest stable release) | 28.04.2026 | Minor release with breaking changes (with fallback) |
159159
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
160160
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
161161
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
@@ -218,16 +218,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
218218
<!-- RELEASE_VERSION -->
219219
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
220220

221-
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.21.0/openapi-generator-cli-7.21.0.jar`
221+
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.22.0/openapi-generator-cli-7.22.0.jar`
222222

223223
For **Mac/Linux** users:
224224
```sh
225-
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.21.0/openapi-generator-cli-7.21.0.jar -O openapi-generator-cli.jar
225+
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.22.0/openapi-generator-cli-7.22.0.jar -O openapi-generator-cli.jar
226226
```
227227

228228
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.
229229
```
230-
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.21.0/openapi-generator-cli-7.21.0.jar
230+
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.22.0/openapi-generator-cli-7.22.0.jar
231231
```
232232

233233
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -462,7 +462,7 @@ openapi-generator-cli version
462462
To use a specific version of "openapi-generator-cli"
463463

464464
```sh
465-
openapi-generator-cli version-manager set 7.21.0
465+
openapi-generator-cli version-manager set 7.22.0
466466
```
467467

468468
Or install it as dev-dependency:
@@ -486,7 +486,7 @@ pip install openapi-generator-cli
486486

487487
To install a specific version
488488
```
489-
pip install openapi-generator-cli==7.21.0
489+
pip install openapi-generator-cli==7.22.0
490490
```
491491

492492
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
@@ -512,7 +512,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
512512
(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`)
513513

514514
<!-- RELEASE_VERSION -->
515-
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.21.0/openapi-generator-cli-7.21.0.jar)
515+
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.22.0/openapi-generator-cli-7.22.0.jar)
516516
<!-- /RELEASE_VERSION -->
517517

518518
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
generatorName: rust-axum
2+
outputDir: samples/server/petstore/rust-axum/output/rust-axum-integer-types-test
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-axum/integer-types.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/rust-axum
5+
generateAliasAsModel: true
6+
additionalProperties:
7+
hideGenerationTimestamp: "true"
8+
packageName: rust-axum-integer-types-test
9+
homePageUrl: https://github.com/openapitools/openapi-generator
10+
globalProperties:
11+
skipFormModel: false
12+
enablePostProcessFile: true

docs/customization.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,36 @@ Example:
651651
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
652652
```
653653
654+
- `REPLACE_ONE_OF_BY_DISCRIMINATOR_MAPPING`: when set to true, oneOf is removed and is converted into mappings in a discriminator mapping.
655+
656+
Example:
657+
```
658+
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/oneOf_issue_23527.yaml -o /tmp/java/ --openapi-normalizer REPLACE_ONE_OF_BY_DISCRIMINATOR_MAPPING=true
659+
```
660+
661+
Here is what the change in the spec looks like:
662+
663+
```diff
664+
diff --git a/api/openapi.yaml b/api/openapi.yaml
665+
index 6f27abd..146c61c 100644
666+
--- a/api/openapi.yaml
667+
+++ b/api/openapi.yaml
668+
@@ -9,10 +9,10 @@ components:
669+
schemas:
670+
GeoJsonObject:
671+
discriminator:
672+
+ mapping:
673+
+ MultiPolygon: "#/components/schemas/Multi-Polygon"
674+
+ Polygon: "#/components/schemas/Polygon"
675+
propertyName: type
676+
- oneOf:
677+
- - $ref: "#/components/schemas/Polygon"
678+
- - $ref: "#/components/schemas/Multi-Polygon"
679+
properties:
680+
type:
681+
type: string
682+
```
683+
654684
- `FILTER`
655685

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

docs/generators/typescript-axios.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2020
| ------ | ----------- | ------ | ------- |
2121
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
2222
|apiPackage|package for generated api classes| |null|
23-
|axiosVersion|Use this property to override the axios version in package.json| |^1.13.5|
23+
|axiosVersion|Use this property to override the axios version in package.json| |^1.15.2|
2424
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
2525
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
2626
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|

docs/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g
2222
To install a specific version of the tool, pass the version during installation:
2323
<!-- RELEASE_VERSION -->
2424
```bash
25-
openapi-generator-cli version-manager set 7.19.0
25+
openapi-generator-cli version-manager set 7.22.0
2626
```
2727
<!-- /RELEASE_VERSION -->
2828
To install the tool as a dev dependency in your current project:
@@ -119,18 +119,18 @@ docker run --rm \
119119
<!-- RELEASE_VERSION -->
120120
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
121121

122-
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar`
122+
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.22.0/openapi-generator-cli-7.22.0.jar`
123123

124124
For **Mac/Linux** users:
125125

126126
```bash
127-
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar -O openapi-generator-cli.jar
127+
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.22.0/openapi-generator-cli-7.22.0.jar -O openapi-generator-cli.jar
128128
```
129129

130130
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.
131131

132132
```powershell
133-
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar
133+
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.22.0/openapi-generator-cli-7.22.0.jar
134134
```
135135
<!-- /RELEASE_VERSION -->
136136

docs/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
1616
<plugin>
1717
<groupId>org.openapitools</groupId>
1818
<artifactId>openapi-generator-maven-plugin</artifactId>
19-
<version>7.19.0</version>
19+
<version>7.22.0</version>
2020
<executions>
2121
<execution>
2222
<goals>

modules/openapi-generator-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>org.openapitools</groupId>
55
<artifactId>openapi-generator-project</artifactId>
66
<!-- RELEASE_VERSION -->
7-
<version>7.22.0-SNAPSHOT</version>
7+
<version>7.23.0-SNAPSHOT</version>
88
<!-- /RELEASE_VERSION -->
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>

modules/openapi-generator-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<artifactId>openapi-generator-project</artifactId>
77
<groupId>org.openapitools</groupId>
88
<!-- RELEASE_VERSION -->
9-
<version>7.22.0-SNAPSHOT</version>
9+
<version>7.23.0-SNAPSHOT</version>
1010
<!-- /RELEASE_VERSION -->
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>

modules/openapi-generator-gradle-plugin/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid
9898
[source,group]
9999
----
100100
plugins {
101-
id "org.openapi.generator" version "7.19.0"
101+
id "org.openapi.generator" version "7.22.0"
102102
}
103103
----
104104

modules/openapi-generator-gradle-plugin/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RELEASE_VERSION
2-
openApiGeneratorVersion=7.22.0-SNAPSHOT
2+
openApiGeneratorVersion=7.23.0-SNAPSHOT
33
# /RELEASE_VERSION
44

55
# BEGIN placeholders

0 commit comments

Comments
 (0)