Skip to content

Commit c8b84c4

Browse files
committed
Merge remote-tracking branch 'origin/master' into 6.0.x
2 parents 9c3d4ef + 3ed6343 commit c8b84c4

File tree

4,543 files changed

+127808
-45987
lines changed

Some content is hidden

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

4,543 files changed

+127808
-45987
lines changed

.circleci/config.yml

Lines changed: 193 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,204 @@
1-
version: 2
1+
version: 2.1
2+
commands: # a reusable command with parameters
3+
command_build_and_test:
4+
parameters:
5+
nodeNo:
6+
default: "0"
7+
type: string
8+
steps:
9+
# Restore the dependency cache
10+
- restore_cache:
11+
keys:
12+
# Default branch if not
13+
- source-v2-{{ .Branch }}-{{ .Revision }}
14+
- source-v2-{{ .Branch }}-
15+
- source-v2-
16+
# Machine Setup
17+
# 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
18+
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
19+
- checkout
20+
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
21+
# In many cases you can simplify this from what is generated here.
22+
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
23+
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
24+
# This is based on your 1.0 configuration file or project settings
25+
- run:
26+
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
27+
- run:
28+
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
29+
- run:
30+
command: |-
31+
printf '127.0.0.1 petstore.swagger.io
32+
' | sudo tee -a /etc/hosts
33+
# - run: docker pull openapitools/openapi-petstore
34+
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
35+
- run: docker pull swaggerapi/petstore
36+
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
37+
- run: docker ps -a
38+
- run: sleep 30
39+
- run: cat /etc/hosts
40+
# Test
41+
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
42+
- run:
43+
name: "Setup custom environment variables"
44+
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
45+
- run: ./CI/circle_parallel.sh
46+
# Save dependency cache
47+
- save_cache:
48+
key: source-v2-{{ .Branch }}-{{ .Revision }}
49+
paths:
50+
# This is a broad list of cache paths to include many possible development environments
51+
# You can probably delete some of these entries
52+
- vendor/bundle
53+
- ~/virtualenvs
54+
- ~/.m2
55+
- ~/.ivy2
56+
- ~/.sbt
57+
- ~/.bundle
58+
- ~/.go_workspace
59+
- ~/.gradle
60+
- ~/.cache/bower
61+
- ".git"
62+
- ~/.stack
63+
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
64+
- ~/R
65+
# save "default" cache using the key "source-v2-"
66+
- save_cache:
67+
key: source-v2-
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+
- vendor/bundle
72+
- ~/virtualenvs
73+
- ~/.m2
74+
- ~/.ivy2
75+
- ~/.sbt
76+
- ~/.bundle
77+
- ~/.go_workspace
78+
- ~/.gradle
79+
- ~/.cache/bower
80+
- ".git"
81+
- ~/.stack
82+
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
83+
- ~/R
84+
# Teardown
85+
# 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
86+
# Save test results
87+
- store_test_results:
88+
path: /tmp/circleci-test-results
89+
# Save artifacts
90+
- store_artifacts:
91+
path: /tmp/circleci-artifacts
92+
- store_artifacts:
93+
path: /tmp/circleci-test-results
94+
command_docker_build_and_test:
95+
parameters:
96+
nodeNo:
97+
default: "0"
98+
type: string
99+
steps:
100+
# Machine Setup
101+
# 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
102+
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
103+
- checkout
104+
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
105+
# In many cases you can simplify this from what is generated here.
106+
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
107+
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
108+
# This is based on your 1.0 configuration file or project settings
109+
# - run:
110+
# command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
111+
# - run:
112+
# Test
113+
# - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
114+
- run:
115+
name: "Setup custom environment variables"
116+
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
117+
- run: ./CI/circle_parallel.sh
118+
# Teardown
119+
# 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
120+
# Save test results
121+
- store_test_results:
122+
path: /tmp/circleci-test-results
123+
# Save artifacts
124+
- store_artifacts:
125+
path: /tmp/circleci-artifacts
126+
- store_artifacts:
127+
path: /tmp/circleci-test-results
2128
jobs:
3-
build:
4-
# docker:
5-
# #- image: openapitools/openapi-generator
6-
# - image: swaggerapi/petstore
7-
# environment:
8-
# SWAGGER_HOST=http://petstore.swagger.io
9-
# SWAGGER_BASE_PATH=/v2
129+
node0:
130+
machine:
131+
image: circleci/classic:latest
132+
working_directory: ~/OpenAPITools/openapi-generator
133+
shell: /bin/bash --login
134+
environment:
135+
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
136+
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
137+
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
138+
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
139+
steps:
140+
- command_build_and_test:
141+
nodeNo: "0"
142+
node1:
143+
machine:
144+
image: circleci/classic:latest
145+
working_directory: ~/OpenAPITools/openapi-generator
146+
shell: /bin/bash --login
147+
environment:
148+
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
149+
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
150+
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
151+
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
152+
steps:
153+
- command_build_and_test:
154+
nodeNo: "1"
155+
node2:
10156
machine:
11157
image: circleci/classic:latest
12158
working_directory: ~/OpenAPITools/openapi-generator
13-
parallelism: 4
14159
shell: /bin/bash --login
15160
environment:
16161
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
17162
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
18163
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
19164
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
20165
steps:
21-
# Restore the dependency cache
22-
- restore_cache:
23-
keys:
24-
# Default branch if not
25-
- source-v2-{{ .Branch }}-{{ .Revision }}
26-
- source-v2-{{ .Branch }}-
27-
- source-v2-
28-
# Machine Setup
29-
# 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
30-
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
31-
- checkout
32-
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
33-
# In many cases you can simplify this from what is generated here.
34-
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
35-
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
36-
# This is based on your 1.0 configuration file or project settings
37-
- run:
38-
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
39-
- run:
40-
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
41-
- run:
42-
command: |-
43-
printf '127.0.0.1 petstore.swagger.io
44-
' | sudo tee -a /etc/hosts
45-
# - run: docker pull openapitools/openapi-petstore
46-
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
47-
- run: docker pull swaggerapi/petstore
48-
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
49-
- run: docker ps -a
50-
- run: sleep 30
51-
- run: cat /etc/hosts
52-
# Test
53-
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
54-
- run: ./CI/circle_parallel.sh
55-
# Save dependency cache
56-
- save_cache:
57-
key: source-v2-{{ .Branch }}-{{ .Revision }}
58-
paths:
59-
# This is a broad list of cache paths to include many possible development environments
60-
# You can probably delete some of these entries
61-
- vendor/bundle
62-
- ~/virtualenvs
63-
- ~/.m2
64-
- ~/.ivy2
65-
- ~/.sbt
66-
- ~/.bundle
67-
- ~/.go_workspace
68-
- ~/.gradle
69-
- ~/.cache/bower
70-
- ".git"
71-
- ~/.stack
72-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
73-
- ~/R
74-
# save "default" cache using the key "source-v2-"
75-
- save_cache:
76-
key: source-v2-
77-
paths:
78-
# This is a broad list of cache paths to include many possible development environments
79-
# You can probably delete some of these entries
80-
- vendor/bundle
81-
- ~/virtualenvs
82-
- ~/.m2
83-
- ~/.ivy2
84-
- ~/.sbt
85-
- ~/.bundle
86-
- ~/.go_workspace
87-
- ~/.gradle
88-
- ~/.cache/bower
89-
- ".git"
90-
- ~/.stack
91-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
92-
- ~/R
93-
# Teardown
94-
# 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
95-
# Save test results
96-
- store_test_results:
97-
path: /tmp/circleci-test-results
98-
# Save artifacts
99-
- store_artifacts:
100-
path: /tmp/circleci-artifacts
101-
- store_artifacts:
102-
path: /tmp/circleci-test-results
166+
- command_build_and_test:
167+
nodeNo: "2"
168+
node3:
169+
machine:
170+
image: circleci/classic:latest
171+
working_directory: ~/OpenAPITools/openapi-generator
172+
shell: /bin/bash --login
173+
environment:
174+
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
175+
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
176+
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
177+
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
178+
steps:
179+
- checkout
180+
- command_build_and_test:
181+
nodeNo: "3"
182+
node4:
183+
docker:
184+
- image: fkrull/multi-python
185+
working_directory: ~/OpenAPITools/openapi-generator
186+
shell: /bin/bash --login
187+
environment:
188+
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
189+
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
190+
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
191+
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
192+
steps:
193+
- checkout
194+
- command_docker_build_and_test:
195+
nodeNo: "4"
196+
workflows:
197+
version: 2
198+
build:
199+
jobs:
200+
- node0
201+
- node1
202+
- node2
203+
- node3
204+
- node4

.github/.test/samples.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -710,18 +710,6 @@
710710
"Schema: MySQL"
711711
]
712712
},
713-
{
714-
"input": "nancyfx-petstore-server-async.sh",
715-
"matches": [
716-
"Server: C-Sharp"
717-
]
718-
},
719-
{
720-
"input": "nancyfx-petstore-server.sh",
721-
"matches": [
722-
"Server: C-Sharp"
723-
]
724-
},
725713
{
726714
"input": "nodejs-petstore-google-cloud-functions.sh",
727715
"matches": [

.github/auto-labeler.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ labels:
220220
'Server: C-Sharp':
221221
- '\s*?\[aspnetcore\]\s*?'
222222
- '\s*?-[gl] aspnetcore\s*?'
223-
- '\s*?\[csharp-nancyfx\]\s*?'
224-
- '\s*?-[gl] csharp-nancyfx\s*?'
225223
# 'Server: Ceylon': # TODO: REMOVE UNUSED LABEL
226224
'Server: Eiffel':
227225
- '\s*?\[eiffel(-.*)?-server\]\s*?'

.github/workflows/samples-kotlin.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
- samples/client/petstore/kotlin-string
4242
- samples/client/petstore/kotlin-threetenbp
4343
- samples/client/petstore/kotlin-uppercase-enum
44+
- samples/client/petstore/kotlin-array-simple-string
4445
steps:
4546
- uses: actions/checkout@v2
4647
- uses: actions/setup-java@v2

.github/workflows/samples-spring.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Samples Java Spring
2+
3+
on:
4+
push:
5+
paths:
6+
- 'samples/server/petstore/spring*/**'
7+
- 'samples/openapi3/server/petstore/spring*/**'
8+
pull_request:
9+
paths:
10+
- 'samples/server/petstore/spring*/**'
11+
- 'samples/openapi3/server/petstore/spring*/**'
12+
jobs:
13+
build:
14+
name: Build Java Spring
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
sample:
20+
# clients
21+
- samples/client/petstore/spring-cloud
22+
- samples/openapi3/client/petstore/spring-cloud
23+
- samples/client/petstore/spring-cloud-date-time
24+
- samples/openapi3/client/petstore/spring-cloud-date-time
25+
- samples/client/petstore/spring-stubs
26+
- samples/openapi3/client/petstore/spring-stubs
27+
# servers
28+
- samples/server/petstore/spring-mvc
29+
- samples/server/petstore/spring-mvc-default-value
30+
- samples/server/petstore/spring-mvc-j8-async
31+
- samples/server/petstore/spring-mvc-j8-localdatetime
32+
- samples/server/petstore/springboot
33+
- samples/openapi3/server/petstore/springboot
34+
- samples/server/petstore/springboot-beanvalidation
35+
- samples/server/petstore/springboot-useoptional
36+
- samples/openapi3/server/petstore/springboot-useoptional
37+
- samples/server/petstore/springboot-reactive
38+
- samples/openapi3/server/petstore/springboot-reactive
39+
- samples/server/petstore/springboot-implicitHeaders
40+
- samples/openapi3/server/petstore/springboot-implicitHeaders
41+
- samples/server/petstore/springboot-delegate
42+
- samples/openapi3/server/petstore/springboot-delegate
43+
steps:
44+
- uses: actions/checkout@v2
45+
- uses: actions/setup-java@v2
46+
with:
47+
distribution: 'temurin'
48+
java-version: 8
49+
- name: Cache maven dependencies
50+
uses: actions/cache@v2.1.7
51+
env:
52+
cache-name: maven-repository
53+
with:
54+
path: |
55+
~/.m2
56+
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
57+
- name: Build
58+
working-directory: ${{ matrix.sample }}
59+
run: mvn clean package

0 commit comments

Comments
 (0)