forked from loafle/openapi-generator-original
Compare commits
211 Commits
additonal-
...
v7.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2a62ace74 | ||
|
|
c9f7af752f | ||
|
|
ec3c484ce9 | ||
|
|
7e529926a6 | ||
|
|
2f655f1a9c | ||
|
|
5693eee4e0 | ||
|
|
f83e4ffb9b | ||
|
|
c377fdf62d | ||
|
|
372894dd1d | ||
|
|
6917aad760 | ||
|
|
2b9ee8c5f6 | ||
|
|
40b1d37368 | ||
|
|
09060c6c22 | ||
|
|
279a92c2ed | ||
|
|
c48cddd640 | ||
|
|
92daacd6a2 | ||
|
|
f35b132068 | ||
|
|
ced31f49b3 | ||
|
|
166ebc50b0 | ||
|
|
291ce353ce | ||
|
|
e9507077fc | ||
|
|
ced9660123 | ||
|
|
d945499073 | ||
|
|
74163f0ac8 | ||
|
|
ba8546189a | ||
|
|
c301004b7e | ||
|
|
a31b38b223 | ||
|
|
849cf88ba7 | ||
|
|
8e98671ba6 | ||
|
|
65ccf0492c | ||
|
|
0673897746 | ||
|
|
74363a3eb8 | ||
|
|
49208144e1 | ||
|
|
339596aeec | ||
|
|
588e2598f6 | ||
|
|
a853adb4b0 | ||
|
|
de8599906e | ||
|
|
db9fd9a094 | ||
|
|
5d03c4ac82 | ||
|
|
482c759a10 | ||
|
|
5e8e301869 | ||
|
|
f83cb60f27 | ||
|
|
61629ae8ed | ||
|
|
c4b18f206d | ||
|
|
171cc67caa | ||
|
|
fe547dd0b5 | ||
|
|
1092593841 | ||
|
|
7b8a515dcb | ||
|
|
39347ec37b | ||
|
|
e4cfd626c8 | ||
|
|
fbbfa12096 | ||
|
|
832947c895 | ||
|
|
5c5ec36500 | ||
|
|
83822d269a | ||
|
|
6425fbe3ed | ||
|
|
4402635d49 | ||
|
|
4302d37f52 | ||
|
|
a4267ee630 | ||
|
|
8893c7136a | ||
|
|
8d76ab9511 | ||
|
|
c2a4163bdb | ||
|
|
739390a682 | ||
|
|
bfe6157d07 | ||
|
|
6cd73eba2b | ||
|
|
08d518319e | ||
|
|
8827da8012 | ||
|
|
3422ef1e64 | ||
|
|
c1c6237eec | ||
|
|
5a5ee163dc | ||
|
|
677b6e64c1 | ||
|
|
244a3b4c13 | ||
|
|
05b796aadc | ||
|
|
58f058f3e9 | ||
|
|
d671b83a5f | ||
|
|
fbd02554f5 | ||
|
|
eb5b781e20 | ||
|
|
eae2051d37 | ||
|
|
b13a1a05ef | ||
|
|
091cff60c3 | ||
|
|
0aff1a6504 | ||
|
|
cb85358aa5 | ||
|
|
cdbb73aa55 | ||
|
|
ae590c4712 | ||
|
|
f16744a2bb | ||
|
|
bf9fae641e | ||
|
|
5f71bb9afa | ||
|
|
7347daec61 | ||
|
|
77687a8ea5 | ||
|
|
d6421411c9 | ||
|
|
8feef52d6b | ||
|
|
e0738a6e42 | ||
|
|
1dd9590064 | ||
|
|
d1fa38e286 | ||
|
|
2f214ee6c6 | ||
|
|
8bb473316e | ||
|
|
b6db4f73f1 | ||
|
|
438bf25a47 | ||
|
|
769990d654 | ||
|
|
694f5a05a1 | ||
|
|
c5d6884c63 | ||
|
|
8db9af9873 | ||
|
|
1fc0cec75f | ||
|
|
b4f9d8103f | ||
|
|
3bc4f67333 | ||
|
|
571aefa3da | ||
|
|
ba367e60e8 | ||
|
|
75ce5968bf | ||
|
|
1dfdeaff59 | ||
|
|
34265e52b1 | ||
|
|
2cfce7cd2d | ||
|
|
e3958cba75 | ||
|
|
fe55938363 | ||
|
|
015f000f70 | ||
|
|
384ff941ae | ||
|
|
2b6b3b0883 | ||
|
|
bbf9ccd0c0 | ||
|
|
f180aa0eec | ||
|
|
7af459396c | ||
|
|
1bbbb73690 | ||
|
|
f03cbea971 | ||
|
|
9e07f85eb5 | ||
|
|
7bb75f4bb4 | ||
|
|
87f9d53c3a | ||
|
|
494ee489ad | ||
|
|
594308f821 | ||
|
|
4a17c22905 | ||
|
|
3e9dba01ee | ||
|
|
23c5db602f | ||
|
|
e3db882ed4 | ||
|
|
48f454cf72 | ||
|
|
5fb6fcf9ef | ||
|
|
f5680019b2 | ||
|
|
893154d766 | ||
|
|
050e463872 | ||
|
|
effbe8caad | ||
|
|
6722f1300d | ||
|
|
c306ca3cf2 | ||
|
|
822568b664 | ||
|
|
4a0ab21ba4 | ||
|
|
a1d00e4785 | ||
|
|
7087b332f0 | ||
|
|
f5f9a7e091 | ||
|
|
11771a8ccf | ||
|
|
4075a52dce | ||
|
|
baf33f0537 | ||
|
|
9fd4cc1e63 | ||
|
|
97ee910a2c | ||
|
|
cec5b8965a | ||
|
|
bd1caf69cb | ||
|
|
ee5d9f6ad3 | ||
|
|
2eca00f87d | ||
|
|
039c1698b0 | ||
|
|
03781d3a93 | ||
|
|
56bc383dc1 | ||
|
|
ce4b2fe7bd | ||
|
|
3fcf5584c6 | ||
|
|
c6e9a4e1ae | ||
|
|
e2f249ba35 | ||
|
|
67b129fda9 | ||
|
|
3c4561ece2 | ||
|
|
04fa53b692 | ||
|
|
af352df10f | ||
|
|
bb3096c99c | ||
|
|
beb67aa74d | ||
|
|
4f8d61c05c | ||
|
|
fdd179e60a | ||
|
|
fce2dcbb37 | ||
|
|
6c1a937663 | ||
|
|
1cff462d90 | ||
|
|
077744a7af | ||
|
|
3b95f701e5 | ||
|
|
d58e68f8c0 | ||
|
|
d165b8879f | ||
|
|
7d60a46bc7 | ||
|
|
e892d50075 | ||
|
|
2ca99bdf8e | ||
|
|
f99002a974 | ||
|
|
19d8dbc7d5 | ||
|
|
7d154c988c | ||
|
|
a68eba649f | ||
|
|
55c580579e | ||
|
|
0f2a27d3c5 | ||
|
|
1a4b574a48 | ||
|
|
e5a29b6328 | ||
|
|
29033bf62a | ||
|
|
1bcf79236f | ||
|
|
8f8fd85fd6 | ||
|
|
254b359a56 | ||
|
|
9b39887eba | ||
|
|
16c6cff28f | ||
|
|
25b67dd6bf | ||
|
|
f530496f21 | ||
|
|
a2f6b8eae5 | ||
|
|
69bc994ba7 | ||
|
|
df994b77f2 | ||
|
|
bab67e44e4 | ||
|
|
5e8e2d7f6d | ||
|
|
5b720ded0c | ||
|
|
875c3ecd3c | ||
|
|
352182a7b9 | ||
|
|
8c8be7482b | ||
|
|
7d86adccc4 | ||
|
|
5f0d7053e4 | ||
|
|
70bffffc5a | ||
|
|
4b87606665 | ||
|
|
d671fe24ee | ||
|
|
e75e5a2c57 | ||
|
|
ec59334904 | ||
|
|
82e3590eed | ||
|
|
353507ef23 | ||
|
|
9170e1030f |
@@ -57,54 +57,43 @@ commands: # a reusable command with parameters
|
||||
- run: docker ps -a
|
||||
- run: sleep 30
|
||||
- run: cat /etc/hosts
|
||||
# Test
|
||||
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
|
||||
- run:
|
||||
name: "Setup custom environment variables"
|
||||
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
|
||||
- run: ./CI/circle_parallel.sh
|
||||
# Save dependency cache
|
||||
- save_cache:
|
||||
key: source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
paths:
|
||||
# This is a broad list of cache paths to include many possible development environments
|
||||
# You can probably delete some of these entries
|
||||
- vendor/bundle
|
||||
- ~/.nvm
|
||||
- ~/.pyenv
|
||||
- ~/virtualenvs
|
||||
- ~/.m2
|
||||
- ~/.ivy2
|
||||
- ~/.sbt
|
||||
- ~/.bundle
|
||||
- ~/.go_workspace
|
||||
- ~/.gradle
|
||||
- ~/.cache/bower
|
||||
- ".git"
|
||||
- ~/.stack
|
||||
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
|
||||
- ~/R
|
||||
# save "default" cache using the key "source-v2-"
|
||||
- save_cache:
|
||||
key: source-v2-
|
||||
paths:
|
||||
# This is a broad list of cache paths to include many possible development environments
|
||||
# You can probably delete some of these entries
|
||||
- vendor/bundle
|
||||
- ~/.nvm
|
||||
- ~/.pyenv
|
||||
- ~/virtualenvs
|
||||
- ~/.m2
|
||||
- ~/.ivy2
|
||||
- ~/.sbt
|
||||
- ~/.bundle
|
||||
- ~/.go_workspace
|
||||
- ~/.gradle
|
||||
- ~/.cache/bower
|
||||
- ".git"
|
||||
- ~/.stack
|
||||
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
|
||||
- ~/R
|
||||
#- save_cache:
|
||||
# key: source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
# paths:
|
||||
# # This is a broad list of cache paths to include many possible development environments
|
||||
# # You can probably delete some of these entries
|
||||
# - ~/.m2
|
||||
# - ~/.ivy2
|
||||
# - ~/.sbt
|
||||
# - ~/.bundle
|
||||
# - ~/.go_workspace
|
||||
# - ~/.gradle
|
||||
# - ".git"
|
||||
# - ~/.stack
|
||||
# - ~/R
|
||||
## save "default" cache using the key "source-v2-"
|
||||
#- save_cache:
|
||||
# key: source-v2-
|
||||
# paths:
|
||||
# # This is a broad list of cache paths to include many possible development environments
|
||||
# # You can probably delete some of these entries
|
||||
# - vendor/bundle
|
||||
# - ~/.m2
|
||||
# - ~/.ivy2
|
||||
# - ~/.sbt
|
||||
# - ~/.bundle
|
||||
# - ~/.go_workspace
|
||||
# - ~/.gradle
|
||||
# - ~/.cache/bower
|
||||
# - ".git"
|
||||
# - ~/.stack
|
||||
# - ~/R
|
||||
# Teardown
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
# Save test results
|
||||
|
||||
18
.github/.test/samples.json
vendored
18
.github/.test/samples.json
vendored
@@ -319,12 +319,6 @@
|
||||
"Client: Java"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "java-petstore-jersey1.sh",
|
||||
"matches": [
|
||||
"Client: Java"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "java-petstore-jersey2-java6.sh",
|
||||
"matches": [
|
||||
@@ -584,18 +578,6 @@
|
||||
"Server: Java"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "jaxrs-jersey1-petstore-server.sh",
|
||||
"matches": [
|
||||
"Server: Java"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "jaxrs-jersey1-usetags-petstore-server.sh",
|
||||
"matches": [
|
||||
"Server: Java"
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "jaxrs-petstore-server-datelib-j8.sh",
|
||||
"matches": [
|
||||
|
||||
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -8,18 +8,14 @@
|
||||
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
|
||||
```
|
||||
./mvnw clean package
|
||||
./bin/generate-samples.sh
|
||||
./bin/generate-samples.sh ./bin/configs/*.yaml
|
||||
./bin/utils/export_docs_generators.sh
|
||||
```
|
||||
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
|
||||
Commit all changed files.
|
||||
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/).
|
||||
- [ ] In case you are adding a new generator, run the following additional script :
|
||||
```
|
||||
./bin/utils/ensure-up-to-date
|
||||
```
|
||||
Commit all changed files.
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (7.0.1 - patch release), `7.1.x` (minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
|
||||
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.1.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
|
||||
- [ ] 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.
|
||||
|
||||
4
.github/workflows/linux.yaml
vendored
4
.github/workflows/linux.yaml
vendored
@@ -45,7 +45,7 @@ jobs:
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Setup Maven
|
||||
uses: s4u/setup-maven-action@v1.9.0
|
||||
uses: s4u/setup-maven-action@v1.10.0
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
maven-version: 3.8.8
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Maven
|
||||
uses: s4u/setup-maven-action@v1.9.0
|
||||
uses: s4u/setup-maven-action@v1.10.0
|
||||
with:
|
||||
java-version: 11
|
||||
maven-version: 3.8.8
|
||||
|
||||
2
.github/workflows/samples-cpp-qt-client.yaml
vendored
2
.github/workflows/samples-cpp-qt-client.yaml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: jurplel/install-qt-action@v3
|
||||
- uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: ${{ matrix.qt-version }}
|
||||
tools: ${{ matrix.tools }}
|
||||
|
||||
@@ -28,4 +28,6 @@ jobs:
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
run: |
|
||||
dotnet build Org.OpenAPITools.sln
|
||||
dotnet test Org.OpenAPITools.sln
|
||||
|
||||
32
.github/workflows/samples-go-client-echo-api.yaml
vendored
Normal file
32
.github/workflows/samples-go-client-echo-api.yaml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Go Client (Echo API)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/go/**
|
||||
- .github/workflows/samples-go-client-echo-api.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test Go client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/go
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "stable"
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- run: go version
|
||||
- name: Run test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: go test -mod=mod -v
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
|
||||
11
.github/workflows/samples-java-client-jdk11.yaml
vendored
11
.github/workflows/samples-java-client-jdk11.yaml
vendored
@@ -10,6 +10,9 @@ on:
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
|
||||
- samples/openapi3/client/petstore/java/native**
|
||||
- samples/client/others/java/okhttp-gson-oneOf/**
|
||||
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
|
||||
- samples/client/others/java/webclient-useAbstractionForFiles/**
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/java/**'
|
||||
@@ -19,6 +22,9 @@ on:
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
|
||||
- samples/openapi3/client/petstore/java/native**
|
||||
- samples/client/others/java/okhttp-gson-oneOf/**
|
||||
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
|
||||
- samples/client/others/java/webclient-useAbstractionForFiles/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Client JDK11
|
||||
@@ -52,7 +58,7 @@ jobs:
|
||||
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
|
||||
- samples/client/petstore/java/apache-httpclient
|
||||
- samples/client/petstore/java/feign
|
||||
- samples/client/petstore/java/jersey1
|
||||
- samples/client/petstore/java/okhttp-gson-awsv4signature
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
|
||||
- samples/openapi3/client/petstore/java/native
|
||||
- samples/client/petstore/java/okhttp-gson-swagger1/
|
||||
@@ -61,6 +67,9 @@ jobs:
|
||||
- samples/client/petstore/java/okhttp-gson-swagger2/
|
||||
- samples/client/petstore/java/resttemplate-swagger2/
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/
|
||||
- samples/client/others/java/okhttp-gson-oneOf/
|
||||
- samples/client/others/java/resttemplate-useAbstractionForFiles/
|
||||
- samples/client/others/java/webclient-useAbstractionForFiles/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v3
|
||||
|
||||
@@ -8,6 +8,7 @@ on:
|
||||
- 'samples/server/petstore/java-vertx-web/**'
|
||||
- 'samples/server/petstore/java-inflector/**'
|
||||
- 'samples/server/petstore/java-pkmst/**'
|
||||
# test in circleci instead
|
||||
- 'samples/server/petstore/java-undertow/**'
|
||||
pull_request:
|
||||
paths:
|
||||
@@ -15,7 +16,7 @@ on:
|
||||
- 'samples/server/petstore/java-vertx-web/**'
|
||||
- 'samples/server/petstore/java-inflector/**'
|
||||
- 'samples/server/petstore/java-pkmst/**'
|
||||
- 'samples/server/petstore/java-undertow/**'
|
||||
#- 'samples/server/petstore/java-undertow/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Server
|
||||
@@ -29,7 +30,7 @@ jobs:
|
||||
- samples/server/petstore/java-vertx-web/
|
||||
- samples/server/petstore/java-inflector/
|
||||
- samples/server/petstore/java-pkmst/
|
||||
- samples/server/petstore/java-undertow/
|
||||
#- samples/server/petstore/java-undertow/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v3
|
||||
|
||||
36
.github/workflows/samples-jaxrs-jdk11.yaml
vendored
Normal file
36
.github/workflows/samples-jaxrs-jdk11.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Samples JAX-RS (JDK11)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/jaxrs/jersey3/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/jaxrs/jersey3/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build JAX-RS
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/jaxrs/jersey3
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package
|
||||
2
.github/workflows/samples-jaxrs.yaml
vendored
2
.github/workflows/samples-jaxrs.yaml
vendored
@@ -26,8 +26,6 @@ jobs:
|
||||
- samples/server/petstore/jaxrs-spec
|
||||
- samples/server/petstore/jaxrs-spec-interface
|
||||
- samples/server/petstore/jaxrs-spec-interface-response
|
||||
- samples/server/petstore/jaxrs/jersey1
|
||||
- samples/server/petstore/jaxrs/jersey1-useTags
|
||||
- samples/server/petstore/jaxrs-datelib-j8
|
||||
- samples/server/petstore/jaxrs-resteasy/default
|
||||
- samples/server/petstore/jaxrs-resteasy/eap
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
name: Python Client (Echo API)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/python/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/python/**
|
||||
- .github/workflows/samples-python-client-echo-api.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
@@ -17,13 +15,20 @@ jobs:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/python
|
||||
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true
|
||||
python-version:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.7'
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
@@ -33,6 +38,7 @@ jobs:
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install -r test-requirements.txt
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: python -m pytest
|
||||
59
.github/workflows/samples-python-petstore.yaml
vendored
Normal file
59
.github/workflows/samples-python-petstore.yaml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
name: "Python Client: Petstore"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/openapi3/client/petstore/python-aiohttp/**
|
||||
- samples/openapi3/client/petstore/python/**
|
||||
- .github/workflows/samples-python-petstore.yaml
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
sample:
|
||||
- samples/openapi3/client/petstore/python-aiohttp
|
||||
- samples/openapi3/client/petstore/python
|
||||
services:
|
||||
petstore-api:
|
||||
image: swaggerapi/petstore
|
||||
ports:
|
||||
- 80:8080
|
||||
env:
|
||||
SWAGGER_HOST: http://petstore.swagger.io
|
||||
SWAGGER_BASE_PATH: /v2
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
id: py
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
|
||||
path: |
|
||||
~/.cache/pypoetry/virtualenvs/
|
||||
~/.local/pipx/venvs/poetry/
|
||||
.mypy_cache/
|
||||
|
||||
- name: Install poetry
|
||||
run: pipx install --python '${{ steps.py.outputs.python-path }}' poetry
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry install
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry run pytest -v
|
||||
44
.github/workflows/samples-python-pydantic-v1-client-echo-api.yaml
vendored
Normal file
44
.github/workflows/samples-python-pydantic-v1-client-echo-api.yaml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Python Client pydantic v1 (Echo API)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/python-pydantic-v1/**
|
||||
- .github/workflows/samples-python-pydantic-v1-client-echo-api.yaml
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/python-pydantic-v1/
|
||||
python-version:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install -r test-requirements.txt
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: python -m pytest
|
||||
59
.github/workflows/samples-python-pydantic-v1-petstore.yaml
vendored
Normal file
59
.github/workflows/samples-python-pydantic-v1-petstore.yaml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
name: "Python Client pydantic v1: Petstore"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/**
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1/**
|
||||
- .github/workflows/samples-python-pydantic-v1-petstore.yaml
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
sample:
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1
|
||||
services:
|
||||
petstore-api:
|
||||
image: swaggerapi/petstore
|
||||
ports:
|
||||
- 80:8080
|
||||
env:
|
||||
SWAGGER_HOST: http://petstore.swagger.io
|
||||
SWAGGER_BASE_PATH: /v2
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
id: py
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
|
||||
path: |
|
||||
~/.cache/pypoetry/virtualenvs/
|
||||
~/.local/pipx/venvs/poetry/
|
||||
.mypy_cache/
|
||||
|
||||
- name: Install poetry
|
||||
run: pipx install --python '${{ steps.py.outputs.python-path }}' poetry
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry install
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry run pytest -v
|
||||
1
.github/workflows/samples-spring.yaml
vendored
1
.github/workflows/samples-spring.yaml
vendored
@@ -55,6 +55,7 @@ jobs:
|
||||
- samples/server/petstore/springboot-spring-pageable-delegatePattern
|
||||
- samples/server/petstore/springboot-spring-pageable-without-j8
|
||||
- samples/server/petstore/springboot-spring-pageable
|
||||
- samples/server/petstore/springboot-spring-provide-args
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v3
|
||||
|
||||
42
.github/workflows/samples-typescript-axios-echo-api.yaml
vendored
Normal file
42
.github/workflows/samples-typescript-axios-echo-api.yaml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: TypeScript Axios Client (Echo API)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/typescript-axios/**
|
||||
- .github/workflows/samples-typescript-axios-echo-api.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test TypeScript Axios client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/typescript-axios/test
|
||||
node-version:
|
||||
- 16
|
||||
- 18
|
||||
- 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
npm run preinstall
|
||||
npm i
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: npm test
|
||||
2
.github/workflows/samples-zapier.yaml
vendored
2
.github/workflows/samples-zapier.yaml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
- name: Install dependencies
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
|
||||
2
.github/workflows/windows.yaml
vendored
2
.github/workflows/windows.yaml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
- name: Setup Maven
|
||||
uses: s4u/setup-maven-action@v1.9.0
|
||||
uses: s4u/setup-maven-action@v1.10.0
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
maven-version: 3.8.8
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -90,7 +90,6 @@ samples/client/petstore/cpp-restsdk/cmake_install.cmake
|
||||
samples/client/petstore/java/hello.txt
|
||||
samples/client/petstore/java/okhttp-gson/hello.txt
|
||||
samples/client/petstore/java/okhttp-gson-3.1/hello.txt
|
||||
samples/client/petstore/java/jersey1/hello.txt
|
||||
samples/client/petstore/java/jersey2-java8/hello.txt
|
||||
samples/client/petstore/java/jersey2/hello.txt
|
||||
samples/client/petstore/android/default/hello.txt
|
||||
@@ -272,6 +271,7 @@ samples/client/petstore/c/*.so
|
||||
# Ruby
|
||||
samples/openapi3/client/petstore/ruby/Gemfile.lock
|
||||
samples/openapi3/client/petstore/ruby-faraday/Gemfile.lock
|
||||
samples/openapi3/client/petstore/ruby-httpx/Gemfile.lock
|
||||
|
||||
# Crystal
|
||||
samples/client/petstore/crystal/lib
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.8
|
||||
11
|
||||
|
||||
@@ -10,10 +10,13 @@ set -e
|
||||
export NODE_ENV=test
|
||||
|
||||
if [ "$NODE_INDEX" = "1" ]; then
|
||||
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
|
||||
echo "Running node $NODE_INDEX ..."
|
||||
java -version
|
||||
|
||||
./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
(cd samples/client/petstore/ruby && mvn integration-test)
|
||||
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
|
||||
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
|
||||
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
|
||||
|
||||
elif [ "$NODE_INDEX" = "2" ]; then
|
||||
echo "Running node $NODE_INDEX to test Go"
|
||||
@@ -33,20 +36,14 @@ elif [ "$NODE_INDEX" = "2" ]; then
|
||||
export PATH="/usr/local/go1.18/go/bin:$PATH"
|
||||
go version
|
||||
|
||||
# run integration tests
|
||||
./mvnw --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
# run go integration tests
|
||||
(cd samples/client/petstore/go && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/go && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false && mvn integration-test)
|
||||
|
||||
elif [ "$NODE_INDEX" = "3" ]; then
|
||||
|
||||
echo "Running node $NODE_INDEX to test 'samples.circleci.node3' defined in pom.xml ..."
|
||||
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
|
||||
#tar -xf Python-3.8.9.tgz
|
||||
#cd Python-3.8.9
|
||||
#./configure --enable-optimizations
|
||||
#sudo make altinstall
|
||||
pyenv install --list
|
||||
pyenv install 3.7.12
|
||||
#pyenv install 2.7.14 #python2 no longer supported
|
||||
pyenv global 3.7.12
|
||||
echo "Running node $NODE_INDEX ... "
|
||||
|
||||
# Install node@stable (for angular 6)
|
||||
set +e
|
||||
@@ -63,23 +60,71 @@ elif [ "$NODE_INDEX" = "3" ]; then
|
||||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
|
||||
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
|
||||
|
||||
./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
(cd samples/client/others/typescript-angular && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/tests/jquery && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/builds/object_params && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/tests/object_params && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/builds/inversify && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/tests/inversify && mvn integration-test)
|
||||
#(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-fetch/tests/default && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-node/npm && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
|
||||
(cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
|
||||
(cd samples/client/petstore/javascript-flowtyped && mvn integration-test)
|
||||
(cd samples/client/petstore/javascript-es6 && mvn integration-test)
|
||||
(cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)
|
||||
|
||||
elif [ "$NODE_INDEX" = "4" ]; then
|
||||
echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..."
|
||||
echo "Running node $NODE_INDEX ..."
|
||||
|
||||
#mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
#(cd samples/openapi3/client/petstore/python && make test)
|
||||
# comment out due to ModuleNotFoundError: No module named 'urllib3.request'
|
||||
#(cd samples/openapi3/client/petstore/python-prior && make test)
|
||||
#(cd samples/openapi3/client/3_0_3_unit_test/python && make test)
|
||||
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
|
||||
#tar -xf Python-3.8.9.tgz
|
||||
#cd Python-3.8.9
|
||||
#./configure --enable-optimizations
|
||||
#sudo make altinstall
|
||||
pyenv install --list
|
||||
pyenv install 3.7.12
|
||||
#pyenv install 2.7.14 #python2 no longer supported
|
||||
pyenv global 3.7.12
|
||||
|
||||
(cd samples/openapi3/client/petstore/python && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/python-pydantic-v1 && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/python-aiohttp && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/python-pydantic-v1-aiohttp && mvn integration-test)
|
||||
|
||||
else
|
||||
echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..."
|
||||
echo "Running node $NODE_INDEX ..."
|
||||
java -version
|
||||
|
||||
./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.others -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
./mvnw --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
(cd samples/client/petstore/scala-akka && mvn integration-test)
|
||||
(cd samples/client/petstore/scala-sttp && mvn integration-test)
|
||||
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
|
||||
(cd samples/client/petstore/clojure && mvn integration-test)
|
||||
(cd samples/client/petstore/java/jersey2-java8 && mvn integration-test)
|
||||
(cd samples/openapi3/client/petstore/java/jersey2-java8 && mvn integration-test)
|
||||
(cd samples/client/petstore/java/jersey3 && mvn integration-test)
|
||||
(cd samples/client/others/java/okhttp-gson-streaming && mvn integration-test)
|
||||
(cd samples/client/petstore/java/okhttp-gson && mvn integration-test)
|
||||
(cd samples/client/petstore/java/okhttp-gson-3.1 && mvn integration-test)
|
||||
(cd samples/client/petstore/java/resteasy && mvn integration-test)
|
||||
(cd samples/client/petstore/java-micronaut-client && mvn integration-test)
|
||||
(cd samples/client/petstore/java/apache-httpclient && mvn integration-test)
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
44
README.md
44
README.md
@@ -9,13 +9,13 @@
|
||||
[](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g)
|
||||
[](https://twitter.com/oas_generator)
|
||||
[](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator)
|
||||
[](https://conan.io/center/openapi-generator)
|
||||
[](https://ge.openapi-generator.tech/scans)
|
||||
[](https://conan.io/center/recipes/openapi-generator)
|
||||
[](https://ge.openapi-generator.tech/scans)
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.0.1`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.1.0`):
|
||||
[](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
|
||||
@@ -60,24 +60,29 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
|
||||
[<img src="https://openapi-generator.tech/img/companies/finbourne.png" width="128" height="128">](https://www.finbourne.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://openapi-generator.tech/img/companies/bumpsh.png" width="128" height="128">](https://bump.sh/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://openapi-generator.tech/img/companies/bileto.png" width="128" height="128">](https://www.bileto.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://openapi-generator.tech/img/companies/bairesdev.png" width="128" height="128">](https://www.bairesdev.com/sponsoring-open-source-projects/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://openapi-generator.tech/img/companies/dmtech.jpeg" width="128" height="128">](https://www.dm-jobs.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://openapi-generator.tech/img/companies/adyen.png" width="128" height="128">](https://adyen.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://openapi-generator.tech/img/companies/fornex.png" width="128" height="128">](https://fornex.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
|
||||
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS and Checkly for sponsoring the API monitoring
|
||||
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
|
||||
|
||||
[<img src="https://openapi-generator.tech/img/companies/godaddy.png" width="150">](https://www.godaddy.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[](https://www.linode.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRAhEYadUyZYzGUotZiSdXkVMqqLGuohyixLl4eUpUV6pAbUULL" width="150">](https://checklyhq.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
|
||||
[<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Gradle_logo.png/320px-Gradle_logo.png" width="150">](https://gradle.org?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
|
||||
## Overview
|
||||
|
||||
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
|
||||
|
||||
| | Languages/Frameworks |
|
||||
| -------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 16.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
|
||||
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 16.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
|
||||
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
|
||||
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
|
||||
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
|
||||
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
|
||||
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** |
|
||||
|
||||
## Table of contents
|
||||
|
||||
@@ -115,13 +120,13 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
| OpenAPI Generator Version | Release Date | Notes |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| 7.0.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.1-SNAPSHOT/) | 08.09.2023 | Patch release (enhancements, bug fixes, etc) |
|
||||
| [7.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.0.0) (latest stable release) | 25.08.2023 | Major release with breaking changes (no fallback) |
|
||||
| 7.1.0 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.1.0-SNAPSHOT/) | 18.10.2023 | Minor release with breaking changes (with fallback) |
|
||||
| [7.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.0.1) (latest stable release) | 18.09.2023 | Patch release (enhancements, bug fixes, etc) |
|
||||
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
|
||||
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
|
||||
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
|
||||
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0, 3.1 (beta support)
|
||||
|
||||
(We do not publish daily/nightly build. Please use SNAPSHOT instead)
|
||||
|
||||
@@ -179,16 +184,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
|
||||
<!-- RELEASE_VERSION -->
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
|
||||
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
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.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -423,7 +428,7 @@ openapi-generator-cli version
|
||||
To use a specific version of "openapi-generator-cli"
|
||||
|
||||
```sh
|
||||
openapi-generator-cli version-manager set 7.0.0
|
||||
openapi-generator-cli version-manager set 7.0.1
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -447,7 +452,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
||||
(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`)
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar)
|
||||
<!-- /RELEASE_VERSION -->
|
||||
|
||||
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
|
||||
@@ -689,6 +694,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [RedHat](https://www.redhat.com)
|
||||
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
|
||||
- [REST United](https://restunited.com)
|
||||
- [Robocorp](https://www.robocorp.com)
|
||||
- [Robotinfra](https://www.robotinfra.com)
|
||||
- [SmartHR](https://smarthr.co.jp/)
|
||||
- [Sony Interactive Entertainment](https://www.sie.com/en/index.html)
|
||||
@@ -928,12 +934,9 @@ OpenAPI Generator core team members are contributors who have been making signif
|
||||
* [@cbornet](https://github.com/cbornet) (2016/05)
|
||||
* [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini)
|
||||
* [@etherealjoy](https://github.com/etherealjoy) (2019/06)
|
||||
* [@spacether](https://github.com/spacether) (2020/05) [:heart:][spacether sponsorship]
|
||||
|
||||
:heart: = Link to support the contributor directly
|
||||
|
||||
[spacether sponsorship]: https://github.com/sponsors/spacether/
|
||||
|
||||
#### Template Creator
|
||||
|
||||
**NOTE**: Embedded templates are only supported in _Mustache_ format. Support for all other formats is experimental and subject to change at any time.
|
||||
@@ -1004,8 +1007,10 @@ Here is a list of template creators:
|
||||
* PowerShell (refactored in 5.0.0): @wing328
|
||||
* Python: @spacether [:heart:][spacether sponsorship]
|
||||
* Python-Experimental: @spacether [:heart:][spacether sponsorship]
|
||||
* Python (refactored in 7.0.0): @wing328
|
||||
* R: @ramnov
|
||||
* Ruby (Faraday): @meganemura @dkliban
|
||||
* Ruby (HTTPX): @honeyryderchuck
|
||||
* Rust: @farcaller
|
||||
* Rust (rust-server): @metaswitch
|
||||
* Scala (scalaz & http4s): @tbrown1979
|
||||
@@ -1168,7 +1173,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
|
||||
| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) |
|
||||
| PowerShell | @wing328 (2020/05) |
|
||||
| Python | @krjakbrjak (2023/02) |
|
||||
| Python | @cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10) @multani (2023/10) |
|
||||
| R | @Ramanth (2019/07) @saigiridhar21 (2019/07) |
|
||||
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
|
||||
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) |
|
||||
@@ -1261,4 +1266,3 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ install:
|
||||
- cmd: docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||
- ps: Start-Sleep -s 120
|
||||
- ps: $PSVersionTable.PSVersion
|
||||
- ps: Install-Module -Name Pester -Force -Scope CurrentUser
|
||||
- ps: Install-Module -Name Pester -Force -Scope CurrentUser -SkipPublisherCheck
|
||||
build_script:
|
||||
- dotnet --info
|
||||
# build C# aspnetcore 5.0 server
|
||||
|
||||
9
bin/configs/go-petstore-generateMarshalJSON-false.yaml
Normal file
9
bin/configs/go-petstore-generateMarshalJSON-false.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
generatorName: go
|
||||
outputDir: samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-addpet-only.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
enumClassPrefix: "true"
|
||||
packageName: petstore
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
generateMarshalJSON: false
|
||||
@@ -1,8 +0,0 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/jersey1
|
||||
library: jersey1
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
artifactId: petstore-java-client-jersey1
|
||||
7
bin/configs/java-okhttp-gson-oneOf.yaml
Normal file
7
bin/configs/java-okhttp-gson-oneOf.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/others/java/okhttp-gson-oneOf
|
||||
library: okhttp-gson
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf_twoPrimitives.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -14,3 +14,6 @@ additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
enumNameMappings:
|
||||
s: LOWER_CASE_S
|
||||
S: UPPER_CASE_S
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/others/java/resttemplate-useAbstractionForFiles
|
||||
library: resttemplate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/issue13146_file_abstraction_response.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: file-resttemplate
|
||||
hideGenerationTimestamp: "true"
|
||||
useAbstractionForFiles: true
|
||||
@@ -1,6 +1,6 @@
|
||||
generatorName: java-undertow-server
|
||||
outputDir: samples/server/petstore/java-undertow
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/java-undertow-server
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
9
bin/configs/java-webclient-useAbstractionForFiles.yaml
Normal file
9
bin/configs/java-webclient-useAbstractionForFiles.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/others/java/webclient-useAbstractionForFiles
|
||||
library: webclient
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/issue13146_file_abstraction_response.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: file-webclient
|
||||
hideGenerationTimestamp: "true"
|
||||
useAbstractionForFiles: true
|
||||
@@ -1,10 +0,0 @@
|
||||
generatorName: jaxrs-jersey
|
||||
outputDir: samples/server/petstore/jaxrs/jersey1-useTags
|
||||
library: jersey1
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS
|
||||
additionalProperties:
|
||||
artifactId: jaxrs-jersey1-useTags
|
||||
hideGenerationTimestamp: "true"
|
||||
serverPort: "8082"
|
||||
useTags: "true"
|
||||
@@ -1,9 +1,9 @@
|
||||
generatorName: jaxrs-jersey
|
||||
outputDir: samples/server/petstore/jaxrs/jersey1
|
||||
library: jersey1
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
outputDir: samples/server/petstore/jaxrs/jersey3
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS
|
||||
library: jersey3
|
||||
additionalProperties:
|
||||
artifactId: jaxrs-jersey1-server
|
||||
artifactId: jaxrs-jersey3-petstore-server
|
||||
hideGenerationTimestamp: "true"
|
||||
serverPort: "8082"
|
||||
serverPort: "8082"
|
||||
7
bin/configs/powershell-echo-api.yaml
Normal file
7
bin/configs/powershell-echo-api.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: powershell
|
||||
outputDir: samples/client/echo_api/powershell
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/powershell
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
packageGuid: a27b908d-2a20-467f-bc32-af6f3a654ac5
|
||||
@@ -0,0 +1,7 @@
|
||||
generatorName: python
|
||||
outputDir: samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
disallowAdditionalPropertiesIfNotPresent: "true"
|
||||
@@ -1,4 +1,4 @@
|
||||
generatorName: python-flask
|
||||
outputDir: samples/server/petstore/python-flask
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/python-flask/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-flask
|
||||
|
||||
8
bin/configs/python-pydantic-v1-aiohttp.yaml
Normal file
8
bin/configs/python-pydantic-v1-aiohttp.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: python-pydantic-v1
|
||||
outputDir: samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-pydantic-v1
|
||||
library: asyncio
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
mapNumberTo: float
|
||||
6
bin/configs/python-pydantic-v1-echo-api.yaml
Normal file
6
bin/configs/python-pydantic-v1-echo-api.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
generatorName: python-pydantic-v1
|
||||
outputDir: samples/client/echo_api/python-pydantic-v1
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-pydantic-v1
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
12
bin/configs/python-pydantic-v1.yaml
Normal file
12
bin/configs/python-pydantic-v1.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
generatorName: python-pydantic-v1
|
||||
outputDir: samples/openapi3/client/petstore/python-pydantic-v1
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-pydantic-v1
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
mapNumberTo: StrictFloat
|
||||
nameMappings:
|
||||
_type: underscore_type
|
||||
type_: type_with_underscore
|
||||
7
bin/configs/ruby-httpx-echo-api.yaml
Normal file
7
bin/configs/ruby-httpx-echo-api.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: ruby
|
||||
outputDir: samples/client/echo_api/ruby-httpx
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/ruby-client
|
||||
library: httpx
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
10
bin/configs/ruby-httpx.yaml
Normal file
10
bin/configs/ruby-httpx.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
generatorName: ruby
|
||||
outputDir: samples/client/petstore/ruby-httpx
|
||||
library: httpx
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/ruby/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/ruby-client
|
||||
additionalProperties:
|
||||
gemVersion: 1.0.0
|
||||
moduleName: Petstore
|
||||
gemName: petstore
|
||||
skipFormModel: "true"
|
||||
@@ -0,0 +1,8 @@
|
||||
generatorName: spring
|
||||
outputDir: samples/server/petstore/springboot-spring-provide-args
|
||||
library: spring-boot
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-spring-provide-args.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
additionalProperties:
|
||||
artifactId: springboot-spring-provide-args
|
||||
hideGenerationTimestamp: 'true'
|
||||
9
bin/configs/typescript-axios-echo-api.yaml
Normal file
9
bin/configs/typescript-axios-echo-api.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
generatorName: typescript-axios
|
||||
outputDir: samples/client/echo_api/typescript-axios/build
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-axios
|
||||
additionalProperties:
|
||||
artifactId: echo-api-typescript-axios
|
||||
hideGenerationTimestamp: "true"
|
||||
npmVersion: 1.0.0
|
||||
npmName: '@openapitools/typescript-axios-echo-api'
|
||||
@@ -53,7 +53,7 @@ if [[ ${#files[@]} -eq 1 && "${files[0]}" != *'*'* ]]; then
|
||||
java ${JAVA_OPTS} -jar "$executable" generate -c ${files[0]} ${args[@]}
|
||||
else
|
||||
echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
|
||||
sleep 5
|
||||
#sleep 5
|
||||
if [ ${#files[@]} -eq 0 ]; then
|
||||
files=("${root}"/bin/configs/*.yaml)
|
||||
fi
|
||||
|
||||
@@ -9,3 +9,9 @@
|
||||
# java okhttp gson test files
|
||||
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java"
|
||||
sha256: db505f7801fef62c13a08a8e9ca1fc4c5c947ab46b46f12943139d353feacf17
|
||||
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java"
|
||||
sha256: 6db714e9744c150c8982c3cb18e4f37a9c1ecd8f72f6d58943986e781ab4a344
|
||||
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java"
|
||||
sha256: 0d64cdc11809a7b5b952ccdad2bd91bd0045b3894d6fabf3e368fa0be12b8217
|
||||
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java"
|
||||
sha256: a1f8a70bf7b0c382a8def5bacf7b1fb189e687fabb40235aa799001e0597f545
|
||||
|
||||
@@ -78,7 +78,7 @@ Suppose you want to apply snake case naming to mysql schema outputs. Your config
|
||||
**CLI**
|
||||
|
||||
```
|
||||
openapi-generator -g mysql-schema -o out -i spec.yaml --additional-properties=identifierNamingConvention=snake_case
|
||||
openapi-generator -g mysql-schema -o out -i spec.yaml --additional-properties=identifierNamingConvention=snake_case,useSingleRequestParameter=true,withInterfaces=true
|
||||
```
|
||||
|
||||
It may seem like a typo but there are two `=` signs in the above example.
|
||||
|
||||
@@ -318,7 +318,6 @@ CONFIG OPTIONS
|
||||
...... (results omitted)
|
||||
library
|
||||
library template (sub-template) to use:
|
||||
jersey1 - HTTP client: Jersey client 1.18. JSON processing: Jackson 2.4.2
|
||||
jersey2 - HTTP client: Jersey client 2.6
|
||||
feign - HTTP client: Netflix Feign 8.1.1. JSON processing: Jackson 2.6.3
|
||||
okhttp-gson (default) - HTTP client: OkHttp 2.4.0. JSON processing: Gson 2.3.1
|
||||
@@ -422,7 +421,13 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
||||
```
|
||||
will rename the `Tag` schema to `Label` instead.
|
||||
|
||||
Not all generators support thess features yet. Please give it a try to confirm the behaviour and open an issue (ticket) to let us know which generators you would like to have this feature enabled and we'll prioritize accordingly. We also welcome PRs to add these features to generators. Related PRs for reference: #16209, #16234 (modelNameMappings), #16194, #16206 (nameMappings, parameterNameMappings).
|
||||
To map enum names, use `enumNameMappings` option, e.g.
|
||||
```sh
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/java/ --enum-name-mappings sold=UNAVAILABLE
|
||||
```
|
||||
will rename SOLD to UNAVAILABLE instead.
|
||||
|
||||
Not all generators support thess features yet. Please give it a try to confirm the behaviour and open an issue (ticket) to let us know which generators you would like to have this feature enabled and we'll prioritize accordingly. We also welcome PRs to add these features to generators. Related PRs for reference: #16209, #16234 (modelNameMappings), #16194, #16206 (nameMappings, parameterNameMappings), #17108 (enumNameMappings).
|
||||
|
||||
NOTE: some generators use `baseName` (original name obtained direclty from OpenAPI spec, e.g. `shipping-date`) mustache tag in the templates so the mapping feature won't work.
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ The following generators are available:
|
||||
* [php-nextgen (beta)](generators/php-nextgen.md)
|
||||
* [powershell (beta)](generators/powershell.md)
|
||||
* [python](generators/python.md)
|
||||
* [python-pydantic-v1](generators/python-pydantic-v1.md)
|
||||
* [r](generators/r.md)
|
||||
* [ruby](generators/ruby.md)
|
||||
* [rust](generators/rust.md)
|
||||
|
||||
@@ -116,6 +116,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Client</li>
|
||||
<li>Configuration</li>
|
||||
<li>Environment</li>
|
||||
<li>OperatingSystem</li>
|
||||
<li>TimeZone</li>
|
||||
<li>Version</li>
|
||||
<li>abstract</li>
|
||||
<li>as</li>
|
||||
|
||||
@@ -109,6 +109,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Client</li>
|
||||
<li>Configuration</li>
|
||||
<li>Environment</li>
|
||||
<li>OperatingSystem</li>
|
||||
<li>TimeZone</li>
|
||||
<li>Version</li>
|
||||
<li>abstract</li>
|
||||
<li>as</li>
|
||||
|
||||
@@ -115,6 +115,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<ul class="column-ul">
|
||||
<li>Client</li>
|
||||
<li>Configuration</li>
|
||||
<li>Environment</li>
|
||||
<li>OperatingSystem</li>
|
||||
<li>TimeZone</li>
|
||||
<li>Version</li>
|
||||
<li>abstract</li>
|
||||
<li>as</li>
|
||||
|
||||
@@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|enumClassPrefix|Prefix enum with class name| |false|
|
||||
|generateInterfaces|Generate interfaces for api classes| |false|
|
||||
|generateMarshalJSON|Generate MarshalJSON method| |true|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|isGoSubmodule|whether the generated Go module is a submodule| |false|
|
||||
|packageName|Go package name (convention: lowercase).| |openapi|
|
||||
@@ -29,6 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false|
|
||||
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false|
|
||||
|withAWSV4Signature|whether to include AWS v4 signature support| |false|
|
||||
|withGoMod|Generate go.mod and go.sum| |true|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
@@ -49,7 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|jersey2|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|jersey2|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|
||||
@@ -57,7 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.client|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 1.x. JSON processing: JSON-B or Jackson 2.9.x</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.x</dd></dl>|okhttp-gson|
|
||||
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 1.x. JSON processing: JSON-B or Jackson 2.9.x</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.x</dd></dl>|okhttp-gson|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null|
|
||||
@@ -92,7 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|
||||
|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false|
|
||||
|useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false|
|
||||
|useRuntimeException|Use RuntimeException instead of Exception. Only jersey, jersey2, jersey3, okhttp-gson, vertx, microprofile support this option.| |false|
|
||||
|useRuntimeException|Use RuntimeException instead of Exception. Only jersey2, jersey3, okhttp-gson, vertx, microprofile support this option.| |false|
|
||||
|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|
||||
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|
||||
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson support this option.| |false|
|
||||
|
||||
@@ -49,7 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|jersey2|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey2**</dt><dd>Jersey core 2.x</dd><dt>**jersey3**</dt><dd>Jersey core 3.x</dd></dl>|jersey2|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
@@ -67,7 +67,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|sourceFolder|source folder for generated code| |src/gen/java|
|
||||
|supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false|
|
||||
|testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi|
|
||||
|title|a title describing the application| |OpenAPI Server|
|
||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||
|
||||
@@ -39,7 +39,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true. This option is currently supported only when using jaxrs-spec library.| |false|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
|
||||
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'| |moshi|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null|
|
||||
|sourceFolder|source folder for generated code| |src/main/kotlin|
|
||||
|
||||
@@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|reactive|use coroutines for reactive behavior| |false|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
|
||||
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'| |moshi|
|
||||
|serverPort|configuration the port in which the sever is to run on| |8080|
|
||||
|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false|
|
||||
|serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false|
|
||||
|
||||
@@ -28,7 +28,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|packageName|Generated artifact package name.| |org.openapitools|
|
||||
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
|
||||
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'| |moshi|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null|
|
||||
|sourceFolder|source folder for generated code| |src/main/kotlin|
|
||||
|
||||
@@ -78,10 +78,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>async</li>
|
||||
<li>auth_settings</li>
|
||||
<li>await</li>
|
||||
<li>base64</li>
|
||||
<li>body_params</li>
|
||||
<li>break</li>
|
||||
<li>class</li>
|
||||
<li>continue</li>
|
||||
<li>date</li>
|
||||
<li>def</li>
|
||||
<li>del</li>
|
||||
<li>elif</li>
|
||||
@@ -90,6 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>exec</li>
|
||||
<li>false</li>
|
||||
<li>finally</li>
|
||||
<li>float</li>
|
||||
<li>for</li>
|
||||
<li>form_params</li>
|
||||
<li>from</li>
|
||||
@@ -99,6 +102,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>import</li>
|
||||
<li>in</li>
|
||||
<li>is</li>
|
||||
<li>json</li>
|
||||
<li>lambda</li>
|
||||
<li>local_var_files</li>
|
||||
<li>none</li>
|
||||
@@ -113,6 +117,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>raise</li>
|
||||
<li>resource_path</li>
|
||||
<li>return</li>
|
||||
<li>schema</li>
|
||||
<li>self</li>
|
||||
<li>true</li>
|
||||
<li>try</li>
|
||||
|
||||
@@ -78,10 +78,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>async</li>
|
||||
<li>auth_settings</li>
|
||||
<li>await</li>
|
||||
<li>base64</li>
|
||||
<li>body_params</li>
|
||||
<li>break</li>
|
||||
<li>class</li>
|
||||
<li>continue</li>
|
||||
<li>date</li>
|
||||
<li>def</li>
|
||||
<li>del</li>
|
||||
<li>elif</li>
|
||||
@@ -90,6 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>exec</li>
|
||||
<li>false</li>
|
||||
<li>finally</li>
|
||||
<li>float</li>
|
||||
<li>for</li>
|
||||
<li>form_params</li>
|
||||
<li>from</li>
|
||||
@@ -99,6 +102,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>import</li>
|
||||
<li>in</li>
|
||||
<li>is</li>
|
||||
<li>json</li>
|
||||
<li>lambda</li>
|
||||
<li>local_var_files</li>
|
||||
<li>none</li>
|
||||
@@ -113,6 +117,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>raise</li>
|
||||
<li>resource_path</li>
|
||||
<li>return</li>
|
||||
<li>schema</li>
|
||||
<li>self</li>
|
||||
<li>true</li>
|
||||
<li>try</li>
|
||||
|
||||
@@ -73,10 +73,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>async</li>
|
||||
<li>auth_settings</li>
|
||||
<li>await</li>
|
||||
<li>base64</li>
|
||||
<li>body_params</li>
|
||||
<li>break</li>
|
||||
<li>class</li>
|
||||
<li>continue</li>
|
||||
<li>date</li>
|
||||
<li>def</li>
|
||||
<li>del</li>
|
||||
<li>elif</li>
|
||||
@@ -85,6 +87,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>exec</li>
|
||||
<li>false</li>
|
||||
<li>finally</li>
|
||||
<li>float</li>
|
||||
<li>for</li>
|
||||
<li>form_params</li>
|
||||
<li>from</li>
|
||||
@@ -94,6 +97,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>import</li>
|
||||
<li>in</li>
|
||||
<li>is</li>
|
||||
<li>json</li>
|
||||
<li>lambda</li>
|
||||
<li>local_var_files</li>
|
||||
<li>none</li>
|
||||
@@ -108,6 +112,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>raise</li>
|
||||
<li>resource_path</li>
|
||||
<li>return</li>
|
||||
<li>schema</li>
|
||||
<li>self</li>
|
||||
<li>true</li>
|
||||
<li>try</li>
|
||||
|
||||
@@ -78,10 +78,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>async</li>
|
||||
<li>auth_settings</li>
|
||||
<li>await</li>
|
||||
<li>base64</li>
|
||||
<li>body_params</li>
|
||||
<li>break</li>
|
||||
<li>class</li>
|
||||
<li>continue</li>
|
||||
<li>date</li>
|
||||
<li>def</li>
|
||||
<li>del</li>
|
||||
<li>elif</li>
|
||||
@@ -90,6 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>exec</li>
|
||||
<li>false</li>
|
||||
<li>finally</li>
|
||||
<li>float</li>
|
||||
<li>for</li>
|
||||
<li>form_params</li>
|
||||
<li>from</li>
|
||||
@@ -99,6 +102,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>import</li>
|
||||
<li>in</li>
|
||||
<li>is</li>
|
||||
<li>json</li>
|
||||
<li>lambda</li>
|
||||
<li>local_var_files</li>
|
||||
<li>none</li>
|
||||
@@ -113,6 +117,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>raise</li>
|
||||
<li>resource_path</li>
|
||||
<li>return</li>
|
||||
<li>schema</li>
|
||||
<li>self</li>
|
||||
<li>true</li>
|
||||
<li>try</li>
|
||||
|
||||
232
docs/generators/python-pydantic-v1.md
Normal file
232
docs/generators/python-pydantic-v1.md
Normal file
@@ -0,0 +1,232 @@
|
||||
---
|
||||
title: Documentation for the python-pydantic-v1 Generator
|
||||
---
|
||||
|
||||
## METADATA
|
||||
|
||||
| Property | Value | Notes |
|
||||
| -------- | ----- | ----- |
|
||||
| generator name | python-pydantic-v1 | pass this to the generate command after -g |
|
||||
| generator stability | STABLE | |
|
||||
| generator type | CLIENT | |
|
||||
| generator language | Python | |
|
||||
| generator language version | 3.7+ | |
|
||||
| generator default templating engine | mustache | |
|
||||
| helpTxt | Generates a Python client library. | |
|
||||
|
||||
## CONFIG OPTIONS
|
||||
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|dateFormat|date format for query parameters| |%Y-%m-%d|
|
||||
|datetimeFormat|datetime format for query parameters| |%Y-%m-%dT%H:%M:%S%z|
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|library|library template (sub-template) to use: asyncio, tornado (deprecated), urllib3| |urllib3|
|
||||
|mapNumberTo|Map number to Union[StrictFloat, StrictInt], StrictStr or float.| |Union[StrictFloat, StrictInt]|
|
||||
|packageName|python package name (convention: snake_case).| |openapi_client|
|
||||
|packageUrl|python package URL.| |null|
|
||||
|packageVersion|python package version.| |1.0.0|
|
||||
|projectName|python project name in setup.py (e.g. petstore-api).| |null|
|
||||
|recursionLimit|Set the recursion limit. If not set, use the system default value.| |null|
|
||||
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
| Type/Alias | Imports |
|
||||
| ---------- | ------- |
|
||||
|
||||
|
||||
## INSTANTIATION TYPES
|
||||
|
||||
| Type/Alias | Instantiated By |
|
||||
| ---------- | --------------- |
|
||||
|
||||
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>bool</li>
|
||||
<li>bytearray</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
<li>datetime</li>
|
||||
<li>decimal.Decimal</li>
|
||||
<li>dict</li>
|
||||
<li>float</li>
|
||||
<li>int</li>
|
||||
<li>list</li>
|
||||
<li>none_type</li>
|
||||
<li>object</li>
|
||||
<li>str</li>
|
||||
</ul>
|
||||
|
||||
## RESERVED WORDS
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>and</li>
|
||||
<li>as</li>
|
||||
<li>assert</li>
|
||||
<li>async</li>
|
||||
<li>await</li>
|
||||
<li>base64</li>
|
||||
<li>break</li>
|
||||
<li>class</li>
|
||||
<li>continue</li>
|
||||
<li>date</li>
|
||||
<li>def</li>
|
||||
<li>del</li>
|
||||
<li>elif</li>
|
||||
<li>else</li>
|
||||
<li>except</li>
|
||||
<li>exec</li>
|
||||
<li>false</li>
|
||||
<li>finally</li>
|
||||
<li>for</li>
|
||||
<li>from</li>
|
||||
<li>global</li>
|
||||
<li>if</li>
|
||||
<li>import</li>
|
||||
<li>in</li>
|
||||
<li>is</li>
|
||||
<li>json</li>
|
||||
<li>lambda</li>
|
||||
<li>none</li>
|
||||
<li>nonlocal</li>
|
||||
<li>not</li>
|
||||
<li>or</li>
|
||||
<li>pass</li>
|
||||
<li>print</li>
|
||||
<li>property</li>
|
||||
<li>raise</li>
|
||||
<li>return</li>
|
||||
<li>schema</li>
|
||||
<li>self</li>
|
||||
<li>true</li>
|
||||
<li>try</li>
|
||||
<li>while</li>
|
||||
<li>with</li>
|
||||
<li>yield</li>
|
||||
</ul>
|
||||
|
||||
## FEATURE SET
|
||||
|
||||
|
||||
### Client Modification Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|BasePath|✗|ToolingExtension
|
||||
|Authorizations|✗|ToolingExtension
|
||||
|UserAgent|✗|ToolingExtension
|
||||
|MockServer|✗|ToolingExtension
|
||||
|
||||
### Data Type Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|Custom|✗|OAS2,OAS3
|
||||
|Int32|✓|OAS2,OAS3
|
||||
|Int64|✓|OAS2,OAS3
|
||||
|Float|✓|OAS2,OAS3
|
||||
|Double|✓|OAS2,OAS3
|
||||
|Decimal|✓|ToolingExtension
|
||||
|String|✓|OAS2,OAS3
|
||||
|Byte|✓|OAS2,OAS3
|
||||
|Binary|✓|OAS2,OAS3
|
||||
|Boolean|✓|OAS2,OAS3
|
||||
|Date|✓|OAS2,OAS3
|
||||
|DateTime|✓|OAS2,OAS3
|
||||
|Password|✓|OAS2,OAS3
|
||||
|File|✓|OAS2
|
||||
|Uuid|✗|
|
||||
|Array|✓|OAS2,OAS3
|
||||
|Null|✗|OAS3
|
||||
|AnyType|✗|OAS2,OAS3
|
||||
|Object|✓|OAS2,OAS3
|
||||
|Maps|✓|ToolingExtension
|
||||
|CollectionFormat|✓|OAS2
|
||||
|CollectionFormatMulti|✓|OAS2
|
||||
|Enum|✓|OAS2,OAS3
|
||||
|ArrayOfEnum|✓|ToolingExtension
|
||||
|ArrayOfModel|✓|ToolingExtension
|
||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
||||
|MapOfEnum|✓|ToolingExtension
|
||||
|MapOfModel|✓|ToolingExtension
|
||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
||||
|
||||
### Documentation Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|Readme|✓|ToolingExtension
|
||||
|Model|✓|ToolingExtension
|
||||
|Api|✓|ToolingExtension
|
||||
|
||||
### Global Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|Host|✓|OAS2,OAS3
|
||||
|BasePath|✓|OAS2,OAS3
|
||||
|Info|✓|OAS2,OAS3
|
||||
|Schemes|✗|OAS2,OAS3
|
||||
|PartialSchemes|✓|OAS2,OAS3
|
||||
|Consumes|✓|OAS2
|
||||
|Produces|✓|OAS2
|
||||
|ExternalDocumentation|✓|OAS2,OAS3
|
||||
|Examples|✓|OAS2,OAS3
|
||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
||||
|MultiServer|✗|OAS3
|
||||
|ParameterizedServer|✗|OAS3
|
||||
|ParameterStyling|✗|OAS3
|
||||
|Callbacks|✗|OAS3
|
||||
|LinkObjects|✗|OAS3
|
||||
|
||||
### Parameter Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|Path|✓|OAS2,OAS3
|
||||
|Query|✓|OAS2,OAS3
|
||||
|Header|✓|OAS2,OAS3
|
||||
|Body|✓|OAS2
|
||||
|FormUnencoded|✓|OAS2
|
||||
|FormMultipart|✓|OAS2
|
||||
|Cookie|✗|OAS3
|
||||
|
||||
### Schema Support Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|Simple|✓|OAS2,OAS3
|
||||
|Composite|✓|OAS2,OAS3
|
||||
|Polymorphism|✓|OAS2,OAS3
|
||||
|Union|✗|OAS3
|
||||
|allOf|✓|OAS2,OAS3
|
||||
|anyOf|✓|OAS3
|
||||
|oneOf|✓|OAS3
|
||||
|not|✗|OAS3
|
||||
|
||||
### Security Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|BasicAuth|✓|OAS2,OAS3
|
||||
|ApiKey|✓|OAS2,OAS3
|
||||
|OpenIDConnect|✗|OAS3
|
||||
|BearerToken|✓|OAS3
|
||||
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||
|OAuth2_Password|✗|OAS2,OAS3
|
||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||
|SignatureAuth|✓|OAS3
|
||||
|
||||
### Wire Format Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|JSON|✓|OAS2,OAS3
|
||||
|XML|✓|OAS2,OAS3
|
||||
|PROTOBUF|✗|ToolingExtension
|
||||
|Custom|✓|OAS2,OAS3
|
||||
@@ -68,12 +68,15 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
## RESERVED WORDS
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>all_params</li>
|
||||
<li>and</li>
|
||||
<li>as</li>
|
||||
<li>assert</li>
|
||||
<li>async</li>
|
||||
<li>auth_settings</li>
|
||||
<li>await</li>
|
||||
<li>base64</li>
|
||||
<li>body_params</li>
|
||||
<li>break</li>
|
||||
<li>class</li>
|
||||
<li>continue</li>
|
||||
@@ -86,23 +89,30 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>exec</li>
|
||||
<li>false</li>
|
||||
<li>finally</li>
|
||||
<li>float</li>
|
||||
<li>for</li>
|
||||
<li>form_params</li>
|
||||
<li>from</li>
|
||||
<li>global</li>
|
||||
<li>header_params</li>
|
||||
<li>if</li>
|
||||
<li>import</li>
|
||||
<li>in</li>
|
||||
<li>is</li>
|
||||
<li>json</li>
|
||||
<li>lambda</li>
|
||||
<li>local_var_files</li>
|
||||
<li>none</li>
|
||||
<li>nonlocal</li>
|
||||
<li>not</li>
|
||||
<li>or</li>
|
||||
<li>pass</li>
|
||||
<li>path_params</li>
|
||||
<li>print</li>
|
||||
<li>property</li>
|
||||
<li>query_params</li>
|
||||
<li>raise</li>
|
||||
<li>resource_path</li>
|
||||
<li>return</li>
|
||||
<li>schema</li>
|
||||
<li>self</li>
|
||||
|
||||
@@ -27,13 +27,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|gemDescription|gem description. | |This gem maps to a REST API|
|
||||
|gemHomepage|gem homepage. | |https://openapi-generator.tech|
|
||||
|gemLicense|gem license. | |unlicense|
|
||||
|gemMetadata|gem metadata.| |{}|
|
||||
|gemName|gem name (convention: underscore_case).| |openapi_client|
|
||||
|gemRequiredRubyVersion|gem required Ruby version. | |>= 2.4|
|
||||
|gemSummary|gem summary. | |A ruby wrapper for the REST APIs|
|
||||
|gemVersion|gem version.| |1.0.0|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|HTTP library template (sub-template) to use|<dl><dt>**faraday**</dt><dd>Faraday >= 1.0.1 (https://github.com/lostisland/faraday)</dd><dt>**typhoeus**</dt><dd>Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)</dd></dl>|typhoeus|
|
||||
|library|HTTP library template (sub-template) to use|<dl><dt>**faraday**</dt><dd>Faraday >= 1.0.1 (https://github.com/lostisland/faraday)</dd><dt>**httpx**</dt><dd>HTTPX >= 1.0.0 (https://gitlab.com/os85/httpx)</dd><dt>**typhoeus**</dt><dd>Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)</dd></dl>|typhoeus|
|
||||
|moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -89,6 +89,9 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
|
||||
@Option(name = {"--model-name-mappings"}, title = "model name mappings", description = "displays the model name mappings (none)")
|
||||
private Boolean modelNameMappings;
|
||||
|
||||
@Option(name = {"--enum-name-mappings"}, title = "enum name mappings", description = "displays the enum name mappings (none)")
|
||||
private Boolean enumNameMappings;
|
||||
|
||||
@Option(name = {"--openapi-normalizer"}, title = "openapi normalizer rules", description = "displays the OpenAPI normalizer rules (none)")
|
||||
private Boolean openapiNormalizer;
|
||||
|
||||
@@ -542,6 +545,18 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(enumNameMappings)) {
|
||||
sb.append(newline).append("ENUM NAME MAPPING").append(newline).append(newline);
|
||||
Map<String, String> map = config.enumNameMapping()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> {
|
||||
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b));
|
||||
}, TreeMap::new));
|
||||
writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "enum name", "Mapped to");
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(openapiNormalizer)) {
|
||||
sb.append(newline).append("OPENAPI NORMALIZER RULES").append(newline).append(newline);
|
||||
Map<String, String> map = config.openapiNormalizer()
|
||||
|
||||
@@ -209,6 +209,13 @@ public class Generate extends OpenApiGeneratorCommand {
|
||||
+ " You can also have multiple occurrences of this option.")
|
||||
private List<String> modelNameMappings = new ArrayList<>();
|
||||
|
||||
@Option(
|
||||
name = {"--enum-name-mappings"},
|
||||
title = "enum name mappings",
|
||||
description = "specifies mappings between the enum name and the new name in the format of enum_name=AnotherName,enum_name2=OtherName2."
|
||||
+ " You can also have multiple occurrences of this option.")
|
||||
private List<String> enumNameMappings = new ArrayList<>();
|
||||
|
||||
@Option(
|
||||
name = {"--openapi-normalizer"},
|
||||
title = "OpenAPI normalizer rules",
|
||||
@@ -492,6 +499,7 @@ public class Generate extends OpenApiGeneratorCommand {
|
||||
applyNameMappingsKvpList(nameMappings, configurator);
|
||||
applyParameterNameMappingsKvpList(parameterNameMappings, configurator);
|
||||
applyModelNameMappingsKvpList(modelNameMappings, configurator);
|
||||
applyEnumNameMappingsKvpList(enumNameMappings, configurator);
|
||||
applyOpenAPINormalizerKvpList(openapiNormalizer, configurator);
|
||||
applyTypeMappingsKvpList(typeMappings, configurator);
|
||||
applyAdditionalPropertiesKvpList(additionalProperties, configurator);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -56,6 +56,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
private final Map<String, String> nameMappings;
|
||||
private final Map<String, String> parameterNameMappings;
|
||||
private final Map<String, String> modelNameMappings;
|
||||
private final Map<String, String> enumNameMappings;
|
||||
private final Map<String, String> openapiNormalizer;
|
||||
private final Set<String> languageSpecificPrimitives;
|
||||
private final Map<String, String> reservedWordsMappings;
|
||||
@@ -295,6 +296,15 @@ public final class GeneratorSettings implements Serializable {
|
||||
return modelNameMappings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets enum name mappings between an enum name and the new name.
|
||||
*
|
||||
* @return the enum name mappings
|
||||
*/
|
||||
public Map<String, String> getEnumNameMappings() {
|
||||
return enumNameMappings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets OpenAPI normalizer rules
|
||||
*
|
||||
@@ -425,6 +435,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
nameMappings = Collections.unmodifiableMap(builder.nameMappings);
|
||||
parameterNameMappings = Collections.unmodifiableMap(builder.parameterNameMappings);
|
||||
modelNameMappings = Collections.unmodifiableMap(builder.modelNameMappings);
|
||||
enumNameMappings = Collections.unmodifiableMap(builder.enumNameMappings);
|
||||
openapiNormalizer = Collections.unmodifiableMap(builder.openapiNormalizer);
|
||||
languageSpecificPrimitives = Collections.unmodifiableSet(builder.languageSpecificPrimitives);
|
||||
reservedWordsMappings = Collections.unmodifiableMap(builder.reservedWordsMappings);
|
||||
@@ -502,6 +513,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
nameMappings = Collections.unmodifiableMap(new HashMap<>(0));
|
||||
parameterNameMappings = Collections.unmodifiableMap(new HashMap<>(0));
|
||||
modelNameMappings = Collections.unmodifiableMap(new HashMap<>(0));
|
||||
enumNameMappings = Collections.unmodifiableMap(new HashMap<>(0));
|
||||
openapiNormalizer = Collections.unmodifiableMap(new HashMap<>(0));
|
||||
languageSpecificPrimitives = Collections.unmodifiableSet(new HashSet<>(0));
|
||||
reservedWordsMappings = Collections.unmodifiableMap(new HashMap<>(0));
|
||||
@@ -572,6 +584,9 @@ public final class GeneratorSettings implements Serializable {
|
||||
if (copy.getModelNameMappings() != null) {
|
||||
builder.modelNameMappings.putAll(copy.getModelNameMappings());
|
||||
}
|
||||
if (copy.getEnumNameMappings() != null) {
|
||||
builder.enumNameMappings.putAll(copy.getEnumNameMappings());
|
||||
}
|
||||
if (copy.getOpenAPINormalizer() != null) {
|
||||
builder.openapiNormalizer.putAll(copy.getOpenAPINormalizer());
|
||||
}
|
||||
@@ -620,6 +635,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
private Map<String, String> nameMappings;
|
||||
private Map<String, String> parameterNameMappings;
|
||||
private Map<String, String> modelNameMappings;
|
||||
private Map<String, String> enumNameMappings;
|
||||
private Map<String, String> openapiNormalizer;
|
||||
private Set<String> languageSpecificPrimitives;
|
||||
private Map<String, String> reservedWordsMappings;
|
||||
@@ -644,6 +660,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
nameMappings = new HashMap<>();
|
||||
parameterNameMappings = new HashMap<>();
|
||||
modelNameMappings = new HashMap<>();
|
||||
enumNameMappings = new HashMap<>();
|
||||
openapiNormalizer = new HashMap<>();
|
||||
languageSpecificPrimitives = new HashSet<>();
|
||||
reservedWordsMappings = new HashMap<>();
|
||||
@@ -1043,6 +1060,32 @@ public final class GeneratorSettings implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code enumNameMappings} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param enumNameMappings the {@code enumNameMappings} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withEnumNameMappings(Map<String, String> enumNameMappings) {
|
||||
this.enumNameMappings = enumNameMappings;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a single {@code enumNameMappings} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
* @param key A key for the name mapping
|
||||
* @param value The value of name mapping
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withEnumNameMapping(String key, String value) {
|
||||
if (this.enumNameMappings == null) {
|
||||
this.enumNameMappings = new HashMap<>();
|
||||
}
|
||||
this.enumNameMappings.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@code openapiNormalizer} and returns a reference to this Builder so that the methods can be chained together.
|
||||
*
|
||||
@@ -1198,7 +1241,6 @@ public final class GeneratorSettings implements Serializable {
|
||||
*/
|
||||
public GeneratorSettings build() {
|
||||
GeneratorSettings instance = new GeneratorSettings(this);
|
||||
//noinspection PlaceholderCountMatchesArgumentCount
|
||||
LOGGER.debug("GeneratorSettings#build: {}", instance);
|
||||
return instance;
|
||||
}
|
||||
@@ -1260,6 +1302,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
Objects.equals(getNameMappings(), that.getNameMappings()) &&
|
||||
Objects.equals(getParameterNameMappings(), that.getParameterNameMappings()) &&
|
||||
Objects.equals(getModelNameMappings(), that.getModelNameMappings()) &&
|
||||
Objects.equals(getEnumNameMappings(), that.getEnumNameMappings()) &&
|
||||
Objects.equals(getOpenAPINormalizer(), that.getOpenAPINormalizer()) &&
|
||||
Objects.equals(getLanguageSpecificPrimitives(), that.getLanguageSpecificPrimitives()) &&
|
||||
Objects.equals(getReservedWordsMappings(), that.getReservedWordsMappings()) &&
|
||||
@@ -1295,6 +1338,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
getNameMappings(),
|
||||
getParameterNameMappings(),
|
||||
getModelNameMappings(),
|
||||
getEnumNameMappings(),
|
||||
getOpenAPINormalizer(),
|
||||
getLanguageSpecificPrimitives(),
|
||||
getReservedWordsMappings(),
|
||||
|
||||
@@ -562,8 +562,7 @@ public class WorkflowSettings {
|
||||
*/
|
||||
public WorkflowSettings build() {
|
||||
WorkflowSettings instance = new WorkflowSettings(this);
|
||||
//noinspection PlaceholderCountMatchesArgumentCount
|
||||
LOGGER.debug("WorkflowSettings#build: %s", instance.toString());
|
||||
LOGGER.debug("WorkflowSettings#build: {}", instance);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,4 +120,23 @@ public class WorkflowSettingsTest {
|
||||
WorkflowSettings defaults = WorkflowSettings.newBuilder().build();
|
||||
assertOnChangesToDefaults(defaults);
|
||||
}
|
||||
@Test
|
||||
public void customOutputDirIsSet() {
|
||||
WorkflowSettings settings = WorkflowSettings.newBuilder()
|
||||
.withOutputDir("custom/output/directory")
|
||||
.build();
|
||||
|
||||
assertEquals(settings.getOutputDir(), Paths.get("custom/output/directory").toAbsolutePath().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void customGlobalPropertiesAreSet() {
|
||||
WorkflowSettings settings = WorkflowSettings.newBuilder()
|
||||
.withGlobalProperty("customKey", "customValue")
|
||||
.build();
|
||||
|
||||
Map<String, String> properties = settings.getGlobalProperties();
|
||||
assertEquals(properties.size(), 1, "Global Properties map should allow custom entries");
|
||||
assertEquals(properties.getOrDefault("customKey", ""), "customValue");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.0.1-SNAPSHOT
|
||||
openApiGeneratorVersion=7.1.0
|
||||
# /RELEASE_VERSION
|
||||
|
||||
# BEGIN placeholders
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.0.1-SNAPSHOT
|
||||
openApiGeneratorVersion=7.1.0
|
||||
# /RELEASE_VERSION
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,67 +17,101 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
@@ -87,97 +121,124 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@@ -25,7 +25,8 @@
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
@@ -119,6 +119,9 @@ class OpenApiGeneratorPlugin : Plugin<Project> {
|
||||
schemaMappings.set(generate.schemaMappings)
|
||||
inlineSchemaNameMappings.set(generate.inlineSchemaNameMappings)
|
||||
inlineSchemaOptions.set(generate.inlineSchemaOptions)
|
||||
nameMappings.set(generate.nameMappings)
|
||||
modelNameMappings.set(generate.modelNameMappings)
|
||||
parameterNameMappings.set(generate.parameterNameMappings)
|
||||
openapiNormalizer.set(generate.openapiNormalizer)
|
||||
invokerPackage.set(generate.invokerPackage)
|
||||
groupId.set(generate.groupId)
|
||||
@@ -160,3 +163,5 @@ class OpenApiGeneratorPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -182,6 +182,11 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
|
||||
*/
|
||||
val modelNameMappings = project.objects.mapProperty<String, String>()
|
||||
|
||||
/**
|
||||
* Specifies mappings between an enum name and the new name
|
||||
*/
|
||||
val enumNameMappings = project.objects.mapProperty<String, String>()
|
||||
|
||||
/**
|
||||
* Specifies mappings (rules) in OpenAPI normalizer
|
||||
*/
|
||||
|
||||
@@ -33,12 +33,5 @@ open class OpenApiGeneratorValidateExtension(project: Project) {
|
||||
/**
|
||||
* Whether to offer recommendations related to the validated specification document.
|
||||
*/
|
||||
val recommend = project.objects.property<Boolean?>()
|
||||
|
||||
init {
|
||||
applyDefaults()
|
||||
}
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
fun applyDefaults() = recommend.set(true)
|
||||
val recommend = project.objects.property<Boolean>().convention(true)
|
||||
}
|
||||
@@ -107,7 +107,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
* Local root folder with spec files
|
||||
*/
|
||||
@Optional
|
||||
@get:InputFile
|
||||
@get:InputDirectory
|
||||
@PathSensitive(PathSensitivity.RELATIVE)
|
||||
val inputSpecRootDirectory = project.objects.property<String>();
|
||||
|
||||
@@ -293,6 +293,13 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
@Input
|
||||
val modelNameMappings = project.objects.mapProperty<String, String>()
|
||||
|
||||
/**
|
||||
* Specifies mappings between the enum name and the new name
|
||||
*/
|
||||
@Optional
|
||||
@Input
|
||||
val enumNameMappings = project.objects.mapProperty<String, String>()
|
||||
|
||||
/**
|
||||
* Specifies mappings (rules) in OpenAPI normalizer
|
||||
*/
|
||||
@@ -585,10 +592,22 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
@Suppress("unused")
|
||||
@TaskAction
|
||||
fun doWork() {
|
||||
inputSpecRootDirectory.ifNotEmpty { inputSpecRootDirectoryValue -> {
|
||||
inputSpec.set(MergedSpecBuilder(inputSpecRootDirectoryValue, mergedFileName.get()).buildMergedSpec())
|
||||
logger.info("Merge input spec would be used - {}", inputSpec.get())
|
||||
}}
|
||||
var resolvedInputSpec = ""
|
||||
|
||||
inputSpec.ifNotEmpty { value ->
|
||||
resolvedInputSpec = value
|
||||
}
|
||||
|
||||
remoteInputSpec.ifNotEmpty { value ->
|
||||
resolvedInputSpec = value
|
||||
}
|
||||
|
||||
inputSpecRootDirectory.ifNotEmpty { inputSpecRootDirectoryValue ->
|
||||
run {
|
||||
resolvedInputSpec = MergedSpecBuilder(inputSpecRootDirectoryValue, mergedFileName.getOrElse("merged")).buildMergedSpec()
|
||||
logger.info("Merge input spec would be used - {}", resolvedInputSpec)
|
||||
}
|
||||
}
|
||||
|
||||
cleanupOutput.ifNotEmpty { cleanup ->
|
||||
if (cleanup) {
|
||||
@@ -655,6 +674,8 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
logger.warn("Both inputSpec and remoteInputSpec is specified. The remoteInputSpec will take priority over inputSpec.")
|
||||
}
|
||||
|
||||
configurator.setInputSpec(resolvedInputSpec)
|
||||
|
||||
// now override with any specified parameters
|
||||
verbose.ifNotEmpty { value ->
|
||||
configurator.setVerbose(value)
|
||||
@@ -668,14 +689,6 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
configurator.setSkipOverwrite(value ?: false)
|
||||
}
|
||||
|
||||
inputSpec.ifNotEmpty { value ->
|
||||
configurator.setInputSpec(value)
|
||||
}
|
||||
|
||||
remoteInputSpec.ifNotEmpty { value ->
|
||||
configurator.setInputSpec(value)
|
||||
}
|
||||
|
||||
generatorName.ifNotEmpty { value ->
|
||||
configurator.setGeneratorName(value)
|
||||
}
|
||||
@@ -846,6 +859,12 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
}
|
||||
}
|
||||
|
||||
if (enumNameMappings.isPresent) {
|
||||
enumNameMappings.get().forEach { entry ->
|
||||
configurator.addEnumNameMapping(entry.key, entry.value)
|
||||
}
|
||||
}
|
||||
|
||||
if (openapiNormalizer.isPresent) {
|
||||
openapiNormalizer.get().forEach { entry ->
|
||||
configurator.addOpenAPINormalizer(entry.key, entry.value)
|
||||
|
||||
@@ -58,7 +58,7 @@ open class ValidateTask : DefaultTask() {
|
||||
|
||||
@Optional
|
||||
@Input
|
||||
val recommend = project.objects.property<Boolean?>()
|
||||
val recommend = project.objects.property<Boolean>().convention(true)
|
||||
|
||||
@get:Internal
|
||||
@set:Option(option = "input", description = "The input specification.")
|
||||
|
||||
@@ -4,7 +4,9 @@ import org.gradle.testkit.runner.GradleRunner
|
||||
import org.gradle.testkit.runner.TaskOutcome
|
||||
import org.testng.annotations.Test
|
||||
import java.io.File
|
||||
import java.nio.file.Files.createDirectory
|
||||
import java.nio.file.Files.createTempDirectory
|
||||
import java.nio.file.Paths
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
@@ -88,6 +90,75 @@ class GenerateTaskDslTest : TestBase() {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `openApiGenerate should create an expected file structure from root directory config`() {
|
||||
val projectFiles = mapOf(
|
||||
"spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml"),
|
||||
"spec-2.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.1.yaml")
|
||||
)
|
||||
|
||||
// Arrange
|
||||
val buildContents = """
|
||||
plugins {
|
||||
id 'org.openapi.generator'
|
||||
}
|
||||
openApiGenerate {
|
||||
generatorName = "kotlin"
|
||||
inputSpecRootDirectory = file("specs").absolutePath
|
||||
outputDir = file("build/kotlin").absolutePath
|
||||
apiPackage = "org.openapitools.example.api"
|
||||
invokerPackage = "org.openapitools.example.invoker"
|
||||
modelPackage = "org.openapitools.example.model"
|
||||
configOptions = [
|
||||
dateLibrary: "java8"
|
||||
]
|
||||
}
|
||||
""".trimIndent()
|
||||
val tempContractDirectory: File = createDirectory(Paths.get("${temp.path}/specs")).toFile()
|
||||
|
||||
File(temp, "build.gradle").writeText(buildContents)
|
||||
projectFiles.forEach { entry ->
|
||||
val target = File(tempContractDirectory, entry.key)
|
||||
entry.value?.copyTo(target.outputStream())
|
||||
}
|
||||
|
||||
// Act
|
||||
val result = GradleRunner.create()
|
||||
.withProjectDir(temp)
|
||||
.withArguments("openApiGenerate", "--stacktrace")
|
||||
.withPluginClasspath()
|
||||
.build()
|
||||
|
||||
// Assert
|
||||
assertTrue(
|
||||
result.output.contains("Successfully generated code to"),
|
||||
"User friendly generate notice is missing."
|
||||
)
|
||||
|
||||
listOf(
|
||||
"build/kotlin/.openapi-generator-ignore",
|
||||
"build/kotlin/docs/PetsApi.md",
|
||||
"build/kotlin/docs/Error.md",
|
||||
"build/kotlin/docs/Pet.md",
|
||||
"build/kotlin/README.md",
|
||||
"build/kotlin/build.gradle",
|
||||
"build/kotlin/.openapi-generator/VERSION",
|
||||
"build/kotlin/settings.gradle",
|
||||
"build/kotlin/src/main/kotlin/org/openapitools/example/model/Pet.kt",
|
||||
"build/kotlin/src/main/kotlin/org/openapitools/example/model/Error.kt",
|
||||
"build/kotlin/src/main/kotlin/org/openapitools/example/api/PetsApi.kt",
|
||||
"build/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt"
|
||||
).map {
|
||||
val f = File(temp, it)
|
||||
assertTrue(f.exists() && f.isFile, "An expected file was not generated when invoking the generation: $f")
|
||||
}
|
||||
|
||||
assertEquals(
|
||||
TaskOutcome.SUCCESS, result.task(":openApiGenerate")?.outcome,
|
||||
"Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}"
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `openApiGenerate should create an expected file structure from DSL config`() {
|
||||
// Arrange
|
||||
|
||||
@@ -144,4 +144,161 @@ class ValidateTaskDslTest : TestBase() {
|
||||
"Expected a failed run, but found ${result.task(":openApiValidate")?.outcome}"
|
||||
)
|
||||
}
|
||||
|
||||
@Test(dataProvider = "gradle_version_provider")
|
||||
fun `validateGoodSpec as defined task should succeed on valid spec`(gradleVersion: String?) {
|
||||
// Arrange
|
||||
val projectFiles = mapOf(
|
||||
"spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml")
|
||||
)
|
||||
|
||||
withProject(
|
||||
"""
|
||||
| plugins {
|
||||
| id 'org.openapi.generator'
|
||||
| }
|
||||
|
|
||||
| task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask) {
|
||||
| inputSpec.set(file("spec.yaml").absolutePath)
|
||||
| }
|
||||
""".trimMargin(), projectFiles
|
||||
)
|
||||
|
||||
// Act
|
||||
val result = getGradleRunner(gradleVersion)
|
||||
.withProjectDir(temp)
|
||||
.withArguments("validateGoodSpec")
|
||||
.withPluginClasspath()
|
||||
.build()
|
||||
|
||||
// Assert
|
||||
assertTrue(
|
||||
result.output.contains("Spec is valid."),
|
||||
"Unexpected/no message presented to the user for a valid spec."
|
||||
)
|
||||
assertEquals(
|
||||
SUCCESS, result.task(":validateGoodSpec")?.outcome,
|
||||
"Expected a successful run, but found ${result.task(":validateGoodSpec")?.outcome}"
|
||||
)
|
||||
}
|
||||
|
||||
@Test(dataProvider = "gradle_version_provider")
|
||||
fun `validateBadSpec as defined task should fail on invalid spec`(gradleVersion: String?) {
|
||||
// Arrange
|
||||
val projectFiles = mapOf(
|
||||
"spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0-invalid.yaml")
|
||||
)
|
||||
withProject(
|
||||
"""
|
||||
| plugins {
|
||||
| id 'org.openapi.generator'
|
||||
| }
|
||||
|
|
||||
| task validateBadSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask) {
|
||||
| inputSpec.set(file("spec.yaml").absolutePath)
|
||||
| }
|
||||
""".trimMargin(), projectFiles
|
||||
)
|
||||
|
||||
// Act
|
||||
val result = getGradleRunner(gradleVersion)
|
||||
.withProjectDir(temp)
|
||||
.withArguments("validateBadSpec")
|
||||
.withPluginClasspath()
|
||||
.buildAndFail()
|
||||
|
||||
// Assert
|
||||
assertTrue(
|
||||
result.output.contains("Spec is invalid."),
|
||||
"Unexpected/no message presented to the user for an invalid spec."
|
||||
)
|
||||
assertEquals(
|
||||
FAILED, result.task(":validateBadSpec")?.outcome,
|
||||
"Expected a failed run, but found ${result.task(":validateBadSpec")?.outcome}"
|
||||
)
|
||||
}
|
||||
|
||||
@Test(dataProvider = "gradle_version_provider")
|
||||
fun `openApiValidate should succeed with recommendations on valid spec`(gradleVersion: String?) {
|
||||
// Arrange
|
||||
val projectFiles = mapOf(
|
||||
"spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0-recommend.yaml")
|
||||
)
|
||||
|
||||
// recommend = true is the default
|
||||
withProject(
|
||||
"""
|
||||
| plugins {
|
||||
| id 'org.openapi.generator'
|
||||
| }
|
||||
|
|
||||
| openApiValidate {
|
||||
| inputSpec = file("spec.yaml").absolutePath
|
||||
| }
|
||||
""".trimMargin(), projectFiles
|
||||
)
|
||||
|
||||
// Act
|
||||
val result = getGradleRunner(gradleVersion)
|
||||
.withProjectDir(temp)
|
||||
.withArguments("openApiValidate")
|
||||
.withPluginClasspath()
|
||||
.build()
|
||||
|
||||
// Assert
|
||||
assertTrue(
|
||||
result.output.contains("Spec is valid."),
|
||||
"Unexpected/no message presented to the user for a valid spec."
|
||||
)
|
||||
assertTrue(
|
||||
result.output.contains("Spec has issues or recommendations."),
|
||||
"Unexpected/no recommendations message presented to the user for a valid spec."
|
||||
)
|
||||
assertEquals(
|
||||
SUCCESS, result.task(":openApiValidate")?.outcome,
|
||||
"Expected a successful run, but found ${result.task(":openApiValidate")?.outcome}"
|
||||
)
|
||||
}
|
||||
|
||||
@Test(dataProvider = "gradle_version_provider")
|
||||
fun `openApiValidate should succeed without recommendations on valid spec`(gradleVersion: String?) {
|
||||
// Arrange
|
||||
val projectFiles = mapOf(
|
||||
"spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0-recommend.yaml")
|
||||
)
|
||||
|
||||
withProject(
|
||||
"""
|
||||
| plugins {
|
||||
| id 'org.openapi.generator'
|
||||
| }
|
||||
|
|
||||
| openApiValidate {
|
||||
| inputSpec = file("spec.yaml").absolutePath
|
||||
| recommend = false
|
||||
| }
|
||||
""".trimMargin(), projectFiles
|
||||
)
|
||||
|
||||
// Act
|
||||
val result = getGradleRunner(gradleVersion)
|
||||
.withProjectDir(temp)
|
||||
.withArguments("openApiValidate")
|
||||
.withPluginClasspath()
|
||||
.build()
|
||||
|
||||
// Assert
|
||||
assertTrue(
|
||||
result.output.contains("Spec is valid."),
|
||||
"Unexpected/no message presented to the user for a valid spec."
|
||||
)
|
||||
assertTrue(
|
||||
result.output.contains("Spec has issues or recommendations.").not(),
|
||||
"Unexpected/recommendations message presented to the user for a valid spec"
|
||||
)
|
||||
assertEquals(
|
||||
SUCCESS, result.task(":openApiValidate")?.outcome,
|
||||
"Expected a successful run, but found ${result.task(":openApiValidate")?.outcome}"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
openapi: "3.0.0"
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
license:
|
||||
name: MIT
|
||||
servers:
|
||||
- url: http://petstore.swagger.io/v1
|
||||
paths:
|
||||
/pets:
|
||||
get:
|
||||
summary: List all pets
|
||||
operationId: listPets
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: limit
|
||||
in: query
|
||||
description: How many items to return at one time (max 100)
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
requestBody: # warning `API GET/HEAD defined with request body`
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
responses:
|
||||
'200':
|
||||
description: A paged array of pets
|
||||
headers:
|
||||
x-next:
|
||||
description: A link to the next page of responses
|
||||
schema:
|
||||
type: string
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
post:
|
||||
summary: Create a pet
|
||||
operationId: createPets
|
||||
tags:
|
||||
- pets
|
||||
responses:
|
||||
'201':
|
||||
description: Null response
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/pets/{petId}:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
operationId: showPetById
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
required: true
|
||||
description: The id of the pet to retrieve
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Expected response to a valid request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
Error:
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
@@ -0,0 +1,109 @@
|
||||
openapi: "3.0.0"
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
license:
|
||||
name: MIT
|
||||
servers:
|
||||
- url: http://petstore.swagger.io/v1
|
||||
paths:
|
||||
/v3/pets:
|
||||
get:
|
||||
summary: List all pets
|
||||
operationId: listPets
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: limit
|
||||
in: query
|
||||
description: How many items to return at one time (max 100)
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: A paged array of pets
|
||||
headers:
|
||||
x-next:
|
||||
description: A link to the next page of responses
|
||||
schema:
|
||||
type: string
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
post:
|
||||
summary: Create a pet
|
||||
operationId: createPets
|
||||
tags:
|
||||
- pets
|
||||
responses:
|
||||
'201':
|
||||
description: Null response
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/v3/pets/{petId}:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
operationId: showPetById
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
required: true
|
||||
description: The id of the pet to retrieve
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Expected response to a valid request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
Error:
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
@@ -137,12 +137,12 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>2.13.0</version>
|
||||
<version>2.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jdk8</artifactId>
|
||||
<version>2.13.0</version>
|
||||
<version>2.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
@@ -94,7 +94,7 @@
|
||||
<!-- dependencies are needed for the client being generated -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
</dependency>
|
||||
@@ -191,13 +191,13 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<swagger-annotations-version>1.6.3</swagger-annotations-version>
|
||||
<swagger-annotations-version>2.2.16</swagger-annotations-version>
|
||||
<jersey-version>2.35</jersey-version>
|
||||
<jackson-version>2.13.0</jackson-version>
|
||||
<jackson-databind-version>2.13.0</jackson-databind-version>
|
||||
<jackson-databind-nullable-version>0.2.1</jackson-databind-nullable-version>
|
||||
<jackson-version>2.15.2</jackson-version>
|
||||
<jackson-databind-version>2.15.2</jackson-databind-version>
|
||||
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
|
||||
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<scribejava-apis-version>8.3.1</scribejava-apis-version>
|
||||
<scribejava-apis-version>8.3.3</scribejava-apis-version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
@@ -232,7 +232,7 @@
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.8</swagger-annotations-version>
|
||||
<jersey-version>2.27</jersey-version>
|
||||
<jackson-version>2.9.10</jackson-version>
|
||||
<jackson-version>2.15.2</jackson-version>
|
||||
<jackson-databind-nullable-version>0.2.0</jackson-databind-nullable-version>
|
||||
<jodatime-version>2.7</jodatime-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -147,7 +147,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.scribejava</groupId>
|
||||
<artifactId>scribejava-apis</artifactId>
|
||||
<version>8.3.1</version>
|
||||
<version>8.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.tomitribe</groupId>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.8</swagger-annotations-version>
|
||||
<jersey-version>2.35</jersey-version>
|
||||
<jackson-version>2.13.0</jackson-version>
|
||||
<jackson-version>2.15.2</jackson-version>
|
||||
<jackson-databind-nullable-version>0.2.1</jackson-databind-nullable-version>
|
||||
<jodatime-version>2.7</jodatime-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -1,130 +1,135 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>sample-project</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>sample-project</name>
|
||||
<url>https://maven.apache.org</url>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>sample-project</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>sample-project</name>
|
||||
<url>https://maven.apache.org</url>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.6</version>
|
||||
</parent>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- activate the plugin -->
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>spring-server</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- specify the swagger yaml -->
|
||||
<inputSpec>${project.basedir}/swagger.yaml</inputSpec>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.15</version>
|
||||
</parent>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- activate the plugin -->
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>spring-server</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- specify the swagger yaml -->
|
||||
<inputSpec>${project.basedir}/swagger.yaml</inputSpec>
|
||||
|
||||
<!-- target to generate java server code -->
|
||||
<generatorName>spring</generatorName>
|
||||
<!-- target to generate java server code -->
|
||||
<generatorName>spring</generatorName>
|
||||
|
||||
<!-- hint: if you want to generate java client code
|
||||
you can use the following generator: <generatorName>java</generatorName> -->
|
||||
<!-- hint: if you want to generate java client code
|
||||
you can use the following generator: <generatorName>java</generatorName> -->
|
||||
|
||||
<!-- pass any necessary config options -->
|
||||
<configOptions>
|
||||
<documentationProvider>springfox</documentationProvider>
|
||||
<serializableModel>true</serializableModel>
|
||||
<snapshotVersion>true</snapshotVersion>
|
||||
</configOptions>
|
||||
<!-- pass any necessary config options -->
|
||||
<configOptions>
|
||||
<documentationProvider>springfox</documentationProvider>
|
||||
<serializableModel>true</serializableModel>
|
||||
<snapshotVersion>true</snapshotVersion>
|
||||
</configOptions>
|
||||
|
||||
</configuration>
|
||||
</execution>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<proc>none</proc>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>sonatype-snapshots</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<dependencies>
|
||||
<!-- dependencies are needed for the client being generated -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- You can find the dependencies for the library configuration you chose by looking in JavaClientCodegen.
|
||||
Then find the corresponding dependency on Maven Central, and set the versions in the property section below -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
</dependency>
|
||||
<!--SpringFox dependencies -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>${springfox-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${springfox-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.2.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>jackson-databind-nullable</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
<!-- Bean Validation API support -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.8</swagger-annotations-version>
|
||||
<springfox-version>2.8.0</springfox-version>
|
||||
</properties>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.11.0</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<proc>none</proc>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>sonatype-snapshots</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
</dependency>
|
||||
<!--SpringFox dependencies -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>${springfox.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>swagger-ui</artifactId>
|
||||
<version>${swagger-ui.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>webjars-locator-core</artifactId>
|
||||
</dependency>
|
||||
<!-- @Nullable annotation -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-yaml</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>jackson-databind-nullable</artifactId>
|
||||
<version>0.2.6</version>
|
||||
</dependency>
|
||||
<!-- Bean Validation API support -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<springfox.version>2.9.2</springfox.version>
|
||||
<swagger-ui.version>4.15.5</swagger-ui.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.0.1-SNAPSHOT</version>
|
||||
<version>7.1.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
invoker.goals = -nsu clean generate-sources
|
||||
# The expected result of the build, possible values are "success" (default) and "failure"
|
||||
invoker.buildResult = success
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user