Skip to content

Commit 72360f8

Browse files
authored
Merge branch 'OpenAPITools:master' into master
2 parents f7148e9 + bd8efe2 commit 72360f8

File tree

2,840 files changed

+73998
-22378
lines changed

Some content is hidden

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

2,840 files changed

+73998
-22378
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
These must match the expectations made by your contribution.
1717
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*`.
1818
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
19-
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `5.1.x`, `6.0.x`
19+
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `5.3.x`, `6.0.x`
2020
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.

.github/workflows/check-supported-versions.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}
5151

5252
- name: Upload Maven build artifact
53-
uses: actions/upload-artifact@v2.2.3
53+
uses: actions/upload-artifact@v2.2.4
5454
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
5555
with:
5656
name: artifact
@@ -81,7 +81,7 @@ jobs:
8181
- name: Check out code
8282
uses: actions/checkout@v2
8383
- name: Download build artifact
84-
uses: actions/download-artifact@v2.0.9
84+
uses: actions/download-artifact@v2.0.10
8585
with:
8686
name: artifact
8787
- name: Run Ensures Script
@@ -90,6 +90,6 @@ jobs:
9090
git config --global core.fileMode false
9191
git config --global core.safecrlf false
9292
git config --global core.autocrlf true
93-
mkdir -p modules/openapi-generator-cli/target/
94-
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
95-
./bin/utils/ensure-up-to-date ${{ matrix.flags }}
93+
mvn clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
94+
# test with java (jersey2) client generation only as ensure-uptodate script is run in another job instead
95+
./bin/generate-samples.sh ./bin/configs/java-jersey2-8.yaml

.github/workflows/docker-tag-latest-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# This action will "unshallow" so we have all tag info
2020
- name: Get latest tag
2121
id: tagger
22-
uses: jimschubert/query-tag-action@v1
22+
uses: jimschubert/query-tag-action@v2
2323
with:
2424
include: 'v*'
2525
exclude: '*-rc*'

.github/workflows/openapi-generator.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
3939
- run: ls -la modules/openapi-generator-cli/target
4040
- name: Upload openapi-generator-cli.jar artifact
41-
uses: actions/upload-artifact@v2
41+
uses: actions/upload-artifact@v2.2.4
4242
with:
4343
name: openapi-generator-cli.jar
4444
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
@@ -73,7 +73,7 @@ jobs:
7373
run: mvn --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error
7474
- name: Publish unit test reports
7575
if: ${{ always() }}
76-
uses: actions/upload-artifact@v2
76+
uses: actions/upload-artifact@v2.2.4
7777
with:
7878
name: surefire-test-results
7979
path: '**/surefire-reports/TEST-*.xml'
@@ -90,7 +90,7 @@ jobs:
9090
with:
9191
java-version: 8
9292
- name: Download openapi-generator-cli.jar artifact
93-
uses: actions/download-artifact@v2.0.9
93+
uses: actions/download-artifact@v2.0.10
9494
with:
9595
name: openapi-generator-cli.jar
9696
path: modules/openapi-generator-cli/target
@@ -128,7 +128,7 @@ jobs:
128128
with:
129129
java-version: 8
130130
- name: Download openapi-generator-cli.jar artifact
131-
uses: actions/download-artifact@v2.0.9
131+
uses: actions/download-artifact@v2.0.10
132132
with:
133133
name: openapi-generator-cli.jar
134134
path: modules/openapi-generator-cli/target

CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,10 @@ To add test cases (optional) covering the change in the code generator, please r
8888

8989
To test the templates, please perform the following:
9090

91-
- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh .
92-
/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
93-
- During development it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
91+
- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh ./bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
92+
- During development, it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
9493
- Run the tests in the sample folder using maven `mvn integration-test -f /path/to/pom.xml`, e.g. `mvn integration-test -f samples/client/petstore/python/pom.xml`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
95-
- Finally, git commit the updated samples files: `git commit -a`
96-
(`git add -A` if added files with new test cases)
94+
- Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases)
9795
- For new test cases, please add to the [Fake Petstore spec](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml)
9896

9997
To start the CI tests, you can:

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@
99

1010
<div align="center">
1111

12-
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.2.0`):
12+
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.2.1`):
1313
[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.com/OpenAPITools/openapi-generator)
1414
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
1515
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
1616
[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator)
1717
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
1818
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/openapitools/openapi-generator/Check%20Supported%20Java%20Versions/master?label=Check%20Supported%20Java%20Versions&logo=github&logoColor=green)](https://github.com/OpenAPITools/openapi-generator/actions?query=workflow%3A%22Check+Supported+Java+Versions%22)
1919

20+
21+
[5.3.x](https://github.com/OpenAPITools/openapi-generator/tree/5.3.x) (`5.3.x`):
22+
[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/5.3.x.svg?label=Integration%20Test)](https://travis-ci.com/OpenAPITools/openapi-generator)
23+
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/5.3.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
24+
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=5.3.x&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
25+
[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/5.3.x)](https://cloud.drone.io/OpenAPITools/openapi-generator)
26+
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/5.3.x?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
27+
2028
[6.0.x](https://github.com/OpenAPITools/openapi-generator/tree/6.0.x) (`6.0.x`):
2129
[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/6.0.x.svg?label=Integration%20Test)](https://travis-ci.com/OpenAPITools/openapi-generator)
2230
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator/tree/6.0.x.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
@@ -110,8 +118,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
110118
| OpenAPI Generator Version | Release Date | Notes |
111119
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
112120
| 6.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/) | Nov/Dec 2021 | Minor release with breaking changes (no fallback) |
113-
| 5.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.2.0-SNAPSHOT/) | Jun/Jul 2021 | Minor release with breaking changes (with fallback) |
114-
| [5.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.1.1) (latest stable release) | 07.05.2021 | Patch release (enhancements, bug fixes, etc) |
121+
| 5.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.3.0-SNAPSHOT/) | Aug/Sep 2021 | Minor release with breaking changes (with fallback) |
122+
| 5.2.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.2.1-SNAPSHOT/) | 09.08.2021 | Patch release (enhancements, bug fixes, etc) |
123+
| [5.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.2.0) (latest stable release) | 09.07.2021 | Minor release with breaking changes (with fallback) |
115124
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
116125

117126
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
@@ -168,16 +177,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
168177
<!-- RELEASE_VERSION -->
169178
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
170179

171-
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar`
180+
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar`
172181

173182
For **Mac/Linux** users:
174183
```sh
175-
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar -O openapi-generator-cli.jar
184+
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar -O openapi-generator-cli.jar
176185
```
177186

178187
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
179188
```
180-
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar
189+
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar
181190
```
182191

183192
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -402,7 +411,7 @@ openapi-generator-cli version
402411
To use a specific version of "openapi-generator-cli"
403412

404413
```sh
405-
openapi-generator-cli version-manager set 5.1.1
414+
openapi-generator-cli version-manager set 5.2.0
406415
```
407416

408417
Or install it as dev-dependency:
@@ -426,7 +435,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
426435
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
427436

428437
<!-- RELEASE_VERSION -->
429-
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar)
438+
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar)
430439
<!-- /RELEASE_VERSION -->
431440

432441
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -817,6 +826,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
817826
- 2021-04-27 - [From zero to publishing PowerShell API clients in PowerShell Gallery within minutes](https://speakerdeck.com/wing328/from-zero-to-publishing-powershell-api-clients-in-powershell-gallery-within-minutes) by [William Cheng](https://github.com/wing328) at [PowerShell + DevOps Global Summit 2021](https://events.devopscollective.org/event/powershell-devops-global-summit-2021/)
818827
- 2021-05-31 - [FlutterでOpen Api Generator(Swagger)を使う](https://aakira.app/blog/2021/05/flutter-open-api/) by [AAkira](https://twitter.com/_a_akira)
819828
- 2021-06-22 - [Rest API Documentation and Client Generation With OpenAPI](https://dzone.com/articles/rest-api-documentation-and-client-generation-with) by [Prasanth Gullapalli](https://dzone.com/users/1011797/prasanthnath.g@gmail.com.html)
829+
- 2021-07-16 - [銀行事業のサーバーサイド開発について / LINE 京都開発室 エンジニア採用説明会](https://www.youtube.com/watch?v=YrrKQHxLPpQ) by 野田誠人, Robert Mitchell
820830

821831
## [6 - About Us](#table-of-contents)
822832

@@ -1020,7 +1030,7 @@ If you want to join the committee, please kindly apply by sending an email to te
10201030
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
10211031
| C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) |
10221032
| Clojure | |
1023-
| Dart | @swipesight (2018/09) @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) |
1033+
| Dart | @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) |
10241034
| Eiffel | @jvelilla (2017/09) |
10251035
| Elixir | @mrmstn (2018/12) |
10261036
| Elm | @eriktim (2018/09) |

bin/configs/csharp-OpenAPIClient.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
generatorName: csharp
22
outputDir: samples/client/petstore/csharp/OpenAPIClient
33
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/csharp
45
additionalProperties:
56
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'

bin/configs/go-server-required.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
generatorName: go-server
2+
outputDir: samples/server/petstore/go-server-required
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/server-required.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/go-server
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"
7+
packageName: petstoreserver
8+
addResponseHeaders: true
9+
router: "chi"

bin/configs/java-feign.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
generatorName: java
22
outputDir: samples/client/petstore/java/feign
33
library: feign
4-
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
55
templateDir: modules/openapi-generator/src/main/resources/Java
66
additionalProperties:
77
booleanGetterPrefix: is

bin/configs/java-jersey2-8-oas2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ generatorName: java
22
outputDir: samples/client/petstore/java/jersey2-java8
33
library: jersey2
44
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
56
additionalProperties:
67
artifactId: petstore-jersey2-java8
78
hideGenerationTimestamp: true

0 commit comments

Comments
 (0)