Skip to content

Commit 97700cd

Browse files
committed
Merge branch 'master' into hippo/unalias
* 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) ...
2 parents 28e0a0b + d50d31c commit 97700cd

File tree

19,493 files changed

+643033
-719134
lines changed

Some content is hidden

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

19,493 files changed

+643033
-719134
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ assignees: ''
1111

1212
- [ ] Have you provided a full/minimal spec to reproduce the issue?
1313
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
14-
- [ ] What's the version of OpenAPI Generator used?
14+
- [ ] 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?
1515
- [ ] Have you search for related issues/PRs?
1616
- [ ] What's the actual output vs expected output?
17-
- [ ] [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))
17+
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))
1818

1919
<!--
2020
Please follow the issue template below for bug reports.
@@ -45,9 +45,13 @@ please create a Gist (https://gist.github.com) or upload it somewhere else and
4545
link it here.
4646
-->
4747

48-
##### Command line used for generation
48+
##### Generation Details
4949

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

5256
##### Steps to reproduce
5357

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
<!-- Please check the completed items below -->
44
### PR checklist
5-
5+
66
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
7-
- [ ] 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.
8-
- [ ] 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).
9-
- [ ] 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`.
7+
- [ ] 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.
8+
- [ ] 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.
9+
- [ ] 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/).
10+
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`
1011
- [ ] 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.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Check Supported Java Versions
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build:
9+
name: Build on JDK ${{ matrix.java }} and ${{ matrix.os }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
java: [8, 11]
14+
os: [ubuntu-latest]
15+
include:
16+
- java: 8
17+
os: windows-latest
18+
- java: 13
19+
os: ubuntu-latest
20+
# Need to update to Gradle version with v13 support in modules/openapi-generator-gradle-plugin/pom.xml
21+
flags: -am -pl modules/openapi-generator-cli
22+
steps:
23+
- name: Check out code
24+
uses: actions/checkout@v2
25+
26+
- name: Set up JDK ${{ matrix.java }}
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: ${{ matrix.java }}
30+
31+
- uses: actions/cache@v1
32+
with:
33+
path: ~/.m2/repository
34+
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
35+
restore-keys: |
36+
${{ runner.os }}-maven-
37+
38+
- uses: actions/cache@v2
39+
with:
40+
path: |
41+
~/.gradle/caches
42+
~/.gradle/wrapper
43+
key: ${{ runner.os }}-gradle-${{ hashFiles('modules/openapi-generator-gradle-plugin/pom.xml') }}
44+
restore-keys: |
45+
${{ runner.os }}-gradle-
46+
47+
- name: Build with Maven
48+
shell: bash
49+
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}
50+
51+
- name: Test gradle
52+
shell: bash
53+
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
54+
55+
- name: Upload Maven build artifact
56+
uses: actions/upload-artifact@v1
57+
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
58+
with:
59+
name: artifact
60+
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
61+
62+
verify:
63+
name: Verifies integrity of the commit on ${{ matrix.os }}
64+
needs: build
65+
runs-on: ${{ matrix.os }}
66+
strategy:
67+
matrix:
68+
os: [ubuntu-latest]
69+
# include:
70+
# - os: windows-latest
71+
# flags: --skip-docs
72+
steps:
73+
- name: Check out code
74+
uses: actions/checkout@v2
75+
- name: Download build artifact
76+
uses: actions/download-artifact@v1
77+
with:
78+
name: artifact
79+
- name: Run Ensures Script
80+
shell: bash
81+
run: |
82+
git config --global core.fileMode false
83+
git config --global core.safecrlf false
84+
git config --global core.autocrlf true
85+
mkdir -p modules/openapi-generator-cli/target/
86+
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
87+
./bin/utils/ensure-up-to-date ${{ matrix.flags }}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Docker Tag latest-release
2+
3+
# Run every couple of days
4+
on:
5+
schedule:
6+
- cron: "30 12 */2 * *"
7+
8+
jobs:
9+
# This pulls all containers for the last known release tag, and tags as latest-release or x-latest-release for shared repo
10+
tagLatestRelease:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
# Pull the code so we have git metadata
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
# This action will "unshallow" so we have all tag info
20+
- name: Get latest tag
21+
id: tagger
22+
uses: jimschubert/query-tag-action@v1
23+
with:
24+
include: 'v*'
25+
exclude: '*-rc*'
26+
commit-ish: 'HEAD~'
27+
28+
- name: DockerHub Login
29+
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
30+
31+
# Tags openapitools/openapi-generator-cli
32+
- name: "Tag openapi-generator-cli:x"
33+
id: tag-openapi-generator-cli
34+
if: always()
35+
run: |
36+
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
37+
docker pull openapitools/openapi-generator-cli:${{steps.tagger.outputs.tag}}
38+
docker tag openapitools/openapi-generator-cli:${{steps.tagger.outputs.tag}} openapitools/openapi-generator-cli:latest-release
39+
docker push openapitools/openapi-generator-cli:latest-release
40+
41+
# Tags openapitools/openapi-generator-online
42+
- name: "Tag openapi-generator-online:x"
43+
id: tag-openapi-generator-online
44+
if: always()
45+
run: |
46+
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
47+
docker pull openapitools/openapi-generator-online:${{steps.tagger.outputs.tag}}
48+
docker tag openapitools/openapi-generator-online:${{steps.tagger.outputs.tag}} openapitools/openapi-generator-online:latest-release
49+
docker push openapitools/openapi-generator-online:latest-release
50+
51+
# Tags openapitools/openapi-generator's CLI image (this repo holds CLI + Online via tag prefix)
52+
- name: "Tag openapi-generator:cli-x"
53+
id: tag-cli
54+
if: always()
55+
run: |
56+
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
57+
docker pull openapitools/openapi-generator:cli-${{steps.tagger.outputs.tag}}
58+
docker tag openapitools/openapi-generator:cli-${{steps.tagger.outputs.tag}} openapitools/openapi-generator:cli-latest-release
59+
docker push openapitools/openapi-generator:cli-latest-release
60+
61+
# Tags openapitools/openapi-generator's ONLINE image (this repo holds CLI + Online via tag prefix)
62+
- name: "Tag openapi-generator:online-x"
63+
id: tag-online
64+
if: always()
65+
run: |
66+
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
67+
docker pull openapitools/openapi-generator:online-${{steps.tagger.outputs.tag}}
68+
docker tag openapitools/openapi-generator:online-${{steps.tagger.outputs.tag}} openapitools/openapi-generator:online-latest-release
69+
docker push openapitools/openapi-generator:online-latest-release
70+
71+
# Clean up docker credentials/configs/etc.
72+
- name: Cleanup
73+
if: always()
74+
run: |
75+
rm -f ${HOME}/.docker/config.json

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,21 @@ samples/client/petstore/python-asyncio/.venv/
173173
samples/client/petstore/python-asyncio/.pytest_cache/
174174
samples/client/petstore/python-tornado/.venv/
175175

176+
# PHP
177+
samples/client/petstore/php/OpenAPIClient-php/composer.lock
178+
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
179+
samples/openapi3/server/petstore/php-ze-ph/composer.lock
180+
samples/server/petstore/php-laravel/lib/composer.lock
181+
samples/server/petstore/php-lumen/lib/composer.lock
182+
samples/server/petstore/php-slim4/composer.lock
183+
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
184+
samples/server/petstore/php-ze-ph/composer.lock
185+
176186
# ts
177187
samples/client/petstore/typescript-angular2/npm/npm-debug.log
178188
samples/client/petstore/typescript-node/npm/npm-debug.log
179189
samples/client/petstore/typescript-angular/tsd-debug.log
190+
samples/client/petstore/typescript-axios/tests/**/dist/
180191
samples/client/petstore/typescript-fetch/tests/**/dist/
181192

182193
# aspnetcore
@@ -230,7 +241,8 @@ samples/client/petstore/dart/petstore/test/packages
230241
**/.dart_tool
231242

232243
# JS
233-
samples/client/petstore/javascript/package-lock.json
244+
samples/client/petstore/javascript-es6/package-lock.json
245+
samples/client/petstore/javascript-promise-es6/package-lock.json
234246

235247
# elm
236248
samples/client/petstore/elm/index.html

.hub.cli.dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
##
44
## You can build _just_ this part with:
55
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
6-
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
7-
8-
RUN set -x && \
9-
apk add --no-cache bash
6+
FROM maven:3.6.3-jdk-11-openj9 as builder
107

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

2320
ENV GEN_DIR /opt/openapi-generator
2421

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

2824
WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target

.hub.online.dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
##
44
## You can build _just_ this part with:
55
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
6-
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
7-
8-
RUN set -x && \
9-
apk add --no-cache bash
6+
FROM maven:3.6.3-jdk-11-openj9 as builder
107

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

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

2219
ENV GEN_DIR /opt/openapi-generator
2320
ENV TARGET_DIR /generator

0 commit comments

Comments
 (0)