Skip to content

Commit

Permalink
Merge branch 'master' into extensions/x-auth-id-alias
Browse files Browse the repository at this point in the history
* master: (355 commits)
  [php-slim4] Move config to a separate file (OpenAPITools#6971)
  [C][Client][Clang Static Analyzer] Remove the useless free operation for (OpenAPITools#7309)
  Fix typescript-node generation when only models are generated (OpenAPITools#7127)
  update spring config to use java8 (OpenAPITools#7308)
  [C][Client][Clang Static Analyzer] Fix uninitialized argument value (OpenAPITools#7305)
  [Java] remove deprecated jackson classes (OpenAPITools#7304)
  Adds generator unaliasSchema method, uses it to refactor python-experimental (OpenAPITools#7274)
  [Rust][reqwest] prefix local variables with "local_var" (OpenAPITools#7299)
  [Java][jersey2]Support enum discriminator value in child objects (OpenAPITools#7267)
  [C][Client][Clang Static Analyzer] Fix memory leak before function returnning (OpenAPITools#7302)
  add extension for hashable in swift5 (OpenAPITools#7300)
  [kotlin][client] fix warning Extension is shadowed by a member (OpenAPITools#7286)
  Add wbt-solutions logo (OpenAPITools#7298)
  [c-sharp] Fix default values with discriminator  (OpenAPITools#7296)
  Add x-is-json to csharp generators (OpenAPITools#7293)
  Add raksul (OpenAPITools#7295)
  Add wbt-solutions as using company (OpenAPITools#7292)
  [C][Client][Clang Static Analyzer] Fix memory leak in apiClient_invoke (OpenAPITools#7285)
  [Java][clients] remove java.lang prefix from Object (OpenAPITools#6806)
  [core] Add x-is-free-form vendor extension (OpenAPITools#6849)
  ...
  • Loading branch information
jimschubert committed Aug 31, 2020
2 parents 0818b1d + da9f2f7 commit ff8790a
Show file tree
Hide file tree
Showing 9,927 changed files with 212,746 additions and 314,270 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ please create a Gist (https://gist.github.com) or upload it somewhere else and
link it here.
-->

##### Command line used for generation
##### Generation Details

<!-- including the language, libraries and various options -->
<!--
Prefer CLI steps, including the language, libraries and various options.
Providing config-based settings allows for simpler testing across CLI and plugins.
For examples, see https://github.com/OpenAPITools/openapi-generator/tree/master/bin/configs
-->

##### Steps to reproduce

Expand Down
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

<!-- Please check the completed items below -->
### PR checklist

- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [ ] 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/).
- [ ] 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/configs/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.
87 changes: 87 additions & 0 deletions .github/workflows/check-supported-versions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Check Supported Java Versions
on:
push:
branches:
- master

jobs:
build:
name: Build on JDK ${{ matrix.java }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11]
os: [ubuntu-latest]
include:
- java: 8
os: windows-latest
- java: 13
os: ubuntu-latest
# Need to update to Gradle version with v13 support in modules/openapi-generator-gradle-plugin/pom.xml
flags: -am -pl modules/openapi-generator-cli
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('modules/openapi-generator-gradle-plugin/pom.xml') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Maven
shell: bash
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}

- name: Test gradle
shell: bash
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace

- name: Upload Maven build artifact
uses: actions/upload-artifact@v1
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
with:
name: artifact
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar

verify:
name: Verifies integrity of the commit on ${{ matrix.os }}
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# include:
# - os: windows-latest
# flags: --skip-docs
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Download build artifact
uses: actions/download-artifact@v1
with:
name: artifact
- name: Run Ensures Script
shell: bash
run: |
git config --global core.fileMode false
git config --global core.safecrlf false
git config --global core.autocrlf true
mkdir -p modules/openapi-generator-cli/target/
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
./bin/utils/ensure-up-to-date ${{ matrix.flags }}
75 changes: 75 additions & 0 deletions .github/workflows/docker-tag-latest-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Docker Tag latest-release

# Run every couple of days
on:
schedule:
- cron: "30 12 */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-cli
- name: "Tag openapi-generator-cli:x"
id: tag-openapi-generator-cli
if: always()
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-online
- name: "Tag openapi-generator-online:x"
id: tag-openapi-generator-online
if: always()
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
if: always()
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
if: always()
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
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,21 @@ samples/client/petstore/python-asyncio/.venv/
samples/client/petstore/python-asyncio/.pytest_cache/
samples/client/petstore/python-tornado/.venv/

# PHP
samples/client/petstore/php/OpenAPIClient-php/composer.lock
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
samples/openapi3/server/petstore/php-ze-ph/composer.lock
samples/server/petstore/php-laravel/lib/composer.lock
samples/server/petstore/php-lumen/lib/composer.lock
samples/server/petstore/php-slim4/composer.lock
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
samples/server/petstore/php-ze-ph/composer.lock

# ts
samples/client/petstore/typescript-angular2/npm/npm-debug.log
samples/client/petstore/typescript-node/npm/npm-debug.log
samples/client/petstore/typescript-angular/tsd-debug.log
samples/client/petstore/typescript-axios/tests/**/dist/
samples/client/petstore/typescript-fetch/tests/**/dist/

# aspnetcore
Expand Down Expand Up @@ -230,7 +241,8 @@ samples/client/petstore/dart/petstore/test/packages
**/.dart_tool

# JS
samples/client/petstore/javascript/package-lock.json
samples/client/petstore/javascript-es6/package-lock.json
samples/client/petstore/javascript-promise-es6/package-lock.json

# elm
samples/client/petstore/elm/index.html
Expand Down
8 changes: 2 additions & 6 deletions .hub.cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
##
## You can build _just_ this part with:
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder

RUN set -x && \
apk add --no-cache bash
FROM maven:3.6.3-jdk-11-openj9 as builder

ENV GEN_DIR /opt/openapi-generator
WORKDIR ${GEN_DIR}
Expand All @@ -18,11 +15,10 @@ RUN mvn -am -pl "modules/openapi-generator-cli" package
## The final (release) image
## The resulting container here only needs the target jar
## and ca-certificates (to be able to query HTTPS hosted specs)
FROM openjdk:8-jre-alpine
FROM openjdk:11.0.8-jre-slim-buster

ENV GEN_DIR /opt/openapi-generator

RUN apk --no-cache add ca-certificates bash
RUN mkdir -p ${GEN_DIR}/modules/openapi-generator-cli/target

WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target
Expand Down
7 changes: 2 additions & 5 deletions .hub.online.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
##
## You can build _just_ this part with:
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder

RUN set -x && \
apk add --no-cache bash
FROM maven:3.6.3-jdk-11-openj9 as builder

ENV GEN_DIR /opt/openapi-generator
WORKDIR ${GEN_DIR}
Expand All @@ -17,7 +14,7 @@ RUN mvn -am -pl "modules/openapi-generator-online" package

## The final (release) image
## The resulting container here only needs the target jar
FROM openjdk:8-jre-alpine
FROM openjdk:11.0.8-jre-slim-buster

ENV GEN_DIR /opt/openapi-generator
ENV TARGET_DIR /generator
Expand Down
38 changes: 20 additions & 18 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 @@ -72,11 +77,13 @@ before_install:
- docker pull swaggerapi/petstore
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- docker ps -a
# -- skip bash test to shorten build time
# Add bats test framework and cURL for Bash script integration tests
- sudo add-apt-repository ppa:duggan/bats --yes
- sudo apt-get update -qq
- sudo apt-get install -qq bats
- sudo apt-get install -qq curl
#- sudo add-apt-repository ppa:duggan/bats --yes
#- sudo apt-get update -qq
#- sudo apt-get install -qq bats
#- sudo apt-get install -qq curl
# -- skip bash test end
# install dart
#- sudo apt-get update
#- sudo apt-get install apt-transport-https
Expand All @@ -85,11 +92,9 @@ 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)
#- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
# comment out below as installation failed in travis
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
Expand All @@ -101,9 +106,11 @@ before_install:
# install Qt5
- sudo apt install -y --no-install-recommends qt5-default
- cmake --version
# -- skip perl test to shorten build time
# 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"
#- 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"
# -- skip perl test end
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
# show java version
Expand All @@ -114,6 +121,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 @@ -140,14 +150,6 @@ script:
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- 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 --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)
after_success:
# push to maven repo
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
Expand Down
Loading

0 comments on commit ff8790a

Please sign in to comment.