mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-05 14:06:11 +00:00
Compare commits
145 Commits
v6.2.1
...
ts-koa2-se
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d22b920c7a | ||
|
|
eddca32366 | ||
|
|
828309d74a | ||
|
|
031f0dcee6 | ||
|
|
95198dd34b | ||
|
|
625a7233e2 | ||
|
|
71a7a822f4 | ||
|
|
028b38d43b | ||
|
|
34b343ff80 | ||
|
|
7b64fbb800 | ||
|
|
e6702c5edc | ||
|
|
02d4852f26 | ||
|
|
851ddecda3 | ||
|
|
45b1f91807 | ||
|
|
5300bff6d9 | ||
|
|
82971ccd48 | ||
|
|
c45814a7ea | ||
|
|
9450984af8 | ||
|
|
344c49dd51 | ||
|
|
ab59e68f1e | ||
|
|
0cf5ed619d | ||
|
|
6800905123 | ||
|
|
1cda5462f9 | ||
|
|
2a33229158 | ||
|
|
081a6ef466 | ||
|
|
d90c9a6f3b | ||
|
|
a47b95a749 | ||
|
|
c3b9bd7459 | ||
|
|
a57fb9e109 | ||
|
|
c4b2c81c05 | ||
|
|
5d7956293b | ||
|
|
11d31117a8 | ||
|
|
1fad61e2f8 | ||
|
|
b8b25e8ae0 | ||
|
|
1b344597bf | ||
|
|
fdf1ce6c51 | ||
|
|
6686ba2dc7 | ||
|
|
f2321a61d3 | ||
|
|
d06ab43dd6 | ||
|
|
2524e8fb0a | ||
|
|
811e0de1be | ||
|
|
63629ad51c | ||
|
|
cbbe243bde | ||
|
|
f32bf510c0 | ||
|
|
ffaf173db1 | ||
|
|
4e387cad53 | ||
|
|
0103d400c2 | ||
|
|
d6e7f70cb4 | ||
|
|
94dccae82d | ||
|
|
22bd3e31dc | ||
|
|
c62ebc377e | ||
|
|
e2e28a7e0e | ||
|
|
28ae689615 | ||
|
|
bd79231d6b | ||
|
|
12fd115af3 | ||
|
|
77e06466db | ||
|
|
792d44d797 | ||
|
|
a92afd239f | ||
|
|
b8c8f4a032 | ||
|
|
6c9246ca3d | ||
|
|
c5e79681c5 | ||
|
|
12a6ea7beb | ||
|
|
61700fd42c | ||
|
|
3a26da76b0 | ||
|
|
fabd0a8be2 | ||
|
|
9f8ed6b0e2 | ||
|
|
e93906eaea | ||
|
|
d5ce79ac24 | ||
|
|
e32b7a41b6 | ||
|
|
57644b6817 | ||
|
|
f9d4d28f48 | ||
|
|
90a8b4effb | ||
|
|
9220e72674 | ||
|
|
76d8119150 | ||
|
|
743202241e | ||
|
|
980062f2bb | ||
|
|
6bb6f1b28a | ||
|
|
3eb90a69e6 | ||
|
|
dc1b2ed9e0 | ||
|
|
09c070a27e | ||
|
|
743d2cde7f | ||
|
|
d74cefba83 | ||
|
|
906ec5dfa3 | ||
|
|
871eda2731 | ||
|
|
a96777b6f4 | ||
|
|
903ff0ba47 | ||
|
|
67067b1b3c | ||
|
|
2a7b3cd4b9 | ||
|
|
4487042f0d | ||
|
|
95b566a3a9 | ||
|
|
8e98bff934 | ||
|
|
9039c83bc4 | ||
|
|
1748d03fb9 | ||
|
|
1f7824c083 | ||
|
|
74441fde9f | ||
|
|
40e04df096 | ||
|
|
e25f8c5d61 | ||
|
|
5e50ff47b0 | ||
|
|
92ecee8c27 | ||
|
|
77226981b6 | ||
|
|
42264aadd7 | ||
|
|
e882421ff3 | ||
|
|
2e44e78474 | ||
|
|
4a5c9ff2d2 | ||
|
|
188c39dccd | ||
|
|
1670e952ff | ||
|
|
f81eb7e6f0 | ||
|
|
01f0763ec3 | ||
|
|
f1b8190b19 | ||
|
|
7ad9f835ff | ||
|
|
d8bed4228d | ||
|
|
4667b7e471 | ||
|
|
ca5d9b5e69 | ||
|
|
099a96b1ad | ||
|
|
d80cd099ca | ||
|
|
6a7b8fcebe | ||
|
|
3eec4eb326 | ||
|
|
7a17d3dc55 | ||
|
|
9f1fa0e440 | ||
|
|
3dc8403e10 | ||
|
|
363906fda3 | ||
|
|
b35ea31e82 | ||
|
|
d5f896fe20 | ||
|
|
865958c480 | ||
|
|
2e0e010f3a | ||
|
|
c35140cbc3 | ||
|
|
6a1acd89a1 | ||
|
|
a020170ff3 | ||
|
|
5221682086 | ||
|
|
c3abdb6c57 | ||
|
|
c71ec554dc | ||
|
|
d2a9da5061 | ||
|
|
4a7a2f5e6d | ||
|
|
bfcb3864a7 | ||
|
|
0d1e31324b | ||
|
|
89fc631125 | ||
|
|
06354d5f7d | ||
|
|
32a5e88ba9 | ||
|
|
2947d147b4 | ||
|
|
3bd2a611bf | ||
|
|
c81c131c46 | ||
|
|
838212eefb | ||
|
|
8548a63d96 | ||
|
|
506ca21782 | ||
|
|
4d03c9272b |
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -16,5 +16,5 @@
|
||||
These must match the expectations made by your contribution.
|
||||
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
|
||||
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.1.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks)
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.3.0) (minor release - breaking changes with fallbacks), `7.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.
|
||||
|
||||
2
.github/workflows/samples-dotnet.yaml
vendored
2
.github/workflows/samples-dotnet.yaml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v3.0.3
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
dotnet-version: '7.0.x'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
|
||||
44
.github/workflows/samples-java-client-echo-api-jdk11.yaml
vendored
Normal file
44
.github/workflows/samples-java-client-echo-api-jdk11.yaml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Java Client (Echo API) JDK11
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/java/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/java/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Client JDK11
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/java/apache-httpclient
|
||||
- samples/client/echo_api/java/native
|
||||
- samples/client/echo_api/java/feign-gson
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- 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: Setup node.js
|
||||
uses: actions/setup-node@v3
|
||||
- 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: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package
|
||||
@@ -7,6 +7,7 @@ on:
|
||||
- samples/client/petstore/jaxrs-cxf-client/**
|
||||
- samples/client/petstore/java-micronaut-client/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
|
||||
- samples/openapi3/client/petstore/java/native/**
|
||||
pull_request:
|
||||
paths:
|
||||
@@ -14,6 +15,7 @@ on:
|
||||
- samples/client/petstore/jaxrs-cxf-client/**
|
||||
- samples/client/petstore/java-micronaut-client/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
|
||||
- samples/openapi3/client/petstore/java/native/**
|
||||
jobs:
|
||||
build:
|
||||
@@ -34,7 +36,7 @@ jobs:
|
||||
- samples/client/petstore/java/resttemplate
|
||||
- samples/client/petstore/java/resttemplate-withXml
|
||||
- samples/client/petstore/java/webclient
|
||||
- samples/client/petstore/java/webclient-nulable-arrays
|
||||
- samples/client/petstore/java/webclient-nullable-arrays
|
||||
- samples/client/petstore/java/vertx
|
||||
- samples/client/petstore/java/jersey2-java8-localdatetime
|
||||
- samples/client/petstore/java/resteasy
|
||||
@@ -48,6 +50,9 @@ jobs:
|
||||
- samples/client/petstore/java/jersey1
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
|
||||
- samples/openapi3/client/petstore/java/native
|
||||
- samples/client/petstore/java/okhttp-gson-swagger1/
|
||||
- samples/client/petstore/java/resttemplate-swagger1/
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
|
||||
49
.github/workflows/samples-java-server-jdk8.yaml
vendored
Normal file
49
.github/workflows/samples-java-server-jdk8.yaml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Samples Java Server
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
# java-camel is tested locally for the time being
|
||||
#- 'samples/server/petstore/java-camel/**'
|
||||
- 'samples/server/petstore/java-vertx-web/**'
|
||||
- 'samples/server/petstore/java-inflector/**'
|
||||
- 'samples/server/petstore/java-pkmst/**'
|
||||
- 'samples/server/petstore/java-undertow/**'
|
||||
pull_request:
|
||||
paths:
|
||||
#- 'samples/server/petstore/java-camel/**'
|
||||
- 'samples/server/petstore/java-vertx-web/**'
|
||||
- 'samples/server/petstore/java-inflector/**'
|
||||
- 'samples/server/petstore/java-pkmst/**'
|
||||
- 'samples/server/petstore/java-undertow/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Server
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
#- samples/server/petstore/java-camel/
|
||||
- samples/server/petstore/java-vertx-web/
|
||||
- samples/server/petstore/java-inflector/
|
||||
- samples/server/petstore/java-pkmst/
|
||||
- samples/server/petstore/java-undertow/
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- 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-kotlin-client.yaml
vendored
2
.github/workflows/samples-kotlin-client.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Samples Kotlin cilent
|
||||
name: Samples Kotlin client
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
4
.github/workflows/samples-php8.yaml
vendored
4
.github/workflows/samples-php8.yaml
vendored
@@ -3,10 +3,10 @@ name: Samples PHP 8.x
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build PHP projects
|
||||
|
||||
31
.github/workflows/samples-rust.yaml
vendored
Normal file
31
.github/workflows/samples-rust.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Samples Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/rust/**'
|
||||
- 'samples/server/petstore/rust-server/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/rust/**'
|
||||
- 'samples/server/petstore/rust-server/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Rust
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# these folders contain sub-projects of rust clients, servers
|
||||
- samples/client/petstore/rust/
|
||||
- samples/server/petstore/rust-server/
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: cargo build
|
||||
@@ -12,7 +12,7 @@
|
||||
## customise it to your individual needs - from themes to extensions, you
|
||||
## have full control.
|
||||
##
|
||||
## The easiest way to try out Gitpod is install the browser extenion:
|
||||
## The easiest way to try out Gitpod is install the browser extension:
|
||||
## 'https://www.gitpod.io/docs/browser-extension' or by prefixing
|
||||
## 'https://gitpod.io#' to the source control URL of any project.
|
||||
##
|
||||
|
||||
10
.travis.yml
10
.travis.yml
@@ -160,8 +160,8 @@ after_success:
|
||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishMavenJavaPublicationToNexusRepository closeAndReleaseRepository --no-daemon;
|
||||
echo "Finished ./gradlew publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository";
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository;
|
||||
echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository";
|
||||
popd;
|
||||
elif [ -z $TRAVIS_TAG ] && [[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then
|
||||
echo "Publishing from branch $TRAVIS_BRANCH";
|
||||
@@ -169,15 +169,15 @@ after_success:
|
||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository --no-daemon;
|
||||
echo "Finished ./gradlew publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository";
|
||||
./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository;
|
||||
echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository";
|
||||
popd;
|
||||
fi;
|
||||
if [ -n $TRAVIS_TAG ] && [[ "$TRAVIS_TAG" =~ ^[v][0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "Publishing the gradle plugin to Gradle Portal on tag $TRAVIS_TAG (only)";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET --no-daemon;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET;
|
||||
echo "Finished ./gradlew publishPlugins (plugin portal)";
|
||||
popd;
|
||||
fi;
|
||||
|
||||
@@ -53,9 +53,9 @@ elif [ "$NODE_INDEX" = "3" ]; then
|
||||
#./configure --enable-optimizations
|
||||
#sudo make altinstall
|
||||
pyenv install --list
|
||||
pyenv install 3.6.3
|
||||
pyenv install 3.7.12
|
||||
pyenv install 2.7.14
|
||||
pyenv global 3.6.3
|
||||
pyenv global 3.7.12
|
||||
|
||||
# Install node@stable (for angular 6)
|
||||
set +e
|
||||
|
||||
20
README.md
20
README.md
@@ -9,7 +9,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`6.2.1`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`6.3.0`):
|
||||
[](https://travis-ci.com/OpenAPITools/openapi-generator)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
|
||||
@@ -59,6 +59,7 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
|
||||
[<img src="https://openapi-generator.tech/img/companies/mergedev.jpeg" width="128" height="128">](https://www.merge.dev/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<img src="https://openapi-generator.tech/img/companies/burkert.jpg" width="128" height="128">](https://www.burkert.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
|
||||
[<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)
|
||||
|
||||
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS and Checkly for sponsoring the API monitoring
|
||||
|
||||
@@ -115,9 +116,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
| OpenAPI Generator Version | Release Date | Notes |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| 7.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.0-SNAPSHOT/) | Feb/Mar 2023 | Major release with breaking changes (no fallback) |
|
||||
| 6.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.3.0-SNAPSHOT/) | 24.11.2022 | Minor release with breaking changes (with fallback) |
|
||||
| 6.2.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.2.1-SNAPSHOT/) | 24.10.2022 | Patch release (enhancements, bug fixes, etc) |
|
||||
| [6.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.2.0) (latest stable release) | 24.09.2022 | Minor release with breaking changes (with fallback) |
|
||||
| 6.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.3.0-SNAPSHOT/) | 05.12.2022 | Minor release with breaking changes (with fallback) |
|
||||
| [6.2.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.2.1) (latest stable release) | 01.11.2022 | Patch release (enhancements, bug fixes, etc) |
|
||||
| [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) |
|
||||
|
||||
@@ -175,16 +175,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 8 runtime at a minimum):
|
||||
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.0/openapi-generator-cli-6.2.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.0/openapi-generator-cli-6.2.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.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/6.2.0/openapi-generator-cli-6.2.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -409,7 +409,7 @@ openapi-generator-cli version
|
||||
To use a specific version of "openapi-generator-cli"
|
||||
|
||||
```sh
|
||||
openapi-generator-cli version-manager set 6.2.0
|
||||
openapi-generator-cli version-manager set 6.2.1
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -433,7 +433,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/6.2.0/openapi-generator-cli-6.2.0.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.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`
|
||||
@@ -877,6 +877,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2022-10-01 - [OpenAPI Generatorをカスタマイズしたコードを生成する(Swagger Codegenとほぼ同じ)](https://nainaistar.hatenablog.com/entry/2022/10/03/120000) by [きり丸](https://twitter.com/nainaistar)
|
||||
- 2022-10-21 - [Kotlin(Spring Boot)の API を OpenAPI Generator で自動生成](https://zenn.dev/msksgm/articles/20221021-kotlin-spring-openapi-generator) by [msksgm](https://zenn.dev/msksgm)
|
||||
- 2022-10-26 - [Quarkus Insights #106: Quarkiverse Extension Spotlight: OpenApi Generator](https://www.youtube.com/watch?v=_s_if69t2iQ) by [Quarkusio](https://www.youtube.com/c/Quarkusio)
|
||||
- 2022-11-28 - [The REST API implementation flow](https://tmsvr.com/openapi-code-generation-for-rest-apis/) by [Imre Tömösvári](https://tmsvr.com/author/imre/)
|
||||
- 2022-12-13 - [API-First with Spring WebFlux and OpenAPI Generator](https://boottechnologies-ci.medium.com/api-first-with-spring-webflux-and-openapi-generator-38b7804c4ed4) by [Eric Anicet](https://boottechnologies-ci.medium.com/)
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
|
||||
|
||||
28
appveyor.yml
28
appveyor.yml
@@ -1,5 +1,5 @@
|
||||
version: '{branch}-{build}'
|
||||
image: Visual Studio 2019
|
||||
image: Visual Studio 2022
|
||||
hosts:
|
||||
petstore.swagger.io: 127.0.0.1
|
||||
install:
|
||||
@@ -15,14 +15,14 @@ install:
|
||||
# install gradle
|
||||
- ps: |
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
if (!(Test-Path -Path "C:\gradle\gradle-5.6.4" )) {
|
||||
if (!(Test-Path -Path "C:\gradle\gradle-7.6" )) {
|
||||
(new-object System.Net.WebClient).DownloadFile(
|
||||
'https://services.gradle.org/distributions/gradle-5.6.4-bin.zip',
|
||||
'https://services.gradle.org/distributions/gradle-7.6-bin.zip',
|
||||
'C:\gradle-bin.zip'
|
||||
)
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\gradle-bin.zip", "C:\gradle")
|
||||
}
|
||||
- cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-5.6.4\bin;%JAVA_HOME%\bin;%PATH%
|
||||
- cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-7.6\bin;%JAVA_HOME%\bin;%PATH%
|
||||
- cmd: SET MAVEN_OPTS=-Xmx4g
|
||||
- cmd: SET JAVA_OPTS=-Xmx4g
|
||||
- cmd: SET M2_HOME=C:\maven\apache-maven-3.8.3
|
||||
@@ -61,12 +61,12 @@ build_script:
|
||||
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-net5.0\Org.OpenAPITools.sln
|
||||
# build C# API client (.net 5.0 with ConditionalSerialization)
|
||||
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln
|
||||
# build C# API client
|
||||
- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln
|
||||
- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
# build C# API client (with PropertyChanged)
|
||||
- nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln
|
||||
- msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
## build C# API client
|
||||
#- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln
|
||||
#- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
## build C# API client (with PropertyChanged)
|
||||
#- nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln
|
||||
#- msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
# build C# .net standard 1.3+ API client
|
||||
#- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln
|
||||
#- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
@@ -92,10 +92,10 @@ test_script:
|
||||
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-net5.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
# test C# API Client using conditional-serialization
|
||||
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
# test c# API client
|
||||
- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||
# test c# API client (with PropertyChanged)
|
||||
- nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||
## test c# API client
|
||||
#- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||
## test c# API client (with PropertyChanged)
|
||||
#- nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||
|
||||
### TODO: Execute all generators via powershell or other
|
||||
# generate all petstore clients
|
||||
|
||||
@@ -6,4 +6,4 @@ additionalProperties:
|
||||
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
|
||||
aspnetCoreVersion: "6.0"
|
||||
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
|
||||
useSeperateModelProject: true
|
||||
useSeparateModelProject: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
generatorName: c
|
||||
outputDir: samples/client/petstore/c
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/C-libcurl
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
generatorName: crystal
|
||||
outputDir: samples/client/petstore/crystal
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/crystal/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/crystal
|
||||
additionalProperties:
|
||||
shardVersion: 1.0.0
|
||||
|
||||
@@ -8,5 +8,5 @@ additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
useCompareNetObjects: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
targetFramework: net6.0
|
||||
targetFramework: net7.0
|
||||
nullableReferenceTypes: true
|
||||
|
||||
@@ -8,5 +8,5 @@ additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
useCompareNetObjects: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
targetFramework: net6.0
|
||||
targetFramework: net7.0
|
||||
nullableReferenceTypes: false
|
||||
|
||||
@@ -8,4 +8,4 @@ additionalProperties:
|
||||
useCompareNetObjects: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
useOneOfDiscriminatorLookup: true
|
||||
targetFramework: net5.0
|
||||
targetFramework: net7.0
|
||||
|
||||
8
bin/configs/java-apache-httpclient-echo-api.yaml
Normal file
8
bin/configs/java-apache-httpclient-echo-api.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/echo_api/java/apache-httpclient
|
||||
library: apache-httpclient
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: echo-api-apache-httpclient
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/apache-httpclient
|
||||
library: apache-httpclient
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-apache-httpclient
|
||||
|
||||
@@ -12,6 +12,6 @@ additionalProperties:
|
||||
library: "spring-boot"
|
||||
withXml: true
|
||||
jackson: true
|
||||
camelUseDefaultValidationtErrorProcessor: true
|
||||
camelUseDefaultValidationErrorProcessor: true
|
||||
camelRestClientRequestValidation: true
|
||||
camelSecurityDefinitions: true
|
||||
|
||||
9
bin/configs/java-feign-gson-echo-api.yaml
Normal file
9
bin/configs/java-feign-gson-echo-api.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/echo_api/java/feign-gson
|
||||
library: feign
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
serializationLibrary: gson
|
||||
artifactId: echo-api-feign-json
|
||||
hideGenerationTimestamp: "true"
|
||||
14
bin/configs/java-jersey2-8-swagger1.yaml
Normal file
14
bin/configs/java-jersey2-8-swagger1.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
generatorName: java
|
||||
outputDir: samples/openapi3/client/petstore/java/jersey2-java8-swagger1
|
||||
library: jersey2
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-openapi3-jersey2-java8
|
||||
hideGenerationTimestamp: true
|
||||
serverPort: "8082"
|
||||
dateLibrary: java8
|
||||
useOneOfDiscriminatorLookup: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
gradleProperties: "\n# JVM arguments\norg.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m\n# set timeout\norg.gradle.daemon.idletimeout=3600000\n# show all warnings\norg.gradle.warning.mode=all"
|
||||
annotationLibrary: "swagger1"
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/native-async
|
||||
library: native
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-native
|
||||
|
||||
8
bin/configs/java-native-echo-api.yaml
Normal file
8
bin/configs/java-native-echo-api.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/echo_api/java/native
|
||||
library: native
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: echo-api-native
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/native
|
||||
library: native
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-native
|
||||
|
||||
12
bin/configs/java-okhttp-gson-swagger1.yaml
Normal file
12
bin/configs/java-okhttp-gson-swagger1.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/okhttp-gson-swagger1
|
||||
library: okhttp-gson
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-okhttp-gson
|
||||
hideGenerationTimestamp: "true"
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
annotationLibrary: "swagger1"
|
||||
|
||||
10
bin/configs/java-resttemplate-swagger1.yaml
Normal file
10
bin/configs/java-resttemplate-swagger1.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/resttemplate-swagger1
|
||||
library: resttemplate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-resttemplate
|
||||
hideGenerationTimestamp: "true"
|
||||
annotationLibrary: "swagger1"
|
||||
java8: true
|
||||
@@ -1,5 +1,5 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/webclient-nulable-arrays
|
||||
outputDir: samples/client/petstore/java/webclient-nullable-arrays
|
||||
library: webclient
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/schema-with-nullable-arrays.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
generatorName: php-symfony
|
||||
outputDir: samples/server/petstore/php-symfony/SymfonyBundle-php
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/php-symfony/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/php-symfony
|
||||
gitUserId: openapitools
|
||||
gitRepoId: petstore
|
||||
|
||||
7
bin/configs/python-nextgen-aiohttp.yaml
Normal file
7
bin/configs/python-nextgen-aiohttp.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: python-nextgen
|
||||
outputDir: samples/openapi3/client/petstore/python-nextgen-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-nextgen
|
||||
library: asyncio
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
8
bin/configs/python-nextgen.yaml
Normal file
8
bin/configs/python-nextgen.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: python-nextgen
|
||||
outputDir: samples/openapi3/client/petstore/python-nextgen
|
||||
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-nextgen
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
11
bin/configs/rust-reqwest-petstore-async-middleware.yaml
Normal file
11
bin/configs/rust-reqwest-petstore-async-middleware.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
generatorName: rust
|
||||
outputDir: samples/client/petstore/rust/reqwest/petstore-async-middleware
|
||||
library: reqwest
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/rust
|
||||
additionalProperties:
|
||||
supportAsync: true
|
||||
supportMiddleware: true
|
||||
supportMultipleResponses: true
|
||||
packageName: petstore-reqwest-async-middleware
|
||||
useSingleRequestParameter: true
|
||||
@@ -1,6 +1,6 @@
|
||||
generatorName: swift5
|
||||
outputDir: samples/client/petstore/swift5/deprecated
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-deprecated-fields.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/swift5
|
||||
generateAliasAsModel: true
|
||||
additionalProperties:
|
||||
|
||||
10
bin/configs/swift5-validation.yaml
Normal file
10
bin/configs/swift5-validation.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
generatorName: swift5
|
||||
outputDir: samples/client/petstore/swift5/validation
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/validation.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/swift5
|
||||
generateAliasAsModel: true
|
||||
additionalProperties:
|
||||
podAuthors: ""
|
||||
podSummary: PetstoreClient
|
||||
projectName: PetstoreClient
|
||||
podHomepage: https://github.com/openapitools/openapi-generator
|
||||
7
bin/configs/typescript-angular-v15-provided-in-root.yaml
Normal file
7
bin/configs/typescript-angular-v15-provided-in-root.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 15.0.3
|
||||
supportsES6: true
|
||||
4
bin/configs/typescript-fetch-allOf-nullable.yaml
Normal file
4
bin/configs/typescript-fetch-allOf-nullable.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
generatorName: typescript-fetch
|
||||
outputDir: samples/client/petstore/typescript-fetch/builds/allOf-nullable
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf-nullable.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-fetch
|
||||
8
bin/configs/typescript-koa-server.yaml
Normal file
8
bin/configs/typescript-koa-server.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: typescript-koa-server
|
||||
outputDir: samples/server/petstore/typescript-koa-server
|
||||
#outputDir: /Users/williamcheng/Code/typescript/PetStore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/typescript-koa-server/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-koa-server
|
||||
additionalProperties:
|
||||
ngVersion: 15.0.3
|
||||
supportsES6: true
|
||||
@@ -1,8 +1,11 @@
|
||||
---
|
||||
# csharp-netcore test files and image for upload
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs"
|
||||
sha256: aaa596db60531417994533b0e7962eca21dcaf8fa3aea1e2e3cb8b1b216cb89f
|
||||
sha256: 054adb6efaff70f492e471cb3e4d628d22cda814906808fd3fcce36ce710b7ee
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs"
|
||||
sha256: dae985015ba461297927d544a78267f2def35e07c3f14ca66468fd61e1fd1c26
|
||||
sha256: ff6a5fccd4c026d85fe7232911cda445f5065dcefd03abe258e19af5b28d05c5
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png"
|
||||
sha256: 0a67c32728197e942b13bdda064b73793f12f5c795f1e5cf35a3adf69c973230
|
||||
# java okhttp gson test files
|
||||
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java"
|
||||
sha256: db505f7801fef62c13a08a8e9ca1fc4c5c947ab46b46f12943139d353feacf17
|
||||
|
||||
13
bitrise.yml
13
bitrise.yml
@@ -10,18 +10,18 @@ trigger_map:
|
||||
workflows:
|
||||
primary:
|
||||
steps:
|
||||
- git-clone@4.0.17: {}
|
||||
- brew-install@0.11.0:
|
||||
- git-clone@6.2.1: {}
|
||||
- brew-install@0.12.1:
|
||||
inputs:
|
||||
- packages: maven
|
||||
- script@1.1.6:
|
||||
- script@1.2.0:
|
||||
title: Install Cocoapods
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo gem install cocoapods
|
||||
- script@1.1.6:
|
||||
- script@1.2.0:
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
@@ -30,7 +30,7 @@ workflows:
|
||||
|
||||
mvn --no-snapshot-updates package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
title: Build openapi-generator
|
||||
- script@1.1.6:
|
||||
- script@1.2.0:
|
||||
title: Run Swift5 tests
|
||||
inputs:
|
||||
- content: |
|
||||
@@ -40,3 +40,6 @@ workflows:
|
||||
|
||||
./samples/client/petstore/swift5/swift5_test_all.sh
|
||||
|
||||
meta:
|
||||
bitrise.io:
|
||||
stack: osx-xcode-14.1.x
|
||||
|
||||
@@ -56,7 +56,7 @@ The above configuration will do the following:
|
||||
* Compile a user-provided `my_custom_templates/api_interfaces.mustache` following our usual API template compilation logic. That is, one file will be created per API; APIs are generated defined according to tags in your spec documentation. The destination filename of `Interface.kt` will act as a suffix for the filename. So, a tag of `Equipment` will output a corresponding `EquipmentInterface.kt`.
|
||||
* Because `api.mustache` is the same mustache filename as used in your target generator (`kotlin` in this example), we support the following:
|
||||
- The destination filename provides a suffix for the generated output. APIs generate per tag in your specification. So, a tag of `Equipment` will output a corresponding `EquipmentImpl.kt`. This option will be used whether `api.mustache` targets a user customized template or a built-in template.
|
||||
- The built-in template will be used if you haven't provided an customized template. The kotlin generator defines the suffix as simply `.kt`, so this scenario would modify only the generated file suffixes according to the previous bullet point.
|
||||
- The built-in template will be used if you haven't provided a customized template. The kotlin generator defines the suffix as simply `.kt`, so this scenario would modify only the generated file suffixes according to the previous bullet point.
|
||||
- Your `api.mustache` will be used if it exists in your custom template directory. For generators with library options, such as `jvm-okhttp3` in the kotlin generator, your file must exist in the same relative location as the embedded template. For kotlin using the `jvm-okhttp3` library option, this file would need to be located at `my_custom_templates/libraries/jvm-okhttp/api.mustache`. See [templating](./templating.md) for more details.
|
||||
* Compile `my_custom_templates/other/check.mustache` with the supporting files bundle, and output to `scripts/check.sh` in your output directory. Note that we don't currently support setting file flags on output, so scripts such as these will either have to be sourced rather than executed, or have file flags set separately after generation (external to our tooling).
|
||||
|
||||
@@ -169,7 +169,7 @@ If you publish your artifact to a distant maven repository, do not forget to add
|
||||
|
||||
You may not want to generate *all* models in your project. Likewise, you may want just one or two apis to be written. If that's the case, you can use system properties or [global properties](./global-properties.md) to control the output.
|
||||
|
||||
The default is generate *everything* supported by the specific library. Once you enable a feature, it will restrict the contents generated:
|
||||
The default is to generate *everything* supported by the specific library. Once you enable a feature, it will restrict the contents generated:
|
||||
|
||||
```sh
|
||||
# generate only models
|
||||
@@ -397,7 +397,7 @@ or
|
||||
|
||||
## Schema Mapping
|
||||
|
||||
One can map the schema to someting else (e.g. external objects/models outside of the package) using the `schemaMappings` option, e.g. in CLI
|
||||
One can map the schema to something else (e.g. external objects/models outside of the package) using the `schemaMappings` option, e.g. in CLI
|
||||
```sh
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/type-alias.yaml -o /tmp/java2/ --schema-mapping TypeAlias=foo.bar.TypeAlias
|
||||
```
|
||||
@@ -430,15 +430,24 @@ paths:
|
||||
|
||||
## Inline Schema Naming
|
||||
|
||||
Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option, e.g. in CLI
|
||||
Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option. For exmaple, run the following,
|
||||
|
||||
```
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings inline_object_2=SomethingMapped,inline_object_4=nothing_new
|
||||
```
|
||||
will show the following in the console:
|
||||
```
|
||||
[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as arbitraryObjectRequestBodyProperty_request. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI).
|
||||
[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as meta_200_response. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI).
|
||||
```
|
||||
For example, to name the inline schema `meta_200_response` as `MetaObject`, use the `--inline-schema-name-mappings` option as follows:
|
||||
```
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings meta_200_response=MetaObject,arbitraryObjectRequestBodyProperty_request=ArbitraryRequest
|
||||
```
|
||||
|
||||
Another useful option is `inlineSchemaNameDefaults`, which allows you to customize the suffix of the auto-generated inline schema name, e.g. in CLI
|
||||
```
|
||||
--inline-schema-name-defaults arrayItemSuffix=_array_item
|
||||
--inline-schema-name-defaults arrayItemSuffix=_array_item,mapItemSuffix=_map_item
|
||||
```
|
||||
|
||||
Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment.
|
||||
Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas.
|
||||
|
||||
@@ -52,6 +52,7 @@ The following generators are available:
|
||||
* [powershell (beta)](generators/powershell.md)
|
||||
* [python](generators/python.md)
|
||||
* [python-legacy](generators/python-legacy.md)
|
||||
* [python-nextgen (beta)](generators/python-nextgen.md)
|
||||
* [python-prior](generators/python-prior.md)
|
||||
* [r](generators/r.md)
|
||||
* [ruby](generators/ruby.md)
|
||||
|
||||
@@ -51,7 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useDefaultRouting|Use default routing for the ASP.NET Core version.| |true|
|
||||
|useFrameworkReference|Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.| |false|
|
||||
|useNewtonsoft|Uses the Newtonsoft JSON library.| |true|
|
||||
|useSeperateModelProject|Create a seperate project for models| |false|
|
||||
|useSeparateModelProject|Create a separate project for models| |false|
|
||||
|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
@@ -42,7 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|releaseNote|Release note, default to 'Minor update'.| |Minor update|
|
||||
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
|
||||
|sourceFolder|source folder for generated code| |src|
|
||||
|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|<dl><dt>**netstandard1.3**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**netstandard1.4**</dt><dd>.NET Standard 1.4 compatible</dd><dt>**netstandard1.5**</dt><dd>.NET Standard 1.5 compatible</dd><dt>**netstandard1.6**</dt><dd>.NET Standard 1.6 compatible</dd><dt>**netstandard2.0**</dt><dd>.NET Standard 2.0 compatible</dd><dt>**netstandard2.1**</dt><dd>.NET Standard 2.1 compatible</dd><dt>**netcoreapp3.1**</dt><dd>.NET Core 3.1 compatible</dd><dt>**net47**</dt><dd>.NET Framework 4.7 compatible</dd><dt>**net48**</dt><dd>.NET Framework 4.8 compatible</dd><dt>**net5.0**</dt><dd>.NET 5.0 compatible</dd><dt>**net6.0**</dt><dd>.NET 6.0 compatible</dd></dl>|netstandard2.0|
|
||||
|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|<dl><dt>**netstandard1.3**</dt><dd>.NET Standard 1.3 compatible</dd><dt>**netstandard1.4**</dt><dd>.NET Standard 1.4 compatible</dd><dt>**netstandard1.5**</dt><dd>.NET Standard 1.5 compatible</dd><dt>**netstandard1.6**</dt><dd>.NET Standard 1.6 compatible</dd><dt>**netstandard2.0**</dt><dd>.NET Standard 2.0 compatible</dd><dt>**netstandard2.1**</dt><dd>.NET Standard 2.1 compatible</dd><dt>**netcoreapp3.1**</dt><dd>.NET Core 3.1 compatible (End of Support 13 Dec 2022)</dd><dt>**net47**</dt><dd>.NET Framework 4.7 compatible</dd><dt>**net48**</dt><dd>.NET Framework 4.8 compatible</dd><dt>**net6.0**</dt><dd>.NET 6.0 compatible</dd><dt>**net7.0**</dt><dd>.NET 7.0 compatible</dd></dl>|netstandard2.0|
|
||||
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|
||||
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |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|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|annotationLibrary|Select the complementary documentation annotation library.|<dl><dt>**none**</dt><dd>Do not annotate Model and Api with complementary annotations.</dd><dt>**swagger1**</dt><dd>Annotate Model and Api using the Swagger Annotations 1.x library.</dd><dt>**swagger2**</dt><dd>Annotate Model and Api using the Swagger Annotations 2.x library.</dd></dl>|swagger2|
|
||||
|apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false|
|
||||
@@ -38,7 +39,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|camelRestClientRequestValidation|enable validation of the client request to check whether the Content-Type and Accept headers from the client is supported by the Rest-DSL configuration| |false|
|
||||
|camelRestComponent|name of the Camel component to use as the REST consumer| |servlet|
|
||||
|camelSecurityDefinitions|generate camel security definitions| |true|
|
||||
|camelUseDefaultValidationtErrorProcessor|generate default validation error processor| |true|
|
||||
|camelUseDefaultValidationErrorProcessor|generate default validation error processor| |true|
|
||||
|camelValidationErrorProcessor|validation error processor bean name| |validationErrorProcessor|
|
||||
|configPackage|configuration package for generated code| |org.openapitools.configuration|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.client.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.server.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.controllers|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -18,8 +18,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalClientTypeAnnotations|Additional annotations for client type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut-client|
|
||||
@@ -69,6 +71,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|serializationLibrary|Serialization library for model|<dl><dt>**jackson**</dt><dd>Jackson as serialization library</dd><dt>**micronaut_serde_jackson**</dt><dd>Use micronaut-serialization with Jackson annotations</dd></dl>|jackson|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd></dl>|null|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
@@ -71,6 +72,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git|
|
||||
|scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|serializationLibrary|Serialization library for model|<dl><dt>**jackson**</dt><dd>Jackson as serialization library</dd><dt>**micronaut_serde_jackson**</dt><dd>Use micronaut-serialization with Jackson annotations</dd></dl>|jackson|
|
||||
|snapshotVersion|Uses a SNAPSHOT version.|<dl><dt>**true**</dt><dd>Use a SnapShot Version</dd><dt>**false**</dt><dd>Use a Release Version</dd></dl>|null|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |com.prokarma.pkmst.controller|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |controllers|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |null|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.vertxweb.server.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.server.api.verticle|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,7 +20,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|annotationLibrary|Select the complementary documentation annotation library.|<dl><dt>**none**</dt><dd>Do not annotate Model and Api with complementary annotations.</dd><dt>**swagger1**</dt><dd>Annotate Model and Api using the Swagger Annotations 1.x library.</dd></dl>|none|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.client.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client|
|
||||
@@ -40,6 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**source**</dt><dd>Publish the original input OpenAPI specification.</dd></dl>|source|
|
||||
|dynamicOperations|Generate operations dynamically at runtime from an OAS| |false|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
@@ -53,7 +56,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.</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</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 4.x</dd></dl>|okhttp-gson|
|
||||
|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</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 4.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|
|
||||
@@ -87,6 +90,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|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|
|
||||
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
|
||||
|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|
|
||||
|
||||
## SUPPORTED VENDOR EXTENSIONS
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false|
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false|
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|
||||
@@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>bool</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
|
||||
225
docs/generators/python-nextgen.md
Normal file
225
docs/generators/python-nextgen.md
Normal file
@@ -0,0 +1,225 @@
|
||||
---
|
||||
title: Documentation for the python-nextgen Generator
|
||||
---
|
||||
|
||||
## METADATA
|
||||
|
||||
| Property | Value | Notes |
|
||||
| -------- | ----- | ----- |
|
||||
| generator name | python-nextgen | pass this to the generate command after -g |
|
||||
| generator stability | BETA | |
|
||||
| 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 |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|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|
|
||||
|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|
|
||||
|
||||
## 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>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>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
|
||||
|
||||
### Wire Format Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|JSON|✓|OAS2,OAS3
|
||||
|XML|✓|OAS2,OAS3
|
||||
|PROTOBUF|✗|ToolingExtension
|
||||
|Custom|✓|OAS2,OAS3
|
||||
@@ -47,6 +47,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>bool</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
|
||||
@@ -47,6 +47,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>Dict</li>
|
||||
<li>List</li>
|
||||
<li>bool</li>
|
||||
<li>bytes</li>
|
||||
<li>date</li>
|
||||
|
||||
@@ -26,6 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|packageVersion|Rust package version.| |1.0.0|
|
||||
|preferUnsignedInt|Prefer unsigned integers where minimum value is >= 0| |false|
|
||||
|supportAsync|If set, generate async function call instead. This option is for 'reqwest' library only| |true|
|
||||
|supportMiddleware|If set, add support for reqwest-middleware. This option is for 'reqwest' library only| |false|
|
||||
|supportMultipleResponses|If set, return type wraps an enum of all possible 2xx schemas. This option is for 'reqwest' library only| |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.| |false|
|
||||
|withAWSV4Signature|whether to include AWS v4 signature support| |false|
|
||||
|
||||
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|annotationLibrary|Select the complementary documentation annotation library.|<dl><dt>**none**</dt><dd>Do not annotate Model and Api with complementary annotations.</dd><dt>**swagger1**</dt><dd>Annotate Model and Api using the Swagger Annotations 1.x library.</dd><dt>**swagger2**</dt><dd>Annotate Model and Api using the Swagger Annotations 2.x library.</dd></dl>|swagger2|
|
||||
|apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false|
|
||||
|
||||
@@ -56,6 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useCustomDateWithoutTime|Uses a custom type to decode and encode dates without time information to support OpenAPIs date format (default: false)| |false|
|
||||
|useJsonEncodable|Make models conform to JSONEncodable protocol (default: true)| |true|
|
||||
|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null|
|
||||
|validatable|Make validation rules and validator for model properies (default: true)| |true|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ title: Documentation for the typescript-angular Generator
|
||||
| generator type | CLIENT | |
|
||||
| generator language | Typescript | |
|
||||
| generator default templating engine | mustache | |
|
||||
| helpTxt | Generates a TypeScript Angular (9.x - 14.x) client library. | |
|
||||
| helpTxt | Generates a TypeScript Angular (9.x - 15.x) 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.
|
||||
@@ -31,7 +31,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null|
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|
||||
|modelSuffix|The suffix of the generated model.| |null|
|
||||
|ngVersion|The version of Angular. (At least 9.0.0)| |14.0.5|
|
||||
|ngVersion|The version of Angular. (At least 9.0.0)| |15.0.3|
|
||||
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|
||||
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
|
||||
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
|
||||
|
||||
@@ -19,12 +19,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|apiPackage|package for generated api classes| |null|
|
||||
|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|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|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|
|
||||
|modelPackage|package for generated models| |null|
|
||||
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|
||||
|npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null|
|
||||
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
|
||||
@@ -39,7 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false|
|
||||
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|
||||
|withNodeImports|Setting this property to true adds imports for NodeJS| |false|
|
||||
|withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false|
|
||||
|withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes. This requires in addition a value for 'apiPackage' and 'modelPackage'| |false|
|
||||
|withoutPrefixEnums|Don't prefix enum names with class names| |false|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
@@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|soapPath|basepath of the soap services| |null|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|useSpecifiedOperationId|wheather to use autogenerated operationId's (default) or those specified in openapi spec| |null|
|
||||
|useSpecifiedOperationId|whether to use autogenerated operationId's (default) or those specified in openapi spec| |null|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
|
||||
@@ -103,18 +103,18 @@ docker run --rm \
|
||||
<!-- RELEASE_VERSION -->
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
||||
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.0/openapi-generator-cli-6.2.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
|
||||
```bash
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.0/openapi-generator-cli-6.2.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.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.
|
||||
|
||||
```powershell
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.0/openapi-generator-cli-6.2.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar
|
||||
```
|
||||
<!-- /RELEASE_VERSION -->
|
||||
|
||||
|
||||
@@ -173,10 +173,10 @@ The metadata folder (to store the `VERSION` file for example) is now called `.op
|
||||
|
||||
If you use a generator without specifying each parameter, you might see some differences in the generated code.
|
||||
As example the default package name used in the generated code has changed.
|
||||
You need to have a look at the specific value, depending of your target language, but often `Swagger` îs replaced by `OpenAPITools` and `io.swagger` is replaced by `org.openapitools`.
|
||||
You need to have a look at the specific value, depending on your target language, but often `Swagger` îs replaced by `OpenAPITools` and `io.swagger` is replaced by `org.openapitools`.
|
||||
Concretely if you did not specify anything when you are generating java code, a file `org/openapitools/api/PetApi.java` might be generated instead of `io/swagger/api/PetApi.java`.
|
||||
|
||||
If this is a problem for you, you need to explicitly set the the parameter value in order to match with the `swagger-codgen` default value (`apiPackage` == `io.swagger` in the previous example with the java generator).
|
||||
If this is a problem for you, you need to explicitly set the parameter value in order to match with the `swagger-codegen` default value (`apiPackage` == `io.swagger` in the previous example with the java generator).
|
||||
|
||||
|
||||
## New fully qualified name for the classes
|
||||
|
||||
@@ -49,7 +49,7 @@ Projects relying on generated code might need to be adapted.
|
||||
==== Validate spec on generation by default
|
||||
|
||||
The default is to validate the spec during generation. If the spec has errors,
|
||||
they will appear as errors or warnings to the user. This prevent generation of the project.
|
||||
they will appear as errors or warnings to the user. This prevents generation of the project.
|
||||
|
||||
If you want to switch back to the `3.1.x` behavior you can use:
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ outputFolder = "generated-code" + File.separator + "common-mark";
|
||||
|
||||
This is the default output location. This will be `generated-code/common-mark` on non-Windows machines and `generated-code\common-mark` on Windows. You may change this to any value you'd like, but a user will almost always provide an output directory.
|
||||
|
||||
> When joining paths, always use `File.seperator`
|
||||
> When joining paths, always use `File.separator`
|
||||
|
||||
```java
|
||||
modelTemplateFiles.put("model.mustache", ".zz");
|
||||
|
||||
@@ -125,7 +125,7 @@ curl -H "Content-type: application/json" \
|
||||
http://localhost:8080/api/gen/clients/python
|
||||
```
|
||||
|
||||
Instead of using `openAPIUrl` with an URL to the OpenAPI spec, one can include the spec in the JSON payload with `spec`:
|
||||
Instead of using `openAPIUrl` with a URL to the OpenAPI spec, one can include the spec in the JSON payload with `spec`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ Short term are focused on improving contributor and user productivity (part of t
|
||||
> Feature set, well-defined API (code and templates), and extensibility improvements.
|
||||
|
||||
* API
|
||||
** Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective.
|
||||
** Typed representation of the model bound to our templates. As it is, everything is treated as an Object, and this can lead to changes in the interface which might be unexpected from the template perspective.
|
||||
* Feature set (potential generators to add; not an exhaustive list)
|
||||
** Azure functions (node.js, server)
|
||||
** Finagle HTTP Client (Scala, client)
|
||||
|
||||
@@ -27,7 +27,7 @@ Short term are focused on improving contributor and user productivity (part of t
|
||||
* Automated release stability
|
||||
* General
|
||||
* OAS3.0 features support: anyOf, oneOf, callbacks, etc
|
||||
* Consider opt-in telemetry about generators being used, limited to a counter of invocations by generator name). This would allow us to make prioritization decisions based on statistics.
|
||||
* Consider opt-in telemetry about generators being used, limited to a counter of invocations by generator name. This would allow us to make prioritization decisions based on statistics.
|
||||
* Code clean up
|
||||
* centralize build scripts
|
||||
* organize samples/bin scripts according to new generator names
|
||||
@@ -43,7 +43,7 @@ Short term are focused on improving contributor and user productivity (part of t
|
||||
> Feature set, well-defined API (code and templates), and extensibility improvements.
|
||||
|
||||
### API
|
||||
* Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective.
|
||||
* Typed representation of the model bound to our templates. As it is, everything is treated as an Object, and this can lead to changes in the interface which might be unexpected from the template perspective.
|
||||
* Feature set (potential generators to add; not an exhaustive list)
|
||||
* Azure functions (node.js, server)
|
||||
* Finagle HTTP Client (Scala, client)
|
||||
|
||||
@@ -845,7 +845,7 @@ The following are vendor extensions supported by OpenAPI Generator. The list may
|
||||
|
||||
#### Enum
|
||||
|
||||
`x-enum-varnames` can be used to have an other enum name for the corresponding value.
|
||||
`x-enum-varnames` can be used to have another enum name for the corresponding value.
|
||||
This is used to define names of the enum items.
|
||||
|
||||
`x-enum-descriptions` can be used to provide an individual description for each value.
|
||||
|
||||
@@ -629,7 +629,7 @@ supportsES6: true
|
||||
```
|
||||
|
||||
The settings are passed exactly the same as for `config.json`. The most important part is the file extension. Supported values are `yml` or `yaml`.
|
||||
The name of the file should be `config.yml` or `config.yaml` (in our example it will be `config.yaml`.
|
||||
The name of the file should be `config.yml` or `config.yaml` (in our example it will be `config.yaml`).
|
||||
|
||||
```bash
|
||||
openapi-generator-cli generate -i petstore.yaml -g typescript-fetch -o out \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>6.2.1</version>
|
||||
<version>6.3.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -177,7 +177,7 @@ public class Generate extends OpenApiGeneratorCommand {
|
||||
name = {"--inline-schema-name-defaults"},
|
||||
title = "inline schema name defaults",
|
||||
description = "specifies the default values used when naming inline schema as such array items in the format of arrayItemSuffix=_inner,mapItemSuffix=_value. "
|
||||
+ " ONLY arrayItemSuffix, mapItemSuffix at the moment.")
|
||||
+ " ONLY arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas.")
|
||||
private List<String> inlineSchemaNameDefaults = new ArrayList<>();
|
||||
|
||||
@Option(
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>6.2.1</version>
|
||||
<version>6.3.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
= OpenAPI Generator Gradle Plugin
|
||||
|
||||
This document describes the gradle plugin for OpenAPI Generator.
|
||||
This document describes the Gradle plugin for OpenAPI Generator.
|
||||
|
||||
This gradle plugin offers a declarative DSL via _extensions_ (these are Gradle project extensions).
|
||||
This Gradle plugin offers a declarative DSL via _extensions_ (these are Gradle project extensions).
|
||||
These map almost fully 1:1 with the options you'd pass to the CLI or Maven plugin. The plugin maps the extensions to a task of the same name to provide a clean API. If you're interested in the extension/task mapping concept from a high-level, you can https://docs.gradle.org/current/userguide/custom_plugins.html#sec:mapping_extension_properties_to_task_properties[check out Gradle's docs].
|
||||
|
||||
== Tasks
|
||||
@@ -37,7 +37,7 @@ compileJava.dependsOn tasks.openApiGenerate
|
||||
```
|
||||
====
|
||||
|
||||
All extensions can be rewritten as tasks. Where you can have only a single extension defined in your gradle file, you may have multiple tasks.
|
||||
All extensions can be rewritten as tasks. Where you can have only a single extension defined in your Gradle file, you may have multiple tasks.
|
||||
|
||||
.One Extension, multiple tasks
|
||||
[source,groovy]
|
||||
@@ -97,7 +97,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid
|
||||
[source,group]
|
||||
----
|
||||
plugins {
|
||||
id "org.openapi.generator" version "6.2.0"
|
||||
id "org.openapi.generator" version "6.2.1"
|
||||
}
|
||||
----
|
||||
|
||||
@@ -113,7 +113,7 @@ buildscript {
|
||||
// url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:6.2.0"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:6.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,11 @@ apply plugin: 'org.openapi.generator'
|
||||
|None
|
||||
|The Open API 2.0/3.x specification location.
|
||||
|
||||
|remoteInputSpec
|
||||
|String
|
||||
|None
|
||||
|The remote Open API 2.0/3.x specification URL location.
|
||||
|
||||
|templateDir
|
||||
|String
|
||||
|None
|
||||
@@ -373,6 +378,11 @@ apply plugin: 'org.openapi.generator'
|
||||
|String
|
||||
|mustache
|
||||
|Templating engine: "mustache" (default) or "handlebars" (beta)
|
||||
|
||||
|cleanupOutput
|
||||
|Boolean
|
||||
|false
|
||||
|Defines whether the output directory should be cleaned up before generating the output.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -695,7 +705,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:6.2.0') {
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:6.2.1') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,84 +1,57 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.30'
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url "https://repo1.maven.org/maven2" }
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
maven {
|
||||
url "https://oss.sonatype.org/content/repositories/releases/"
|
||||
}
|
||||
maven {
|
||||
url "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "gradle.plugin.org.gradle.kotlin:gradle-kotlin-dsl-plugins:1.1.3"
|
||||
classpath "com.gradle.publish:plugin-publish-plugin:0.11.0"
|
||||
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.20.0"
|
||||
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.2.0"
|
||||
}
|
||||
import io.github.gradlenexus.publishplugin.CloseNexusStagingRepository
|
||||
import io.github.gradlenexus.publishplugin.ReleaseNexusStagingRepository
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.gradle.plugin-publish") version "1.0.0"
|
||||
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
|
||||
id("java-gradle-plugin")
|
||||
id("maven-publish")
|
||||
id("org.gradle.kotlin.kotlin-dsl") version "2.4.1"
|
||||
id("org.jetbrains.kotlin.jvm") version "1.7.10"
|
||||
id("signing")
|
||||
}
|
||||
|
||||
group 'org.openapitools'
|
||||
// Shared OpenAPI Generator version be passed via command line arg as -PopenApiGeneratorVersion=VERSION
|
||||
version "$openApiGeneratorVersion"
|
||||
group = "org.openapitools"
|
||||
version = "$openApiGeneratorVersion"
|
||||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
||||
|
||||
description = """
|
||||
This plugin supports common functionality found in Open API Generator CLI as a gradle plugin.
|
||||
This plugin supports common functionality found in Open API Generator CLI as a Gradle plugin.
|
||||
|
||||
This gives you the ability to generate client SDKs, documentation, new generators, and to validate Open API 2.0 and 3.x
|
||||
specifications as part of your build. Other tasks are available as command line tasks.
|
||||
"""
|
||||
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
|
||||
|
||||
apply plugin: 'com.gradle.plugin-publish'
|
||||
apply plugin: 'java-gradle-plugin'
|
||||
apply plugin: 'signing'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: "org.gradle.kotlin.kotlin-dsl"
|
||||
apply plugin: 'io.codearte.nexus-staging'
|
||||
apply plugin: "de.marcphilipp.nexus-publish"
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url "https://repo1.maven.org/maven2" }
|
||||
maven {
|
||||
url "https://oss.sonatype.org/content/repositories/releases/"
|
||||
}
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "Sonatype Snapshots"
|
||||
url "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile gradleApi()
|
||||
// Shared OpenAPI Generator version be passed via command line arg as -PopenApiGeneratorVersion=VERSION
|
||||
compile "org.openapitools:openapi-generator:$openApiGeneratorVersion"
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
||||
testCompile 'org.testng:testng:6.9.6',
|
||||
"org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
||||
|
||||
testCompile "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
|
||||
implementation("org.openapitools:openapi-generator:$openApiGeneratorVersion")
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test-testng:1.7.10")
|
||||
}
|
||||
|
||||
test {
|
||||
tasks.named("test", Test).configure {
|
||||
useTestNG()
|
||||
testClassesDirs = files(project.tasks.compileTestKotlin.destinationDir)
|
||||
testLogging.showStandardStreams = false
|
||||
|
||||
beforeTest { descriptor ->
|
||||
logger.lifecycle("Running test: " + descriptor)
|
||||
}
|
||||
|
||||
failFast = true
|
||||
|
||||
onOutput { descriptor, event ->
|
||||
// SLF4J may complain about multiple bindings depending on how this is run.
|
||||
// This is just a warning, but can make test output less readable. So we ignore it specifically.
|
||||
@@ -88,133 +61,105 @@ test {
|
||||
}
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
from javadoc
|
||||
classifier = 'javadoc'
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'sources'
|
||||
tasks.withType(Javadoc).configureEach {
|
||||
if (JavaVersion.current().isJava9Compatible()) {
|
||||
options.addBooleanOption("html5", true)
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar, sourcesJar
|
||||
tasks.withType(CloseNexusStagingRepository).configureEach {
|
||||
onlyIf { nexusPublishing.useStaging.get() }
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
pom {
|
||||
name = 'OpenAPI-Generator Contributors'
|
||||
description = project.description
|
||||
url = 'https://openapi-generator.tech'
|
||||
organization {
|
||||
name = 'org.openapitools'
|
||||
url = 'https://github.com/OpenAPITools'
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name = "The Apache Software License, Version 2.0"
|
||||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
distribution = "repo"
|
||||
tasks.withType(ReleaseNexusStagingRepository).configureEach {
|
||||
onlyIf { nexusPublishing.useStaging.get() }
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
website = "https://openapi-generator.tech/"
|
||||
vcsUrl = "https://github.com/OpenAPITools/openapi-generator"
|
||||
plugins {
|
||||
openApiGenerator {
|
||||
id = "org.openapi.generator"
|
||||
description = "OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)."
|
||||
displayName = "OpenAPI Generator Gradle Plugin"
|
||||
implementationClass = "org.openapitools.generator.gradle.plugin.OpenApiGeneratorPlugin"
|
||||
tags.addAll("openapi-3.0", "openapi-2.0", "openapi", "swagger", "codegen", "sdk")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nexusPublishing {
|
||||
repositories {
|
||||
sonatype {
|
||||
username = project.properties["ossrhUsername"]
|
||||
password = project.properties["ossrhPassword"]
|
||||
|
||||
// To retrieve: ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="$SIGNING_SECRET" getStagingProfile
|
||||
stagingProfileId = "456297f829bbbe"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Signing requires three keys to be defined: signing.keyId, signing.password, and signing.secretKeyRingFile.
|
||||
// These can be passed to the Gradle command:
|
||||
// ./gradlew -Psigning.keyId=yourid
|
||||
// or stored as key=value pairs in ~/.gradle/gradle.properties
|
||||
// You can also apply them in CI via environment variables. See Gradle's docs for details.
|
||||
signing {
|
||||
required { isReleaseVersion && gradle.taskGraph.hasTask("publishPluginMavenPublicationToSonatypeRepository") }
|
||||
sign(publishing.publications)
|
||||
}
|
||||
|
||||
// afterEvaluate is necessary because java-gradle-plugin
|
||||
// creates its publications in an afterEvaluate callback
|
||||
afterEvaluate {
|
||||
tasks.named("publishToSonatype").configure {
|
||||
dependsOn("check")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
pluginMaven {
|
||||
pom {
|
||||
name = "OpenAPI-Generator Contributors"
|
||||
description = project.description
|
||||
url = "https://openapi-generator.tech"
|
||||
organization {
|
||||
name = "org.openapitools"
|
||||
url = "https://github.com/OpenAPITools"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "openapitools"
|
||||
name = "OpenAPI-Generator Contributors"
|
||||
email = "team@openapitools.org"
|
||||
licenses {
|
||||
license {
|
||||
name = "The Apache Software License, Version 2.0"
|
||||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
distribution = "repo"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "openapitools"
|
||||
name = "OpenAPI-Generator Contributors"
|
||||
email = "team@openapitools.org"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = "https://github.com/OpenAPITools/openapi-generator"
|
||||
connection = "scm:git:git://github.com/OpenAPITools/openapi-generator.git"
|
||||
developerConnection = "scm:git:ssh://git@github.com:OpenAPITools/openapi-generator.git"
|
||||
}
|
||||
issueManagement {
|
||||
system = "GitHub"
|
||||
url = "https://github.com/OpenAPITools/openapi-generator/issues"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = 'https://github.com/OpenAPITools/openapi-generator'
|
||||
connection = 'scm:git:git://github.com/OpenAPITools/openapi-generator.git'
|
||||
developerConnection = 'scm:git:ssh://git@github.com:OpenAPITools/openapi-generator.git'
|
||||
}
|
||||
issueManagement {
|
||||
system = 'GitHub'
|
||||
url = 'https://github.com/OpenAPITools/openapi-generator/issues'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nexusStaging {
|
||||
username = project.properties["ossrhUsername"]
|
||||
password = project.properties["ossrhPassword"]
|
||||
}
|
||||
|
||||
nexusPublishing {
|
||||
// To retrieve: ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="$SIGNING_SECRET" getStagingProfile --no-daemon
|
||||
stagingProfileId = "456297f829bbbe"
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
openApiGenerator {
|
||||
id = 'org.openapi.generator'
|
||||
implementationClass = 'org.openapitools.generator.gradle.plugin.OpenApiGeneratorPlugin'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pluginBundle {
|
||||
// These settings are set for the whole plugin bundle
|
||||
website = 'https://openapi-generator.tech/'
|
||||
vcsUrl = 'https://github.com/OpenAPITools/openapi-generator'
|
||||
description = 'OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)'
|
||||
|
||||
plugins {
|
||||
// first plugin
|
||||
openApiGenerator {
|
||||
id = 'org.openapi.generator'
|
||||
displayName = 'OpenAPI Generator Gradle Plugin'
|
||||
tags = ['openapi-3.0', 'openapi-2.0', 'openapi', 'swagger', 'codegen', 'sdk']
|
||||
version = "$openApiGeneratorVersion"
|
||||
group = "org.openapitools"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// signing will require three keys to be defined: signing.keyId, signing.password, and signing.secretKeyRingFile.
|
||||
// These can be passed to the gradle command:
|
||||
// ./gradlew -Psigning.keyId=yourid
|
||||
// or stored as key=value pairs in ~/.gradle/gradle.properties
|
||||
// You can also apply them in CI via environment variables. See Gradle's docs for details.
|
||||
signing {
|
||||
required { isReleaseVersion && (gradle.taskGraph.hasTask("publishPluginMavenPublicationToNexusRepository") ) }
|
||||
sign publishing.publications.mavenJava
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
javadoc {
|
||||
if(JavaVersion.current().isJava9Compatible()) {
|
||||
options.addBooleanOption('html5', true)
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
closeRepository {
|
||||
onlyIf { nexusPublishing.useStaging.get() }
|
||||
}
|
||||
releaseRepository{
|
||||
onlyIf { nexusPublishing.useStaging.get() }
|
||||
}
|
||||
}
|
||||
|
||||
publishToNexus.dependsOn 'check'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=6.2.1
|
||||
openApiGeneratorVersion=6.3.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
# BEGIN placeholders
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
287
modules/openapi-generator-gradle-plugin/gradlew
vendored
287
modules/openapi-generator-gradle-plugin/gradlew
vendored
@@ -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"'
|
||||
DEFAULT_JVM_OPTS='"-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,9 +121,9 @@ 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
|
||||
@@ -98,7 +132,7 @@ 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
|
||||
@@ -106,80 +140,105 @@ 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%
|
||||
|
||||
@@ -33,14 +34,14 @@ set APP_HOME=%DIRNAME%
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>6.2.1</version>
|
||||
<version>6.3.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
@@ -17,14 +17,14 @@
|
||||
|
||||
<properties>
|
||||
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
|
||||
<gradleVersion>5.6.4</gradleVersion>
|
||||
<gradleVersion>7.6</gradleVersion>
|
||||
</properties>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>Gradle Releases</id>
|
||||
<name>Gradle Releases repository</name>
|
||||
<url>https://repo.gradle.org/gradle/libs-releases-local/</url>
|
||||
<url>https://repo.gradle.org/gradle/libs-releases/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
@@ -94,10 +94,8 @@
|
||||
<tasks>
|
||||
<!-- calls "clean assemble install" -->
|
||||
<task>clean</task>
|
||||
<task>check</task>
|
||||
<task>assemble</task>
|
||||
<task>build</task>
|
||||
<task>publishToMavenLocal</task>
|
||||
<task>publishPluginMavenPublicationToMavenLocal</task>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
@@ -106,7 +104,7 @@
|
||||
<dependency>
|
||||
<groupId>org.gradle</groupId>
|
||||
<artifactId>gradle-tooling-api</artifactId>
|
||||
<version>5.6.4</version>
|
||||
<version>${gradleVersion}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
@@ -19,5 +19,5 @@ gradle generateGoWithInvalidSpec # expected outcome: BUILD FAILED
|
||||
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
|
||||
|
||||
```bash
|
||||
gradle -PopenApiGeneratorVersion=6.2.0 openApiValidate
|
||||
gradle -PopenApiGeneratorVersion=6.2.1 openApiValidate
|
||||
```
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=6.2.1
|
||||
openApiGeneratorVersion=6.3.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
rootProject.name = 'openapi-generator-gradle-plugin'
|
||||
enableFeaturePreview('STABLE_PUBLISHING')
|
||||
|
||||
rootProject.name = "openapi-generator-gradle-plugin"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user