Skip to content

Commit

Permalink
Merge branch 'master' into hippo/unalias
Browse files Browse the repository at this point in the history
* master: (984 commits)
  add structPrefix support to go-experimental (OpenAPITools#7327)
  Add a link to SmartHR Tech Blog (OpenAPITools#7324)
  Revert "Correct allOf with only one child schema (no discriminator)" (OpenAPITools#7323)
  Correct allOf with only one child schema (no discriminator) (OpenAPITools#6901)
  [Go]: Interface definitions for api functions (OpenAPITools#5914)
  Update bug_report.md (OpenAPITools#7320)
  update samples
  [Java][Client] Use java8 OffsetDateTime for clients (OpenAPITools#7190)
  [java] Intro openApiNullable property to enable/disable OpenAPI Jackson Nullable library (OpenAPITools#6154)
  [Spring Boot] update dependencies, mark java8 option as deprecated (OpenAPITools#7306)
  Remove dot in golang type (OpenAPITools#7307)
  [doc] Document usage of post-process file feature (OpenAPITools#7315)
  fix http bear auth documentation for go clinets (OpenAPITools#7312)
  [Extensions][Go][Java] Test x-auth-id-alias (OpenAPITools#6642)
  [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)
  ...
  • Loading branch information
jimschubert committed Sep 2, 2020
2 parents 28e0a0b + d50d31c commit 97700cd
Show file tree
Hide file tree
Showing 19,493 changed files with 643,033 additions and 719,134 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 8 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ assignees: ''

- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
- [ ] What's the version of OpenAPI Generator used?
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issuue still exists?
- [ ] Have you search for related issues/PRs?
- [ ] What's the actual output vs expected output?
- [ ] [Optional] Bounty to sponsor the fix ([example](https://www.bountysource.com/issues/66123212-javascript-client-produces-a-wrong-object-for-a-string-enum-type-that-is-used-with-ref))
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))

<!--
Please follow the issue template below for bug reports.
Expand Down 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
9 changes: 5 additions & 4 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).
- [ ] 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`.
- [ ] 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/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
Loading

0 comments on commit 97700cd

Please sign in to comment.