Skip to content

Commit 31767c0

Browse files
authored
Merge pull request #18 from niaid/sync-upstream-v7.16.0
Sync upstream v7.16.0
2 parents f5628c1 + 61c0f46 commit 31767c0

File tree

50,345 files changed

+4497804
-989486
lines changed

Some content is hidden

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

50,345 files changed

+4497804
-989486
lines changed

.circleci/config.yml

Lines changed: 48 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -38,64 +38,62 @@ commands: # a reusable command with parameters
3838
- run:
3939
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
4040
- run:
41-
command: |-
42-
printf '127.0.0.1 petstore.swagger.io
43-
' | sudo tee -a /etc/hosts
41+
command: |
42+
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v1.test.openapi-generator.tech"
43+
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v2.test.openapi-generator.tech"
44+
sudo tee -a /etc/hosts \<<< "127.0.0.111 path.v3.test.openapi-generator.tech"
45+
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v1.test.openapi-generator.tech"
46+
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v2.test.openapi-generator.tech"
47+
sudo tee -a /etc/hosts \<<< "127.0.0.111 operation.v3.test.openapi-generator.tech"
48+
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v1.test.openapi-generator.tech"
49+
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v2.test.openapi-generator.tech"
50+
sudo tee -a /etc/hosts \<<< "127.0.0.111 server.v3.test.openapi-generator.tech"
51+
sudo tee -a /etc/hosts \<<< "127.0.0.1 petstore.swagger.io"
52+
cat /etc/hosts
4453
# - run: docker pull openapitools/openapi-petstore
4554
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
4655
- run: docker pull swaggerapi/petstore
4756
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
4857
- run: docker ps -a
4958
- run: sleep 30
5059
- run: cat /etc/hosts
51-
# Test
52-
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
60+
- run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
5361
- run:
5462
name: "Setup custom environment variables"
5563
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
5664
- run: ./CI/circle_parallel.sh
5765
# Save dependency cache
58-
- save_cache:
59-
key: source-v2-{{ .Branch }}-{{ .Revision }}
60-
paths:
61-
# This is a broad list of cache paths to include many possible development environments
62-
# You can probably delete some of these entries
63-
- vendor/bundle
64-
- ~/.nvm
65-
- ~/.pyenv
66-
- ~/virtualenvs
67-
- ~/.m2
68-
- ~/.ivy2
69-
- ~/.sbt
70-
- ~/.bundle
71-
- ~/.go_workspace
72-
- ~/.gradle
73-
- ~/.cache/bower
74-
- ".git"
75-
- ~/.stack
76-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
77-
- ~/R
78-
# save "default" cache using the key "source-v2-"
79-
- save_cache:
80-
key: source-v2-
81-
paths:
82-
# This is a broad list of cache paths to include many possible development environments
83-
# You can probably delete some of these entries
84-
- vendor/bundle
85-
- ~/.nvm
86-
- ~/.pyenv
87-
- ~/virtualenvs
88-
- ~/.m2
89-
- ~/.ivy2
90-
- ~/.sbt
91-
- ~/.bundle
92-
- ~/.go_workspace
93-
- ~/.gradle
94-
- ~/.cache/bower
95-
- ".git"
96-
- ~/.stack
97-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
98-
- ~/R
66+
#- save_cache:
67+
# key: source-v2-{{ .Branch }}-{{ .Revision }}
68+
# paths:
69+
# # This is a broad list of cache paths to include many possible development environments
70+
# # You can probably delete some of these entries
71+
# - ~/.m2
72+
# - ~/.ivy2
73+
# - ~/.sbt
74+
# - ~/.bundle
75+
# - ~/.go_workspace
76+
# - ~/.gradle
77+
# - ".git"
78+
# - ~/.stack
79+
# - ~/R
80+
## save "default" cache using the key "source-v2-"
81+
#- save_cache:
82+
# key: source-v2-
83+
# paths:
84+
# # This is a broad list of cache paths to include many possible development environments
85+
# # You can probably delete some of these entries
86+
# - vendor/bundle
87+
# - ~/.m2
88+
# - ~/.ivy2
89+
# - ~/.sbt
90+
# - ~/.bundle
91+
# - ~/.go_workspace
92+
# - ~/.gradle
93+
# - ~/.cache/bower
94+
# - ".git"
95+
# - ~/.stack
96+
# - ~/R
9997
# Teardown
10098
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
10199
# Save test results
@@ -143,7 +141,7 @@ commands: # a reusable command with parameters
143141
jobs:
144142
node0:
145143
machine:
146-
image: ubuntu-2004:202201-02
144+
image: ubuntu-2004:2024.01.1
147145
working_directory: ~/OpenAPITools/openapi-generator
148146
shell: /bin/bash --login
149147
environment:
@@ -156,7 +154,7 @@ jobs:
156154
nodeNo: "0"
157155
node1:
158156
machine:
159-
image: ubuntu-2004:202201-02
157+
image: ubuntu-2004:2024.01.1
160158
working_directory: ~/OpenAPITools/openapi-generator
161159
shell: /bin/bash --login
162160
environment:
@@ -169,7 +167,7 @@ jobs:
169167
nodeNo: "1"
170168
node2:
171169
machine:
172-
image: ubuntu-2004:202201-02
170+
image: ubuntu-2004:2024.01.1
173171
working_directory: ~/OpenAPITools/openapi-generator
174172
shell: /bin/bash --login
175173
environment:
@@ -182,7 +180,7 @@ jobs:
182180
nodeNo: "2"
183181
node3:
184182
machine:
185-
image: ubuntu-2004:202201-02
183+
image: ubuntu-2004:2024.01.1
186184
working_directory: ~/OpenAPITools/openapi-generator
187185
shell: /bin/bash --login
188186
environment:
@@ -194,20 +192,6 @@ jobs:
194192
- checkout
195193
- command_build_and_test:
196194
nodeNo: "3"
197-
node4:
198-
docker:
199-
- image: fkrull/multi-python
200-
working_directory: ~/OpenAPITools/openapi-generator
201-
shell: /bin/bash --login
202-
environment:
203-
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
204-
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
205-
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
206-
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
207-
steps:
208-
- checkout
209-
- command_docker_build_and_test:
210-
nodeNo: "4"
211195
workflows:
212196
version: 2
213197
build:
@@ -216,4 +200,3 @@ workflows:
216200
- node1
217201
- node2
218202
- node3
219-
- node4

.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: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
"ghcr.io/devcontainers/features/node:1": {
1010
"version": "lts"
1111
},
12-
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {}
12+
"ghcr.io/devcontainers/features/rust:1": {},
13+
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
14+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
15+
"version": "latest",
16+
"moby": true
17+
}
1318
},
1419
// Configure tool-specific properties.
1520
"customizations": {
@@ -20,8 +25,8 @@
2025
"java.configuration.runtimes": [
2126
{
2227
"name": "JavaSE-11",
23-
"path": "/usr/local/sdkman/candidates/java/11.0.16.1-ms",
24-
"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",
2530
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
2631
"default": true
2732
}

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
use flake
1+
has nix && use flake

.github/.test/samples.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,6 @@
319319
"Client: Java"
320320
]
321321
},
322-
{
323-
"input": "java-petstore-jersey1.sh",
324-
"matches": [
325-
"Client: Java"
326-
]
327-
},
328322
{
329323
"input": "java-petstore-jersey2-java6.sh",
330324
"matches": [
@@ -584,18 +578,6 @@
584578
"Server: Java"
585579
]
586580
},
587-
{
588-
"input": "jaxrs-jersey1-petstore-server.sh",
589-
"matches": [
590-
"Server: Java"
591-
]
592-
},
593-
{
594-
"input": "jaxrs-jersey1-usetags-petstore-server.sh",
595-
"matches": [
596-
"Server: Java"
597-
]
598-
},
599581
{
600582
"input": "jaxrs-petstore-server-datelib-j8.sh",
601583
"matches": [
@@ -800,12 +782,6 @@
800782
"Client: Python"
801783
]
802784
},
803-
{
804-
"input": "python-server-flask-petstore-python2.sh",
805-
"matches": [
806-
"Server: Python"
807-
]
808-
},
809785
{
810786
"input": "python-server-flask-petstore.sh",
811787
"matches": [

.github/CODEOWNERS

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,23 @@ 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
20+
# cpp-qt-client technical committee
21+
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @ravinikam
22+
samples/client/petstore/cpp-qt/**/* @ravinikam
23+
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @stkrwork
24+
samples/client/petstore/cpp-qt/**/* @stkrwork
25+
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @etherealjoy
26+
samples/client/petstore/cpp-qt/**/* @etherealjoy
27+
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille
28+
samples/client/petstore/cpp-qt/**/* @martindelille
29+
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd
30+
samples/client/petstore/cpp-qt/**/* @muttleyxd
3031

31-
# Martin Delille
32-
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtClientCodegen.java @martindelille
33-
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtAbstractCodegen.java @martindelille
34-
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/resources/cpp-qt-client @martindelille
35-
/Users/martin/dev/clone/openapi-generator/samples/client/petstore/cpp-qt @martindelille
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: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +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
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 [WSL](https://learn.microsoft.com/en-us/windows/wsl/install))
1415
Commit all changed files.
1516
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
1617
These must match the expectations made by your contribution.
1718
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*`.
18-
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
19-
- [ ] In case you are adding a new generator, run the following additional script :
20-
```
21-
./bin/utils/ensure-up-to-date
22-
```
23-
Commit all changed files.
24-
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.3.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks)
19+
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.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)
2522
- [ ] 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

0 commit comments

Comments
 (0)