Skip to content

Commit eac4ed2

Browse files
Merge branch 'master' into mein-feature-branch
# Conflicts: # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java # samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/model/Pet.java # samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/model/Pet.java # samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/model/Pet.java # samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/model/Pet.java # samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java # samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java # samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/ArrayTest.java # samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumArrays.java # samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FileSchemaTestClass.java # samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Pet.java # samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/XmlItem.java
2 parents 322231d + 2f69ad9 commit eac4ed2

File tree

45,821 files changed

+3678636
-1007733
lines changed

Some content is hidden

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

45,821 files changed

+3678636
-1007733
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ commands: # a reusable command with parameters
141141
jobs:
142142
node0:
143143
machine:
144-
image: ubuntu-2004:202201-02
144+
image: ubuntu-2004:2024.01.1
145145
working_directory: ~/OpenAPITools/openapi-generator
146146
shell: /bin/bash --login
147147
environment:
@@ -154,7 +154,7 @@ jobs:
154154
nodeNo: "0"
155155
node1:
156156
machine:
157-
image: ubuntu-2004:202201-02
157+
image: ubuntu-2004:2024.01.1
158158
working_directory: ~/OpenAPITools/openapi-generator
159159
shell: /bin/bash --login
160160
environment:
@@ -167,7 +167,7 @@ jobs:
167167
nodeNo: "1"
168168
node2:
169169
machine:
170-
image: ubuntu-2004:202201-02
170+
image: ubuntu-2004:2024.01.1
171171
working_directory: ~/OpenAPITools/openapi-generator
172172
shell: /bin/bash --login
173173
environment:
@@ -180,7 +180,7 @@ jobs:
180180
nodeNo: "2"
181181
node3:
182182
machine:
183-
image: ubuntu-2004:202201-02
183+
image: ubuntu-2004:2024.01.1
184184
working_directory: ~/OpenAPITools/openapi-generator
185185
shell: /bin/bash --login
186186
environment:

.ddev/web-build/Dockerfile.maven

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RUN apt update && apt install -y maven

.devcontainer/devcontainer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"ghcr.io/devcontainers/features/node:1": {
1010
"version": "lts"
1111
},
12+
"ghcr.io/devcontainers/features/rust:1": {},
1213
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
13-
"docker-in-docker": {
14+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
1415
"version": "latest",
15-
"moby": true,
16-
"dockerDashComposeVersion": "v1"
16+
"moby": true
1717
}
1818
},
1919
// Configure tool-specific properties.
@@ -25,8 +25,8 @@
2525
"java.configuration.runtimes": [
2626
{
2727
"name": "JavaSE-11",
28-
"path": "/usr/local/sdkman/candidates/java/11.0.16.1-ms",
29-
"sources": "/usr/local/sdkman/candidates/java/11.0.16.1-ms/lib/src.zip",
28+
"path": "/usr/local/sdkman/candidates/java/current",
29+
"sources": "/usr/local/sdkman/candidates/java/current/lib/src.zip",
3030
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
3131
"default": true
3232
}
@@ -49,4 +49,4 @@
4949
// "postCreateCommand": "mvn clean package -DskipTests",
5050
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
5151
"remoteUser": "vscode"
52-
}
52+
}

.github/CODEOWNERS

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,11 @@ modules/openapi-generator-core/**/* @OpenAPITools/generator-core-team
1212
# No need for auto-generated subdirectories (reduces noise)
1313
docs/ @OpenAPITools/generator-core-team
1414

15-
## Individual interests
16-
.github/**/* @jimschubert
17-
scripts/**/* @jimschubert
18-
website/**/* @jimschubert
19-
bin/ci/**/* @jimschubert
20-
2115
## Build related
2216
CI/**/* @OpenAPITools/build
2317
.mvn/**/* @OpenAPITools/build
2418
bin/utils/**/* @OpenAPITools/build
2519

26-
## Module-specific
27-
modules/openapi-generator-cli/**/* @jimschubert
28-
modules/openapi-generator-gradle-plugin/**/* @jimschubert
29-
modules/openapi-generator-maven-plugin/**/* @jimschubert
30-
3120
# cpp-qt-client technical committee
3221
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @ravinikam
3322
samples/client/petstore/cpp-qt/**/* @ravinikam
@@ -39,3 +28,7 @@ modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille
3928
samples/client/petstore/cpp-qt/**/* @martindelille
4029
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd
4130
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/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ 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://apidevtools.org/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?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
88
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
99
```
10-
./mvnw clean package
11-
./bin/generate-samples.sh ./bin/configs/*.yaml
12-
./bin/utils/export_docs_generators.sh
10+
./mvnw clean package || exit
11+
./bin/generate-samples.sh ./bin/configs/*.yaml || exit
12+
./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.
20-
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.1.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
20+
- [ ] 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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- 'samples/client/petstore/java/**'
1111
- 'samples/openapi3/client/petstore/java/**'
1212
env:
13-
GRADLE_VERSION: 7.2
13+
GRADLE_VERSION: 8.7
1414

1515
jobs:
1616
build:
@@ -29,9 +29,11 @@ jobs:
2929
- samples/client/petstore/java/okhttp-gson
3030
- samples/client/petstore/java/okhttp-gson-group-parameter
3131
- samples/client/petstore/java/webclient-swagger2
32+
- samples/client/petstore/java/native
33+
- samples/client/petstore/java/native-jakarta
3234
steps:
33-
- uses: actions/checkout@v4
34-
- uses: actions/setup-java@v4
35+
- uses: actions/checkout@v5
36+
- uses: actions/setup-java@v5
3537
with:
3638
distribution: 'temurin'
3739
java-version: 11

0 commit comments

Comments
 (0)