Skip to content

Commit dfb40dc

Browse files
authored
Merge pull request #62 from CiscoM31/refresh/upstream
Pull in latest upstream code
2 parents 7cd305c + 6debc0b commit dfb40dc

File tree

15,137 files changed

+641590
-267653
lines changed

Some content is hidden

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

15,137 files changed

+641590
-267653
lines changed

.circleci/config.yml

Lines changed: 194 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +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: ubuntu-2004:202201-02
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:
10143
machine:
11-
image: circleci/classic:latest
144+
image: ubuntu-2004:202201-02
12145
working_directory: ~/OpenAPITools/openapi-generator
13-
parallelism: 4
14146
shell: /bin/bash --login
15147
environment:
16148
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
17149
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
18150
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
19151
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
20152
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-
# Dependencies
46-
# Install latest stable node for angular 6
47-
- run:
48-
name: Install node@stable (for angular 6)
49-
command: |
50-
set +e
51-
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
52-
export NVM_DIR="/opt/circleci/.nvm"
53-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
54-
nvm install stable
55-
nvm alias default stable
56-
57-
# Each step uses the same `$BASH_ENV`, so need to modify it
58-
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
59-
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
60-
- run: node --version
61-
# - run: docker pull openapitools/openapi-petstore
62-
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
63-
- run: docker pull swaggerapi/petstore
64-
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
65-
- run: docker ps -a
66-
- run: sleep 30
67-
- run: cat /etc/hosts
68-
# Test
69-
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
70-
- run: ./CI/circle_parallel.sh
71-
# Save dependency cache
72-
- save_cache:
73-
key: source-v2-{{ .Branch }}-{{ .Revision }}
74-
paths:
75-
# This is a broad list of cache paths to include many possible development environments
76-
# You can probably delete some of these entries
77-
- vendor/bundle
78-
- ~/virtualenvs
79-
- ~/.m2
80-
- ~/.ivy2
81-
- ~/.sbt
82-
- ~/.bundle
83-
- ~/.go_workspace
84-
- ~/.gradle
85-
- ~/.cache/bower
86-
- ".git"
87-
- ~/.stack
88-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
89-
- ~/R
90-
# save "default" cache using the key "source-v2-"
91-
- save_cache:
92-
key: source-v2-
93-
paths:
94-
# This is a broad list of cache paths to include many possible development environments
95-
# You can probably delete some of these entries
96-
- vendor/bundle
97-
- ~/virtualenvs
98-
- ~/.m2
99-
- ~/.ivy2
100-
- ~/.sbt
101-
- ~/.bundle
102-
- ~/.go_workspace
103-
- ~/.gradle
104-
- ~/.cache/bower
105-
- ".git"
106-
- ~/.stack
107-
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
108-
- ~/R
109-
# Teardown
110-
# 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
111-
# Save test results
112-
- store_test_results:
113-
path: /tmp/circleci-test-results
114-
# Save artifacts
115-
- store_artifacts:
116-
path: /tmp/circleci-artifacts
117-
- store_artifacts:
118-
path: /tmp/circleci-test-results
153+
- command_build_and_test:
154+
nodeNo: "1"
155+
node2:
156+
machine:
157+
image: ubuntu-2004:202201-02
158+
working_directory: ~/OpenAPITools/openapi-generator
159+
shell: /bin/bash --login
160+
environment:
161+
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
162+
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
163+
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
164+
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
165+
steps:
166+
- command_build_and_test:
167+
nodeNo: "2"
168+
node3:
169+
machine:
170+
image: ubuntu-2004:202201-02
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: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,6 @@
145145
"Documentation: Cwiki"
146146
]
147147
},
148-
{
149-
"input": "dart-jaguar-petstore.sh",
150-
"matches": [
151-
"Client: Dart"
152-
]
153-
},
154148
{
155149
"input": "dart-dio-petstore.sh",
156150
"matches": [
@@ -223,12 +217,6 @@
223217
"Server: Scala"
224218
]
225219
},
226-
{
227-
"input": "flash-petstore.sh",
228-
"matches": [
229-
"Client: Flash/ActionScript"
230-
]
231-
},
232220
{
233221
"input": "go-gin-petstore-server.sh",
234222
"matches": [
@@ -722,18 +710,6 @@
722710
"Schema: MySQL"
723711
]
724712
},
725-
{
726-
"input": "nancyfx-petstore-server-async.sh",
727-
"matches": [
728-
"Server: C-Sharp"
729-
]
730-
},
731-
{
732-
"input": "nancyfx-petstore-server.sh",
733-
"matches": [
734-
"Server: C-Sharp"
735-
]
736-
},
737713
{
738714
"input": "nodejs-petstore-google-cloud-functions.sh",
739715
"matches": [
@@ -944,24 +920,6 @@
944920
"Server: Spring"
945921
]
946922
},
947-
{
948-
"input": "spring-mvc-petstore-j8-async-server.sh",
949-
"matches": [
950-
"Server: Spring"
951-
]
952-
},
953-
{
954-
"input": "spring-mvc-petstore-j8-localdatetime.sh",
955-
"matches": [
956-
"Server: Spring"
957-
]
958-
},
959-
{
960-
"input": "spring-mvc-petstore-server.sh",
961-
"matches": [
962-
"Server: Spring"
963-
]
964-
},
965923
{
966924
"input": "spring-stubs.sh",
967925
"matches": [
@@ -1401,4 +1359,4 @@
14011359
"matches": []
14021360
}
14031361
]
1404-
}
1362+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@
1616
These must match the expectations made by your contribution.
1717
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*`.
1818
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
19-
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (5.3.0), `6.0.x`
2019
- [ ] 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.

0 commit comments

Comments
 (0)