Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into enum-name-mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Nov 13, 2023
2 parents 53816a5 + 2f655f1 commit a932810
Show file tree
Hide file tree
Showing 105 changed files with 7,444 additions and 483 deletions.
75 changes: 32 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,43 @@ commands: # a reusable command with parameters
- run: docker ps -a
- run: sleep 30
- run: cat /etc/hosts
# Test
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh
# Save dependency cache
- save_cache:
key: source-v2-{{ .Branch }}-{{ .Revision }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/.nvm
- ~/.pyenv
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# save "default" cache using the key "source-v2-"
- save_cache:
key: source-v2-
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/.nvm
- ~/.pyenv
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
#- save_cache:
# key: source-v2-{{ .Branch }}-{{ .Revision }}
# paths:
# # This is a broad list of cache paths to include many possible development environments
# # You can probably delete some of these entries
# - ~/.m2
# - ~/.ivy2
# - ~/.sbt
# - ~/.bundle
# - ~/.go_workspace
# - ~/.gradle
# - ".git"
# - ~/.stack
# - ~/R
## save "default" cache using the key "source-v2-"
#- save_cache:
# key: source-v2-
# paths:
# # This is a broad list of cache paths to include many possible development environments
# # You can probably delete some of these entries
# - vendor/bundle
# - ~/.m2
# - ~/.ivy2
# - ~/.sbt
# - ~/.bundle
# - ~/.go_workspace
# - ~/.gradle
# - ~/.cache/bower
# - ".git"
# - ~/.stack
# - ~/R
# Teardown
# 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
# Save test results
Expand Down
93 changes: 69 additions & 24 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ set -e
export NODE_ENV=test

if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
echo "Running node $NODE_INDEX ..."
java -version

./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)

elif [ "$NODE_INDEX" = "2" ]; then
echo "Running node $NODE_INDEX to test Go"
Expand All @@ -33,20 +36,14 @@ elif [ "$NODE_INDEX" = "2" ]; then
export PATH="/usr/local/go1.18/go/bin:$PATH"
go version

# run integration tests
./mvnw --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# run go integration tests
(cd samples/client/petstore/go && mvn integration-test)
(cd samples/openapi3/client/petstore/go && mvn integration-test)
(cd samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false && mvn integration-test)

elif [ "$NODE_INDEX" = "3" ]; then

echo "Running node $NODE_INDEX to test 'samples.circleci.node3' defined in pom.xml ..."
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
#tar -xf Python-3.8.9.tgz
#cd Python-3.8.9
#./configure --enable-optimizations
#sudo make altinstall
pyenv install --list
pyenv install 3.7.12
#pyenv install 2.7.14 #python2 no longer supported
pyenv global 3.7.12
echo "Running node $NODE_INDEX ... "

# Install node@stable (for angular 6)
set +e
Expand All @@ -63,23 +60,71 @@ elif [ "$NODE_INDEX" = "3" ]; then
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV

./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/client/others/typescript-angular && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/tests/jquery && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/object_params && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/tests/object_params && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/inversify && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/tests/inversify && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test)
(cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test)
(cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test)
(cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test)
(cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test)
(cd samples/client/petstore/typescript-fetch/tests/default && mvn integration-test)
(cd samples/client/petstore/typescript-node/npm && mvn integration-test)
(cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test)
(cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
(cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
(cd samples/client/petstore/javascript-flowtyped && mvn integration-test)
(cd samples/client/petstore/javascript-es6 && mvn integration-test)
(cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)

elif [ "$NODE_INDEX" = "4" ]; then
echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..."
echo "Running node $NODE_INDEX ..."

#mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
#(cd samples/openapi3/client/petstore/python && make test)
# comment out due to ModuleNotFoundError: No module named 'urllib3.request'
#(cd samples/openapi3/client/petstore/python-prior && make test)
#(cd samples/openapi3/client/3_0_3_unit_test/python && make test)
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
#tar -xf Python-3.8.9.tgz
#cd Python-3.8.9
#./configure --enable-optimizations
#sudo make altinstall
pyenv install --list
pyenv install 3.7.12
#pyenv install 2.7.14 #python2 no longer supported
pyenv global 3.7.12

(cd samples/openapi3/client/petstore/python && mvn integration-test)
(cd samples/openapi3/client/petstore/python-pydantic-v1 && mvn integration-test)
(cd samples/openapi3/client/petstore/python-aiohttp && mvn integration-test)
(cd samples/openapi3/client/petstore/python-pydantic-v1-aiohttp && mvn integration-test)

else
echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..."
echo "Running node $NODE_INDEX ..."
java -version

./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.others -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/client/petstore/scala-akka && mvn integration-test)
(cd samples/client/petstore/scala-sttp && mvn integration-test)
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
(cd samples/client/petstore/clojure && mvn integration-test)
(cd samples/client/petstore/java/jersey2-java8 && mvn integration-test)
(cd samples/openapi3/client/petstore/java/jersey2-java8 && mvn integration-test)
(cd samples/client/petstore/java/jersey3 && mvn integration-test)
(cd samples/client/others/java/okhttp-gson-streaming && mvn integration-test)
(cd samples/client/petstore/java/okhttp-gson && mvn integration-test)
(cd samples/client/petstore/java/okhttp-gson-3.1 && mvn integration-test)
(cd samples/client/petstore/java/resteasy && mvn integration-test)
(cd samples/client/petstore/java-micronaut-client && mvn integration-test)
(cd samples/client/petstore/java/apache-httpclient && mvn integration-test)

fi


1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [RedHat](https://www.redhat.com)
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
- [REST United](https://restunited.com)
- [Robocorp](https://www.robocorp.com)
- [Robotinfra](https://www.robotinfra.com)
- [SmartHR](https://smarthr.co.jp/)
- [Sony Interactive Entertainment](https://www.sie.com/en/index.html)
Expand Down
7 changes: 7 additions & 0 deletions bin/configs/powershell-echo-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generatorName: powershell
outputDir: samples/client/echo_api/powershell
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
templateDir: modules/openapi-generator/src/main/resources/powershell
additionalProperties:
hideGenerationTimestamp: "true"
packageGuid: a27b908d-2a20-467f-bc32-af6f3a654ac5
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit a932810

Please sign in to comment.