Skip to content

Commit 85524ef

Browse files
authored
Merge branch 'OpenAPITools:master' into master
2 parents 2de43e7 + 4be5971 commit 85524ef

File tree

24,599 files changed

+1640888
-454522
lines changed

Some content is hidden

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

24,599 files changed

+1640888
-454522
lines changed

.circleci/config.yml

+4-19
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:
@@ -192,20 +192,6 @@ jobs:
192192
- checkout
193193
- command_build_and_test:
194194
nodeNo: "3"
195-
node4:
196-
machine:
197-
image: ubuntu-2004:202201-02
198-
working_directory: ~/OpenAPITools/openapi-generator
199-
shell: /bin/bash --login
200-
environment:
201-
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
202-
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
203-
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
204-
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
205-
steps:
206-
- checkout
207-
- command_build_and_test:
208-
nodeNo: "4"
209195
workflows:
210196
version: 2
211197
build:
@@ -214,4 +200,3 @@ workflows:
214200
- node1
215201
- node2
216202
- node3
217-
- node4

.devcontainer/devcontainer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
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": {},
1314
"docker-in-docker": {
1415
"version": "latest",
@@ -25,8 +26,8 @@
2526
"java.configuration.runtimes": [
2627
{
2728
"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",
29+
"path": "/usr/local/sdkman/candidates/java/current",
30+
"sources": "/usr/local/sdkman/candidates/java/current/lib/src.zip",
3031
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
3132
"default": true
3233
}
@@ -49,4 +50,4 @@
4950
// "postCreateCommand": "mvn clean package -DskipTests",
5051
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
5152
"remoteUser": "vscode"
52-
}
53+
}

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
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.6.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
2121
- [ ] 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.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
java-version: 11
2121
distribution: 'temurin'
2222
- name: Cache maven dependencies
23-
uses: actions/cache@v3
23+
uses: actions/cache@v4
2424
env:
2525
cache-name: cache-maven-repository
2626
with:

.github/workflows/gradle-test.yaml

+3-3
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:
@@ -37,14 +37,14 @@ jobs:
3737
java-version: 11
3838
# Cache Gradle Dependencies
3939
- name: Setup Gradle Dependencies Cache
40-
uses: actions/cache@v3
40+
uses: actions/cache@v4
4141
with:
4242
path: ~/.gradle/caches
4343
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
4444

4545
# Cache Gradle Wrapper
4646
- name: Setup Gradle Wrapper Cache
47-
uses: actions/cache@v3
47+
uses: actions/cache@v4
4848
with:
4949
path: ~/.gradle/wrapper
5050
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

.github/workflows/linux.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
distribution: 'temurin'
2929
java-version: ${{ matrix.java }}
3030

31-
- uses: actions/cache@v3
31+
- uses: actions/cache@v4
3232
with:
3333
path: ~/.m2/repository
3434
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
3535
restore-keys: |
3636
${{ runner.os }}-maven-
3737
38-
- uses: actions/cache@v3
38+
- uses: actions/cache@v4
3939
with:
4040
path: |
4141
~/.gradle/caches
@@ -45,7 +45,7 @@ jobs:
4545
${{ runner.os }}-gradle-
4646
4747
- name: Setup Maven
48-
uses: s4u/setup-maven-action@v1.11.0
48+
uses: s4u/setup-maven-action@v1.13.0
4949
with:
5050
java-version: ${{ matrix.java }}
5151
maven-version: 3.8.8
@@ -87,7 +87,7 @@ jobs:
8787
- name: Check out code
8888
uses: actions/checkout@v4
8989
- name: Setup Maven
90-
uses: s4u/setup-maven-action@v1.11.0
90+
uses: s4u/setup-maven-action@v1.13.0
9191
with:
9292
java-version: 11
9393
maven-version: 3.8.8

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
java-version: 11
2121
distribution: 'temurin'
2222
- name: Cache maven dependencies
23-
uses: actions/cache@v3
23+
uses: actions/cache@v4
2424
env:
2525
cache-name: cache-maven-repository
2626
with:

.github/workflows/openapi-generator.yaml

+35-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
java-version: 11
2323
distribution: 'temurin'
2424
- name: Cache maven dependencies
25-
uses: actions/cache@v3
25+
uses: actions/cache@v4
2626
env:
2727
cache-name: cache-maven-repository
2828
with:
@@ -60,7 +60,7 @@ jobs:
6060
java-version: 11
6161
distribution: 'temurin'
6262
- name: Cache maven dependencies
63-
uses: actions/cache@v3
63+
uses: actions/cache@v4
6464
env:
6565
cache-name: cache-maven-repository
6666
with:
@@ -140,8 +140,40 @@ jobs:
140140
with:
141141
name: openapi-generator-cli.jar
142142
path: modules/openapi-generator-cli/target
143+
- name: Delete samples that are entirely generated
144+
run: |
145+
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
146+
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
147+
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
148+
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
149+
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
150+
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
151+
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
152+
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
153+
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
154+
155+
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
156+
157+
rm -rf samples/client/petstore/csharp/generichost/net4.8/AllOf
158+
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOf
159+
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
160+
rm -rf samples/client/petstore/csharp/generichost/net4.8/FormModels
161+
rm -rf samples/client/petstore/csharp/generichost/net4.8/OneOf
162+
rm -rf samples/client/petstore/csharp/generichost/net4.8/Petstore
163+
rm -rf samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
164+
165+
rm -rf samples/client/petstore/csharp/generichost/net4.7/AllOf
166+
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOf
167+
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
168+
rm -rf samples/client/petstore/csharp/generichost/net4.7/FormModels
169+
rm -rf samples/client/petstore/csharp/generichost/net4.7/OneOf
170+
rm -rf samples/client/petstore/csharp/generichost/net4.7/Petstore
171+
rm -rf samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
143172
- name: Generate samples
144-
run: bash bin/generate-samples.sh
173+
run: |
174+
bash bin/generate-samples.sh
175+
# when a sample is deleted, you have to generate it twice for all files to get created
176+
bash bin/generate-samples.sh
145177
- name: Verify git status
146178
run: |
147179
if [[ "$(git status --porcelain)" != "" ]]; then

.github/workflows/samples-c-libcurl-client.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,31 @@ on:
44
push:
55
paths:
66
- 'samples/client/petstore/c/**'
7+
- 'samples/client/petstore/c-useJsonUnformatted/**'
78
pull_request:
89
paths:
910
- 'samples/client/petstore/c/**'
11+
- 'samples/client/petstore/c-useJsonUnformatted/**'
1012

1113
jobs:
1214
build:
1315
name: Build c libcurl client
1416
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
sample:
21+
- 'samples/client/petstore/c/'
22+
- 'samples/client/petstore/c-useJsonUnformatted/'
23+
1524
steps:
1625
- uses: actions/checkout@v4
1726
- name: Prepare
1827
run: |
1928
sudo apt-get update
2029
sudo apt-get install -y libssl-dev libcurl4-openssl-dev
2130
- name: Build
22-
working-directory: "samples/client/petstore/c"
31+
working-directory: ${{ matrix.sample }}
2332
run: |
2433
mkdir build
2534
cd build

.github/workflows/samples-cpp-qt-client.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v4
2929
- name: Install Qt
30-
uses: jurplel/install-qt-action@v3
30+
uses: jurplel/install-qt-action@v4
3131
with:
3232
version: ${{ matrix.qt-version }}
3333
tools: ${{ matrix.tools }}

.github/workflows/samples-dart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
java-version: 11
2525
cache: maven
2626
- name: Cache test dependencies
27-
uses: actions/cache@v3
27+
uses: actions/cache@v4
2828
env:
2929
cache-name: pub-cache
3030
with:
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Samples C# .Net Framework Clients
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/client/petstore/csharp/generichost/net4.7/**
7+
- samples/client/petstore/csharp/generichost/net4.8/**
8+
pull_request:
9+
paths:
10+
- samples/client/petstore/csharp/generichost/net4.7/**
11+
- samples/client/petstore/csharp/generichost/net4.8/**
12+
jobs:
13+
build:
14+
name: Build .Net projects
15+
runs-on: windows-2019
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
sample:
20+
- samples/client/petstore/csharp/generichost/net4.7/AllOf
21+
- samples/client/petstore/csharp/generichost/net4.7/AnyOf
22+
- samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
23+
- samples/client/petstore/csharp/generichost/net4.7/FormModels
24+
- samples/client/petstore/csharp/generichost/net4.7/OneOf
25+
- samples/client/petstore/csharp/generichost/net4.7/Petstore
26+
- samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
27+
28+
- samples/client/petstore/csharp/generichost/net4.8/AllOf
29+
- samples/client/petstore/csharp/generichost/net4.8/AnyOf
30+
- samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
31+
- samples/client/petstore/csharp/generichost/net4.8/FormModels
32+
- samples/client/petstore/csharp/generichost/net4.8/OneOf
33+
- samples/client/petstore/csharp/generichost/net4.8/Petstore
34+
- samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Build
38+
working-directory: ${{ matrix.sample }}
39+
run: dotnet build Org.OpenAPITools.sln
40+
- name: Test
41+
working-directory: ${{ matrix.sample }}
42+
run: dotnet test Org.OpenAPITools.sln
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
name: Samples C# .Net Standard
1+
name: Samples C# .Net Standard Client
22

33
on:
44
push:
55
paths:
6-
- 'samples/client/petstore/csharp/**netstandard**/'
6+
- samples/client/petstore/csharp/generichost/standard2.0/**
7+
- samples/client/petstore/csharp/httpclient/standard2.0/**
8+
- samples/client/petstore/csharp/restsharp/standard2.0/**
9+
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
710
pull_request:
811
paths:
9-
- 'samples/client/petstore/csharp/**netstandard**/'
12+
- samples/client/petstore/csharp/generichost/standard2.0/**
13+
- samples/client/petstore/csharp/httpclient/standard2.0/**
14+
- samples/client/petstore/csharp/restsharp/standard2.0/**
15+
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
1016
jobs:
1117
build:
1218
name: Build .Net projects
@@ -15,8 +21,11 @@ jobs:
1521
fail-fast: false
1622
matrix:
1723
sample:
18-
# clients
19-
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0
24+
- samples/client/petstore/csharp/generichost/standard2.0/Petstore/
25+
- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/
26+
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
27+
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
28+
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
2029
steps:
2130
- uses: actions/checkout@v4
2231
- uses: actions/[email protected]
@@ -25,6 +34,8 @@ jobs:
2534
- name: Build
2635
working-directory: ${{ matrix.sample }}
2736
run: dotnet build Org.OpenAPITools.sln
28-
- name: Test
29-
working-directory: ${{ matrix.sample }}
30-
run: dotnet test Org.OpenAPITools.sln
37+
# skip tests as petstore server it not running
38+
# these tests are run in appveyor instead
39+
#- name: Test
40+
# working-directory: ${{ matrix.sample }}
41+
# run: dotnet test Org.OpenAPITools.sln

0 commit comments

Comments
 (0)