Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rator into OpenAPIToolsgh-1975-VI

� Conflicts:
�	bin/spring-all-petstore.sh
�	modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
  • Loading branch information
nhomble committed Jun 29, 2020
2 parents 65f0249 + a77fd44 commit b3b494f
Show file tree
Hide file tree
Showing 11,512 changed files with 226,342 additions and 419,285 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### PR checklist

- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before.
- [ ] Run the shell script(s) under `./bin/` (or Windows batch scripts under`.\bin\windows`) to update Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the code or mustache templates for a language (`{LANG}`) (e.g. php, ruby, python, etc).
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.3.x`, `5.0.x`. Default: `master`.
- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) beforehand.
- [ ] Run the shell script `./bin/generate-samples.sh`to update all Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. 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/config/java*`. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`
- [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
62 changes: 62 additions & 0 deletions .github/workflows/docker-tag-latest-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Docker Tag latest-release

# Run every couple of days
on:
schedule:
- cron: "* * */2 * *"

jobs:
# This pulls all containers for the last known release tag, and tags as latest-release or x-latest-release for shared repo
tagLatestRelease:
runs-on: ubuntu-latest

steps:

# Pull the code so we have git metadata
- name: Checkout code
uses: actions/checkout@v2

# This action will "unshallow" so we have all tag info
- name: Get latest tag
id: tagger
uses: jimschubert/query-tag-action@v1
with:
include: 'v*'
exclude: '*-rc*'
commit-ish: 'HEAD~'

- name: DockerHub Login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

# Tags openapitools/openapi-generator-online, which is an automated build
- name: "Tag openapi-generator-online:x"
id: tag-openapi-generator-online
run: |
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
docker pull openapitools/openapi-generator-online:${{steps.tagger.outputs.tag}}
docker tag openapitools/openapi-generator-online:${{steps.tagger.outputs.tag}} openapitools/openapi-generator-online:latest-release
docker push openapitools/openapi-generator-online:latest-release
# Tags openapitools/openapi-generator's CLI image (this repo holds CLI + Online via tag prefix)
- name: "Tag openapi-generator:cli-x"
id: tag-cli
run: |
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
docker pull openapitools/openapi-generator:cli-${{steps.tagger.outputs.tag}}
docker tag openapitools/openapi-generator:cli-${{steps.tagger.outputs.tag}} openapitools/openapi-generator:cli-latest-release
docker push openapitools/openapi-generator:cli-latest-release
# Tags openapitools/openapi-generator's ONLINE image (this repo holds CLI + Online via tag prefix)
- name: "Tag openapi-generator:online-x"
id: tag-online
run: |
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
docker pull openapitools/openapi-generator:online-${{steps.tagger.outputs.tag}}
docker tag openapitools/openapi-generator:online-${{steps.tagger.outputs.tag}} openapitools/openapi-generator:online-latest-release
docker push openapitools/openapi-generator:online-latest-release
# Clean up docker credentials/configs/etc.
- name: Cleanup
if: always()
run: |
rm -f ${HOME}/.docker/config.json
26 changes: 19 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ cache:
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
- $HOME/samples/client/petstore/ruby/vendor/bundle
- $HOME/samples/client/petstore/python/.venv/
- $HOME/samples/openapi3/client/petstore/typescript/tests/default/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/jquery/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/object_params/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/inversify/node_modules
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
- $HOME/samples/client/petstore/typescript-node/npm/typings/
- $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
Expand All @@ -41,6 +45,7 @@ cache:
- $HOME/.npm
- $HOME/.rvm/gems/ruby-2.4.1
- $HOME/website/node_modules/
- $HOME/.cache/deno

services:
- docker
Expand Down Expand Up @@ -85,7 +90,8 @@ before_install:
#- sudo apt-get update
#- sudo apt-get install dart
# switch to php7
- phpenv global 7.1
- phpenv versions
- phpenv global 7.2.15
- php -v
# install perl module
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
Expand All @@ -101,6 +107,9 @@ before_install:
# install Qt5
- sudo apt install -y --no-install-recommends qt5-default
- cmake --version
# perl dep
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Igorned failure from cpanm"
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
# show java version
Expand All @@ -111,6 +120,9 @@ before_install:
gpg --check-trustdb ;
fi;
- pushd .; cd website; yarn install; popd
# install Deno
- curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.1.2
- export PATH="$HOME/.deno/bin:$PATH"

install:
# Add Godeps dependencies to GOPATH and PATH
Expand All @@ -135,13 +147,13 @@ script:
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
# run integration tests defined in maven pom.xml
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- mvn --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test maven plugin
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test gradle plugin
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
Expand Down
4 changes: 2 additions & 2 deletions CI/.drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ steps:
# generate test scripts
- /bin/bash bin/tests/run-all-test
# generate all petstore samples (client, servers, doc)
- /bin/bash bin/run-all-petstore
- /bin/bash bin/generate-samples.sh
# generate all petstore samples (openapi3)
- /bin/bash bin/openapi3/run-all-petstore
- /bin/bash bin/generate-samples.sh bin/configs/other/*.yaml
2 changes: 1 addition & 1 deletion CI/.travis.yml.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ script:
- set -e
# run integration tests defined in maven pom.xml
- cp pom.xml.bash pom.xml
- mvn --batch-mode verify -Psamples
- mvn --no-snapshot-updates --batch-mode verify -Psamples
2 changes: 1 addition & 1 deletion CI/.travis.yml.ios
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ before_install:

script:
# run integration tests defined in maven pom.xml
- mvn -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true
- mvn --no-snapshot-updates -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true
22 changes: 6 additions & 16 deletions CI/bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@ workflows:
- brew-install@0.10.2:
inputs:
- packages: maven
- script@1.1.5:
- script@1.1.6:
title: Install Cocoapods
inputs:
- content: |
#!/usr/bin/env bash
sudo gem install cocoapods
- script@1.1.5:
- script@1.1.6:
inputs:
- content: |
#!/usr/bin/env bash
set -e
mvn package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
title: Build openapi-generator
- script@1.1.5:
- script@1.1.6:
title: Update Swift samples
inputs:
- content: |
#!/usr/bin/env bash
set -e
sh bin/swift5-all.sh
- script@1.1.5:
bin/generate-samples.sh ./bin/configs/other/swift5-*
- script@1.1.6:
title: Run Swift5 tests
inputs:
- content: |
Expand All @@ -48,14 +48,4 @@ workflows:
set -e
./samples/client/test/swift5/swift5_test_all.sh
# comment out the following as it's causing timeout
# - script@1.1.5:
# title: Run all bin scripts
# inputs:
# - content: |-
# #!/usr/bin/env bash
#
# set -e
#
# ./bin/run-all-petstore
8 changes: 4 additions & 4 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if [ "$NODE_INDEX" = "1" ]; then
export PATH="/usr/local/go1.14/go/bin:$PATH"
go version

mvn --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error

elif [ "$NODE_INDEX" = "2" ]; then
# run ensure-up-to-date sample script on SNAPSHOT version only
Expand Down Expand Up @@ -58,7 +58,7 @@ elif [ "$NODE_INDEX" = "2" ]; then
sudo apt-get -y install libcurl4-gnutls-dev

# run integration tests
mvn --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
else
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
Expand All @@ -73,7 +73,7 @@ else
sudo apt-get install dart
export PATH="$PATH:/usr/lib/dart/bin"

mvn --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
fi


This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit b3b494f

Please sign in to comment.