Skip to content

Commit 6e97f40

Browse files
Merge tag 'v7.20.0' into peer-master
Conflicts: modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
2 parents 17385c8 + bd7fc7f commit 6e97f40

23,604 files changed

Lines changed: 1330644 additions & 327440 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.

.devcontainer/devcontainer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
},
1212
"ghcr.io/devcontainers/features/rust:1": {},
1313
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
14-
"docker-in-docker": {
14+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
1515
"version": "latest",
16-
"moby": true,
17-
"dockerDashComposeVersion": "v1"
16+
"moby": false
1817
}
1918
},
2019
// Configure tool-specific properties.

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille
2828
samples/client/petstore/cpp-qt/**/* @martindelille
2929
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd
3030
samples/client/petstore/cpp-qt/**/* @muttleyxd
31+
32+
# cpp-rest-client technical committee
33+
modules/openapi-generator/src/main/resources/cpp-rest-client/**/* @aminya
34+
samples/client/petstore/cpp-restsdk/**/* @aminya

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Please follow the issue template below for bug reports and feature requests.
3-
Also please indicate in the issue title which language/library is concerned. Eg: [JAVA] Bug generating foo with bar
3+
Also please indicate in the issue title which language/library is concerned. E.g.: [JAVA] Bug generating foo with bar
44
-->
55

66
##### Description

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ assignees: ''
1010
#### Bug Report Checklist
1111

1212
- [ ] Have you provided a full/minimal spec to reproduce the issue?
13-
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))?
13+
- [ ] Have you validated the input using an OpenAPI validator?
1414
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
1515
- [ ] Have you searched for related issues/PRs?
1616
- [ ] What's the actual output vs expected output?
1717
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))
1818

1919
<!--
2020
Please follow the issue template below for bug reports.
21-
Also please indicate in the issue title which language/library is concerned. Eg: [BUG][JAVA] Bug generating foo with bar
21+
Also please indicate in the issue title which language/library is concerned. E.g.: [BUG][JAVA] Bug generating foo with bar
2222
-->
2323

2424
##### Description

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
./bin/generate-samples.sh ./bin/configs/*.yaml || exit
1212
./bin/utils/export_docs_generators.sh || exit
1313
```
14-
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
14+
(For Windows users, please run the script in [WSL](https://learn.microsoft.com/en-us/windows/wsl/install))
1515
Commit all changed files.
1616
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
1717
These must match the expectations made by your contribution.
1818
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
1919
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
2020
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming `7.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
21+
- [ ] If your PR solves a reported issue, reference it using [GitHub's linking syntax](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) (e.g., having `"fixes #123"` present in the PR description)
2122
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Release to DockerHub (snapshot, stable)
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Triggers on any tag starting with 'v' (e.g., v1.0, v2.1.3)
7+
branches:
8+
- master
9+
jobs:
10+
docker:
11+
name: Publish images
12+
runs-on: ubuntu-latest
13+
steps:
14+
# build the JARs
15+
- uses: actions/checkout@v5
16+
with:
17+
fetch-depth: 0
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v5
20+
with:
21+
java-version: 11
22+
distribution: 'zulu'
23+
- name: Cache Maven packages
24+
uses: actions/cache@v5
25+
with:
26+
path: ~/.m2
27+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: ${{ runner.os }}-m2
29+
- name: Build
30+
run: ./mvnw clean install -DskipTests=true
31+
32+
# docker workflow
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@v3
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
- name: Login to DockerHub
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKER_USERNAME }}
41+
password: ${{ secrets.DOCKER_PASSWORD }}
42+
- name: Setup variables
43+
run: |
44+
# set as GitHub ENV variables
45+
echo "cli_version=$(\./mvnw -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')" >> $GITHUB_ENV
46+
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
47+
echo "DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online" >> $GITHUB_ENV
48+
echo "DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli" >> $GITHUB_ENV
49+
50+
# online images
51+
- name: Publish openapi-generator-online snapshot version
52+
if: github.ref_type != 'tag' # not tag (release)
53+
run: |
54+
docker buildx create --use
55+
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} ./modules/openapi-generator-online
56+
- name: Publish openapi-generator-online stable version
57+
if: github.ref_type == 'tag' # tagged (release)
58+
run: |
59+
docker buildx create --use
60+
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest-release ./modules/openapi-generator-online
61+
62+
# cli images
63+
- name: Publish openapi-generator-cli snapshot version
64+
if: github.ref_type != 'tag' # not tag (release)
65+
run: |
66+
cp docker-entrypoint.sh ./modules/openapi-generator-cli
67+
docker buildx create --use
68+
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} ./modules/openapi-generator-cli
69+
- name: Publish openapi-generator-cli stable version
70+
if: github.ref_type == 'tag' # tagged (release)
71+
run: |
72+
cp docker-entrypoint.sh ./modules/openapi-generator-cli
73+
docker buildx create --use
74+
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest-release ./modules/openapi-generator-cli

.github/workflows/docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Check out code
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
3030

3131
- name: Test run-in-docker.sh
3232
shell: bash

.github/workflows/gradle-plugin-tests.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ jobs:
1313
name: Gradle plugin tests
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
- name: Set up JDK 11
18-
uses: actions/setup-java@v4
18+
uses: actions/setup-java@v5
1919
with:
2020
java-version: 11
2121
distribution: 'temurin'
22+
cache: gradle
2223
- name: Cache maven dependencies
23-
uses: actions/cache@v4
24+
uses: actions/cache@v5
2425
env:
2526
cache-name: cache-maven-repository
2627
with:
@@ -34,12 +35,22 @@ jobs:
3435
restore-keys: |
3536
${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}-
3637
${{ runner.os }}-test-gradle-plugin-
37-
- name: Run tests
38+
- name: mvn clean install
39+
run: |
40+
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
41+
- name: Run tests with wrapper
3842
env:
3943
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4044
run: |
41-
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
4245
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper
4346
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
4447
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk)
48+
- name: Setup Gradle
49+
uses: gradle/gradle-build-action@v3
50+
with:
51+
gradle-version: '8.14.3'
52+
- name: Run tests without wrapper
53+
env:
54+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
55+
run: |
4556
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && gradle buildJavaResttemplateSdk) # not using gradle wrapper

.github/workflows/gradle-test.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,22 @@ jobs:
3232
- samples/client/petstore/java/native
3333
- samples/client/petstore/java/native-jakarta
3434
steps:
35-
- uses: actions/checkout@v4
36-
- uses: actions/setup-java@v4
35+
- uses: actions/checkout@v5
36+
- uses: actions/setup-java@v5
3737
with:
3838
distribution: 'temurin'
3939
java-version: 11
40+
cache: gradle
4041
# Cache Gradle Dependencies
4142
- name: Setup Gradle Dependencies Cache
42-
uses: actions/cache@v4
43+
uses: actions/cache@v5
4344
with:
4445
path: ~/.gradle/caches
4546
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
4647

4748
# Cache Gradle Wrapper
4849
- name: Setup Gradle Wrapper Cache
49-
uses: actions/cache@v4
50+
uses: actions/cache@v5
5051
with:
5152
path: ~/.gradle/wrapper
5253
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

.github/workflows/linux.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,23 @@ jobs:
2020
os: [ubuntu-latest]
2121
steps:
2222
- name: Check out code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424

2525
- name: Set up JDK ${{ matrix.java }}
26-
uses: actions/setup-java@v4
26+
uses: actions/setup-java@v5
2727
with:
2828
distribution: 'temurin'
2929
java-version: ${{ matrix.java }}
30+
cache: gradle
3031

31-
- uses: actions/cache@v4
32+
- uses: actions/cache@v5
3233
with:
3334
path: ~/.m2/repository
3435
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
3536
restore-keys: |
3637
${{ runner.os }}-maven-
3738
38-
- uses: actions/cache@v4
39+
- uses: actions/cache@v5
3940
with:
4041
path: |
4142
~/.gradle/caches
@@ -44,8 +45,12 @@ jobs:
4445
restore-keys: |
4546
${{ runner.os }}-gradle-
4647
48+
- uses: gradle/actions/setup-gradle@v5
49+
with:
50+
gradle-version: '8.14.3'
51+
4752
- name: Setup Maven
48-
uses: s4u/setup-maven-action@v1.18.0
53+
uses: s4u/setup-maven-action@v1.19.0
4954
with:
5055
java-version: ${{ matrix.java }}
5156
maven-version: 3.8.8
@@ -57,15 +62,15 @@ jobs:
5762
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
5863

5964
- name: Upload Maven build artifact
60-
uses: actions/upload-artifact@v4
65+
uses: actions/upload-artifact@v6
6166
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
6267
with:
6368
name: artifact
6469
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
6570

6671
- name: Test Gradle plugin usage
6772
shell: bash
68-
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
73+
run: gradle --project-dir modules/openapi-generator-gradle-plugin/samples/local-spec buildGoSdk --stacktrace
6974

7075
- name: Test Maven plugin integration
7176
if: matrix.java == '11'
@@ -85,14 +90,15 @@ jobs:
8590
os: [ubuntu-latest]
8691
steps:
8792
- name: Check out code
88-
uses: actions/checkout@v4
93+
uses: actions/checkout@v5
8994
- name: Setup Maven
90-
uses: s4u/setup-maven-action@v1.18.0
95+
uses: s4u/setup-maven-action@v1.19.0
9196
with:
9297
java-version: 11
9398
maven-version: 3.8.8
99+
cache: gradle
94100
- name: Download build artifact
95-
uses: actions/download-artifact@v4
101+
uses: actions/download-artifact@v7
96102
with:
97103
name: artifact
98104
- name: Run Ensures Script

0 commit comments

Comments
 (0)