Skip to content

Commit 3cf4994

Browse files
authored
Merge branch 'master' into bugfix/fix-formparams-defaultvalue
2 parents df2a8d6 + b8d8059 commit 3cf4994

15,218 files changed

Lines changed: 462764 additions & 125404 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/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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ assignees: ''
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
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@v4
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: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ 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'
@@ -34,12 +34,22 @@ jobs:
3434
restore-keys: |
3535
${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}-
3636
${{ runner.os }}-test-gradle-plugin-
37-
- name: Run tests
37+
- name: mvn clean install
38+
run: |
39+
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
40+
- name: Run tests with wrapper
3841
env:
3942
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
4043
run: |
41-
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
4244
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper
4345
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
4446
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk)
47+
- name: Setup Gradle
48+
uses: gradle/gradle-build-action@v3
49+
with:
50+
gradle-version: '8.14.3'
51+
- name: Run tests without wrapper
52+
env:
53+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
54+
run: |
4555
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && gradle buildJavaResttemplateSdk) # not using gradle wrapper

.github/workflows/gradle-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ 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

.github/workflows/linux.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ 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 }}
@@ -44,6 +44,10 @@ jobs:
4444
restore-keys: |
4545
${{ runner.os }}-gradle-
4646
47+
- uses: gradle/actions/setup-gradle@v5
48+
with:
49+
gradle-version: '8.14.3'
50+
4751
- name: Setup Maven
4852
uses: s4u/setup-maven-action@v1.18.0
4953
with:
@@ -65,7 +69,7 @@ jobs:
6569

6670
- name: Test Gradle plugin usage
6771
shell: bash
68-
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
72+
run: gradle --project-dir modules/openapi-generator-gradle-plugin/samples/local-spec buildGoSdk --stacktrace
6973

7074
- name: Test Maven plugin integration
7175
if: matrix.java == '11'
@@ -85,14 +89,14 @@ jobs:
8589
os: [ubuntu-latest]
8690
steps:
8791
- name: Check out code
88-
uses: actions/checkout@v4
92+
uses: actions/checkout@v5
8993
- name: Setup Maven
9094
uses: s4u/setup-maven-action@v1.18.0
9195
with:
9296
java-version: 11
9397
maven-version: 3.8.8
9498
- name: Download build artifact
95-
uses: actions/download-artifact@v4
99+
uses: actions/download-artifact@v5
96100
with:
97101
name: artifact
98102
- name: Run Ensures Script

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
name: Maven 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'
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release to Maven Central (snapshot, stable)
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
with:
14+
fetch-depth: 0
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v5
17+
with:
18+
java-version: 11
19+
distribution: 'zulu'
20+
- name: Cache Maven packages
21+
uses: actions/cache@v4
22+
with:
23+
path: ~/.m2
24+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: ${{ runner.os }}-m2
26+
- name: Build
27+
run: ./mvnw clean install -DskipTests=true
28+
#run: ./mvnw clean install
29+
30+
publish:
31+
runs-on: ubuntu-latest
32+
name: Publish to Maven Central
33+
needs: build
34+
permissions:
35+
contents: read
36+
packages: write
37+
steps:
38+
- uses: actions/checkout@v5
39+
with:
40+
fetch-depth: 0
41+
42+
- id: install-secret-key
43+
name: Install gpg secret key
44+
run: |
45+
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
46+
gpg --list-secret-keys --keyid-format LONG
47+
48+
- name: Set up Maven Central Repository
49+
uses: actions/setup-java@v5
50+
with:
51+
java-version: 11
52+
distribution: 'zulu'
53+
server-id: central
54+
server-username: MAVEN_USERNAME
55+
server-password: MAVEN_PASSWORD
56+
57+
- name: Publish package
58+
run: ./mvnw -DskipTests=true --batch-mode -P release -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy
59+
env:
60+
MAVEN_USERNAME: ${{ secrets.OSS_USERNAME }}
61+
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}

0 commit comments

Comments
 (0)