Skip to content

Commit a54ffbc

Browse files
authored
Merge branch 'master' into fix/3.0-nullable-object-null-type-detection
2 parents 9233b6c + 9faa37f commit a54ffbc

9,684 files changed

Lines changed: 56477 additions & 12063 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.

.github/workflows/maven-release.yml

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- master
7+
tags:
8+
- 'v*'
9+
710
jobs:
811
build:
912
name: Build
@@ -12,17 +15,20 @@ jobs:
1215
- uses: actions/checkout@v5
1316
with:
1417
fetch-depth: 0
18+
1519
- name: Set up JDK 11
1620
uses: actions/setup-java@v5
1721
with:
1822
java-version: 11
1923
distribution: 'zulu'
24+
2025
- name: Cache Maven packages
2126
uses: actions/cache@v5
2227
with:
2328
path: ~/.m2
2429
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2530
restore-keys: ${{ runner.os }}-m2
31+
2632
- name: Build
2733
run: ./mvnw clean install -DskipTests=true
2834
#run: ./mvnw clean install
@@ -38,7 +44,7 @@ jobs:
3844
- uses: actions/checkout@v5
3945
with:
4046
fetch-depth: 0
41-
47+
4248
- id: install-secret-key
4349
name: Install gpg secret key
4450
run: |
@@ -58,4 +64,48 @@ jobs:
5864
run: ./mvnw -DskipTests=true --batch-mode -P release -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy
5965
env:
6066
MAVEN_USERNAME: ${{ secrets.OSS_USERNAME }}
61-
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}
67+
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}
68+
69+
upload-release-asset:
70+
runs-on: ubuntu-latest
71+
name: Upload CLI JAR to GitHub Release
72+
needs: publish
73+
if: startsWith(github.ref, 'refs/tags/')
74+
permissions:
75+
contents: write
76+
steps:
77+
- uses: actions/checkout@v5
78+
with:
79+
fetch-depth: 0
80+
81+
- name: Set up JDK 11
82+
uses: actions/setup-java@v5
83+
with:
84+
java-version: 11
85+
distribution: 'zulu'
86+
87+
- name: Cache Maven packages
88+
uses: actions/cache@v5
89+
with:
90+
path: ~/.m2
91+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
92+
restore-keys: ${{ runner.os }}-m2
93+
94+
- name: Build CLI JAR
95+
run: ./mvnw clean package -pl modules/openapi-generator-cli -am -DskipTests=true
96+
97+
- name: Get project version
98+
id: get_version
99+
run: |
100+
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
101+
echo "version=$VERSION" >> $GITHUB_OUTPUT
102+
103+
- name: Upload JAR as GitHub Release asset
104+
run: |
105+
VERSION="${{ steps.get_version.outputs.version }}"
106+
JAR="modules/openapi-generator-cli/target/openapi-generator-cli.jar"
107+
ASSET="openapi-generator-cli-${VERSION}.jar"
108+
cp "$JAR" "$ASSET"
109+
gh release upload "${{ github.ref_name }}" "$ASSET" --clobber
110+
env:
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/samples-dotnet10.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf
2828
- samples/client/petstore/csharp/generichost/latest/Tags
2929
- samples/client/petstore/csharp/generichost/latest/HelloWorld
30+
- samples/client/petstore/csharp/generichost/latest/NullTypes
3031
- samples/client/petstore/csharp/generichost/latest/OneOfList
3132
- samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset
3233
- samples/client/petstore/csharp/generichost/net10/AllOf

.github/workflows/samples-java-client-jdk17.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- samples/client/petstore/java/webclient-jakarta/**
99
- samples/client/petstore/java/restclient-*/**
1010
- samples/client/petstore/java/native-jackson3/**
11+
- samples/client/petstore/java/apache-httpclient-jackson3/**
1112
- samples/client/petstore/java/native-jackson3-jspecify/**
1213
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/**
1314
- samples/client/others/java/webclient-sealedInterface/**
@@ -23,6 +24,7 @@ on:
2324
- samples/client/petstore/java/webclient-jakarta/**
2425
- samples/client/petstore/java/restclient-*/**
2526
- samples/client/petstore/java/native-jackson3/**
27+
- samples/client/petstore/java/apache-httpclient-jackson3/**
2628
- samples/client/petstore/java/native-jackson3-jspecify/**
2729
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/**
2830
- samples/client/others/java/webclient-sealedInterface/**
@@ -54,6 +56,7 @@ jobs:
5456
- samples/client/petstore/java/restclient-useSingleRequestParameter
5557
- samples/client/petstore/java/restclient-useSingleRequestParameter-static
5658
- samples/client/petstore/java/native-jackson3
59+
- samples/client/petstore/java/apache-httpclient-jackson3
5760
- samples/client/others/java/webclient-sealedInterface
5861
- samples/client/others/java/webclient-sealedInterface_3_1
5962
- samples/client/petstore/java/webclient-springBoot4-jackson3

.github/workflows/samples-kotlin-client.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
- 'samples/client/petstore/kotlin*/**'
77
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
88
- samples/client/others/kotlin-integer-enum/**
9+
- samples/client/others/kotlin-jvm-spring-3-restclient-nullable-return/**
910
pull_request:
1011
paths:
1112
- 'samples/client/petstore/kotlin*/**'
1213
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
1314
- samples/client/others/kotlin-integer-enum/**
1415
- samples/client/others/kotlin-oneOf-anyOf-kotlinx-serialization/**
16+
- samples/client/others/kotlin-jvm-spring-3-restclient-nullable-return/**
1517

1618
jobs:
1719
build:
@@ -66,6 +68,7 @@ jobs:
6668
- samples/client/echo_api/kotlin-jvm-spring-3-webclient
6769
- samples/client/petstore/kotlin-jvm-spring-3-restclient
6870
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
71+
- samples/client/others/kotlin-jvm-spring-3-restclient-nullable-return
6972
- samples/client/petstore/kotlin-name-parameter-mappings
7073
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
7174
- samples/client/others/kotlin-jvm-okhttp-path-comments

.github/workflows/samples-kotlin-server-jdk17.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
paths:
66
- 'samples/server/others/kotlin-server/**'
7+
- 'samples/server/others/kotlin-springboot/**'
78
- 'samples/server/petstore/kotlin-springboot-3*/**'
89
- 'samples/server/petstore/kotlin-server/**'
910
- 'samples/server/petstore/kotlin-server-modelMutable/**'
@@ -18,6 +19,7 @@ on:
1819
pull_request:
1920
paths:
2021
- 'samples/server/others/kotlin-server/**'
22+
- 'samples/server/others/kotlin-springboot/**'
2123
- 'samples/server/petstore/kotlin-springboot-3*/**'
2224
- 'samples/server/petstore/kotlin-server/**'
2325
- 'samples/server/petstore/kotlin-server-modelMutable/**'
@@ -42,6 +44,9 @@ jobs:
4244
matrix:
4345
sample:
4446
# server
47+
- samples/server/others/kotlin-springboot/oneOf-discriminator
48+
- samples/server/others/kotlin-springboot/oneOf-discriminator-const
49+
- samples/server/others/kotlin-springboot/oneOf-enum-discriminator
4550
- samples/server/others/kotlin-server/polymorphism-allof-and-discriminator
4651
- samples/server/others/kotlin-server/polymorphism-and-discriminator-disabled-jackson-fix
4752
- samples/server/others/kotlin-server/polymorphism-and-discriminator

.github/workflows/samples-kotlin-server-jdk21.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
push:
55
paths:
66
- 'samples/server/others/kotlin-server/**'
7+
- 'samples/server/others/kotlin-springboot/**'
78
- 'samples/server/petstore/kotlin-server/**'
89
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
910
pull_request:
1011
paths:
1112
- 'samples/server/others/kotlin-server/**'
13+
- 'samples/server/others/kotlin-springboot/**'
1214
- 'samples/server/petstore/kotlin-server/**'
1315
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
1416

@@ -23,6 +25,9 @@ jobs:
2325
fail-fast: false
2426
matrix:
2527
sample:
28+
- samples/server/others/kotlin-springboot/oneOf-discriminator
29+
- samples/server/others/kotlin-springboot/oneOf-discriminator-const
30+
- samples/server/others/kotlin-springboot/oneOf-enum-discriminator
2631
- samples/server/others/kotlin-server/polymorphism-allof-and-discriminator
2732
- samples/server/others/kotlin-server/polymorphism-and-discriminator-disabled-jackson-fix
2833
- samples/server/others/kotlin-server/polymorphism-and-discriminator

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,4 @@ samples/client/petstore/ocaml-recursion-test/_build/
311311
samples/client/jetbrains/adyen/checkout71/http/client/Apis/http-client.private.env.json
312312

313313
# Generated by the run-in-docker.sh
314-
\?/
314+
\?/

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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# for csharp generichost
2+
generatorName: csharp
3+
outputDir: samples/client/petstore/csharp/generichost/latest/NullTypes
4+
inputSpec: modules/openapi-generator/src/test/resources/3_1/csharp/null-types.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/csharp
6+
additionalProperties:
7+
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
8+
modelPropertySorting: alphabetical
9+
operationParameterSorting: alphabetical
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/apache-httpclient-jackson3
3+
library: apache-httpclient
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: petstore-apache-httpclient-jackson3
8+
hideGenerationTimestamp: "true"
9+
useJackson3: "true"
10+
openApiNullable: "true"

0 commit comments

Comments
 (0)