diff --git a/.circleci/config.yml b/.circleci/config.yml
index c5b0d3dc6f1..c3611c57351 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -82,7 +82,6 @@ jobs:
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- - ~/.pub-cache
- ~/.cache/bower
- ".git"
- ~/.stack
diff --git a/.gitattributes b/.gitattributes
index def43c73b65..86e3f4ed4b1 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,2 @@
**/*.mustache linguist-vendored=true
+* text=auto eol=lf
diff --git a/.github/actions/run-samples/action.yaml b/.github/actions/run-samples/action.yaml
new file mode 100644
index 00000000000..64bc7745862
--- /dev/null
+++ b/.github/actions/run-samples/action.yaml
@@ -0,0 +1,19 @@
+name: 'Run samples'
+description: 'Runs sample integration test profile with Maven'
+inputs:
+ name:
+ description: 'The Maven profile name'
+ required: true
+ goal:
+ description: 'Maven goal'
+ required: false
+ default: 'verify'
+ args:
+ description: 'Additional maven arguments'
+ required: false
+ default: ''
+runs:
+ using: "composite"
+ steps:
+ - run: mvn --no-snapshot-updates --batch-mode --quiet ${{ inputs.goal }} -P${{ inputs.name }} -Dintegration-test -Dmaven.javadoc.skip=true ${{ inputs.args }}
+ shell: bash
\ No newline at end of file
diff --git a/.github/workflows/check-supported-versions.yaml b/.github/workflows/check-supported-versions.yaml
index 56992b9811e..3702fd30fb4 100644
--- a/.github/workflows/check-supported-versions.yaml
+++ b/.github/workflows/check-supported-versions.yaml
@@ -29,14 +29,14 @@ jobs:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- - uses: actions/cache@v2.1.5
+ - uses: actions/cache@v2.1.6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- - uses: actions/cache@v2.1.5
+ - uses: actions/cache@v2.1.6
with:
path: |
~/.gradle/caches
@@ -50,7 +50,7 @@ jobs:
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}
- name: Upload Maven build artifact
- uses: actions/upload-artifact@v2.2.3
+ uses: actions/upload-artifact@v2.2.4
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
with:
name: artifact
@@ -81,7 +81,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
- name: Download build artifact
- uses: actions/download-artifact@v2.0.8
+ uses: actions/download-artifact@v2.0.10
with:
name: artifact
- name: Run Ensures Script
@@ -90,6 +90,6 @@ jobs:
git config --global core.fileMode false
git config --global core.safecrlf false
git config --global core.autocrlf true
- mkdir -p modules/openapi-generator-cli/target/
- mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
- ./bin/utils/ensure-up-to-date ${{ matrix.flags }}
+ mvn clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
+ # test with java (jersey2) client generation only as ensure-uptodate script is run in another job instead
+ ./bin/generate-samples.sh ./bin/configs/java-jersey2-8.yaml
diff --git a/.github/workflows/openapi-generator-test-results.yaml b/.github/workflows/openapi-generator-test-results.yaml
new file mode 100644
index 00000000000..f246b16c36b
--- /dev/null
+++ b/.github/workflows/openapi-generator-test-results.yaml
@@ -0,0 +1,19 @@
+name: OpenAPI Generator Test Report
+
+on:
+ workflow_run:
+ workflows: ['OpenAPI Generator']
+ types:
+ - completed
+
+# separate workflow required due to https://github.com/dorny/test-reporter#recommended-setup-for-public-repositories
+jobs:
+ report:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: dorny/test-reporter@v1
+ with:
+ artifact: surefire-test-results
+ name: JUnit Test results
+ path: '**/surefire-reports/TEST-*.xml'
+ reporter: java-junit
diff --git a/.github/workflows/openapi-generator.yaml b/.github/workflows/openapi-generator.yaml
new file mode 100644
index 00000000000..aa1a94e21e9
--- /dev/null
+++ b/.github/workflows/openapi-generator.yaml
@@ -0,0 +1,214 @@
+name: OpenAPI Generator
+
+on:
+ push:
+ branches:
+ - master
+ - '[5-9]+.[0-9]+.x'
+ pull_request:
+ branches:
+ - master
+ - '[5-9]+.[0-9]+.x'
+
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 8
+ - name: Cache maven dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: cache-maven-repository
+ with:
+ path: |
+ ~/.m2/repository
+ ~/.gradle
+ !~/.gradle/caches/*/plugin-resolution/
+ !~/.m2/repository/org/openapitools/
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ - name: Run maven
+ run: mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
+ - run: ls -la modules/openapi-generator-cli/target
+ - name: Upload openapi-generator-cli.jar artifact
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: openapi-generator-cli.jar
+ path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
+ retention-days: 1
+
+ test:
+ name: Unit tests
+ runs-on: ubuntu-latest
+ needs:
+ - build
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 8
+ - name: Cache maven dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: cache-maven-repository
+ with:
+ path: |
+ ~/.m2/repository
+ ~/.gradle
+ !~/.gradle/caches/*/plugin-resolution/
+ !~/.m2/repository/org/openapitools/
+ key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ - name: Run unit tests
+ run: mvn --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error
+ - name: Publish unit test reports
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: surefire-test-results
+ path: '**/surefire-reports/TEST-*.xml'
+
+ documentation:
+ name: Docs up-to-date
+ runs-on: ubuntu-latest
+ needs:
+ - build
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 8
+ - name: Download openapi-generator-cli.jar artifact
+ uses: actions/download-artifact@v2.0.10
+ with:
+ name: openapi-generator-cli.jar
+ path: modules/openapi-generator-cli/target
+ - name: Generate docs
+ run: |
+ bash bin/meta-codegen.sh
+ bash bin/utils/export_docs_generators.sh
+ bash bin/utils/copy-to-website.sh
+ bash bin/utils/export_generators_readme.sh
+ - name: Verify git status
+ run: |
+ if [[ "$(git status --porcelain)" != "" ]]; then
+ echo "UNCOMMITTED CHANGES ERROR"
+ echo "There are uncommitted changes in working tree after execution of 'bin/ensure-up-to-date'"
+ echo "Perform git diff"
+ git --no-pager diff
+ echo "Perform git status"
+ git status
+ echo -e "\nThis script runs in pull requests against the anticipated merge commit (as if the PR was merged now)."
+ echo "When you see unexpected files here, it likely means that there are newer commits in master that you need to "
+ echo -e "rebase or merge into your branch.\n"
+ echo "Please run 'bin/utils/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
+ exit 1
+ fi
+
+ samples:
+ name: Samples up-to-date
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 8
+ - name: Download openapi-generator-cli.jar artifact
+ uses: actions/download-artifact@v2.0.10
+ with:
+ name: openapi-generator-cli.jar
+ path: modules/openapi-generator-cli/target
+ - name: Generate samples
+ run: bash bin/generate-samples.sh
+ - name: Verify git status
+ run: |
+ if [[ "$(git status --porcelain)" != "" ]]; then
+ echo "UNCOMMITTED CHANGES ERROR"
+ echo "There are uncommitted changes in working tree after execution of 'bin/generate-samples.sh'"
+ echo "Perform git diff"
+ git --no-pager diff
+ echo "Perform git status"
+ git status
+ echo -e "\nThis script runs in pull requests against the anticipated merge commit (as if the PR was merged now)."
+ echo "When you see unexpected files here, it likely means that there are newer commits in master that you need to "
+ echo -e "rebase or merge into your branch.\n"
+ echo "Please run 'bin/generate-samples.sh' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
+ exit 1
+ fi
+
+ test-maven-plugin:
+ name: Maven plugin tests
+ runs-on: ubuntu-latest
+ needs:
+ - build
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Cache maven dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: cache-maven-repository
+ with:
+ path: |
+ ~/.m2/repository
+ ~/.gradle
+ !~/.gradle/caches/*/plugin-resolution/
+ !~/.m2/repository/org/openapitools/
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-test-maven-plugin-${{ env.cache-name }}-
+ ${{ runner.os }}-test-maven-plugin-
+ - name: Run tests
+ run: |
+ mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
+ mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
+ mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
+ mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
+
+ test-gradle-plugin:
+ name: Gradle plugin tests
+ runs-on: ubuntu-latest
+ needs:
+ - build
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Cache maven dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: cache-maven-repository
+ with:
+ path: |
+ ~/.m2/repository
+ ~/.gradle
+ !~/.gradle/caches/modules-2/modules-2.lock
+ !~/.gradle/caches/*/plugin-resolution/
+ !~/.m2/repository/org/openapitools/
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}-
+ ${{ runner.os }}-test-gradle-plugin-
+ - name: Run tests
+ run: |
+ (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
+ (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
diff --git a/.github/workflows/samples-dart.yaml b/.github/workflows/samples-dart.yaml
new file mode 100644
index 00000000000..47ae424394d
--- /dev/null
+++ b/.github/workflows/samples-dart.yaml
@@ -0,0 +1,80 @@
+name: Samples Dart
+
+on:
+ push:
+ branches:
+ - master
+ - '[5-9]+.[0-9]+.x'
+ pull_request:
+ branches:
+ - master
+ - '[5-9]+.[0-9]+.x'
+ paths:
+ - 'samples/openapi3/client/petstore/dart*/**'
+
+jobs:
+ tests-dart-2-10:
+ name: Tests Dart 2.10
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v2
+ with:
+ distribution: 'adopt'
+ java-version: 8
+ - name: Cache maven dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.m2/repository
+ ~/.gradle
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ - name: Cache test dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: pub-cache
+ with:
+ path: $PUB_CACHE
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.yaml') }}
+ - uses: dart-lang/setup-dart@v1
+ with:
+ sdk: 2.10.5
+ - name: Run tests
+ uses: ./.github/actions/run-samples
+ with:
+ name: samples.dart-2.10
+
+ tests-dart-2-13:
+ name: Tests Dart 2.13
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v2
+ with:
+ distribution: 'adopt'
+ java-version: 8
+ - name: Cache maven dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.m2/repository
+ ~/.gradle
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ - name: Cache test dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: pub-cache
+ with:
+ path: $PUB_CACHE
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.yaml') }}
+ - uses: dart-lang/setup-dart@v1
+ with:
+ sdk: 2.13.0
+ - name: Run tests
+ uses: ./.github/actions/run-samples
+ with:
+ name: samples.dart-2.13
diff --git a/.github/workflows/samples-kotlin.yaml b/.github/workflows/samples-kotlin.yaml
new file mode 100644
index 00000000000..46c944fd74e
--- /dev/null
+++ b/.github/workflows/samples-kotlin.yaml
@@ -0,0 +1,66 @@
+name: Samples Kotlin
+
+on:
+ push:
+ branches:
+ - master
+ - '[5-9]+.[0-9]+.x'
+ pull_request:
+ branches:
+ - master
+ - '[5-9]+.[0-9]+.x'
+ paths:
+ - 'samples/client/petstore/kotlin*/**'
+
+env:
+ GRADLE_VERSION: 6.9
+
+jobs:
+ build:
+ name: Build Kotlin
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ - samples/client/petstore/kotlin
+ - samples/client/petstore/kotlin-gson
+ - samples/client/petstore/kotlin-jackson
+ # needs Android configured
+ #- samples/client/petstore/kotlin-json-request-string
+ - samples/client/petstore/kotlin-jvm-okhttp4-coroutines
+ - samples/client/petstore/kotlin-moshi-codegen
+ # need some special setup
+ #- samples/client/petstore/kotlin-multiplatform
+ - samples/client/petstore/kotlin-nonpublic
+ - samples/client/petstore/kotlin-nullable
+ - samples/client/petstore/kotlin-okhttp3
+ - samples/client/petstore/kotlin-retrofit2
+ - samples/client/petstore/kotlin-retrofit2-kotlinx_serialization
+ - samples/client/petstore/kotlin-retrofit2-rx3
+ - samples/client/petstore/kotlin-string
+ - samples/client/petstore/kotlin-threetenbp
+ - samples/client/petstore/kotlin-uppercase-enum
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v2
+ with:
+ distribution: 'adopt'
+ java-version: 8
+ - name: Cache maven dependencies
+ uses: actions/cache@v2.1.6
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.gradle
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ - name: Install Gradle wrapper
+ uses: eskatos/gradle-command-action@v1
+ with:
+ gradle-version: ${{ env.GRADLE_VERSION }}
+ build-root-directory: ${{ matrix.sample }}
+ arguments: wrapper
+ - name: Build
+ working-directory: ${{ matrix.sample }}
+ run: ./gradlew build -x test
diff --git a/.gitignore b/.gitignore
index b56824e26e3..9ce6c04e156 100644
--- a/.gitignore
+++ b/.gitignore
@@ -177,7 +177,6 @@ samples/client/petstore/python-tornado/.venv/
# PHP
samples/client/petstore/php/OpenAPIClient-php/composer.lock
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
-samples/openapi3/server/petstore/php-mezzio-ph/composer.lock
samples/server/petstore/php-laravel/lib/composer.lock
samples/server/petstore/php-lumen/lib/composer.lock
samples/server/petstore/php-slim4/composer.lock
@@ -213,6 +212,7 @@ cabal.project.local
samples/client/petstore/haskell-http-client/docs/haddock-bundle.min.js
samples/client/petstore/haskell-http-client/docs/meta.json
samples/client/petstore/haskell-http-client/docs/quick-jump.css
+samples/server/petstore/haskell-servant/stack.yaml.lock
# R
.Rproj.user
diff --git a/.travis.yml b/.travis.yml
index cc1f953acaa..7deb298f0fa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -76,11 +76,11 @@ before_install:
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- docker ps -a
# install crystal
- - curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
- - curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add -
- - echo "deb https://dist.crystal-lang.org/apt crystal main" | sudo tee /etc/apt/sources.list.d/crystal.list
- - sudo apt-get update
+ - echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list
+ - curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null
+ - sudo apt update
- sudo apt install crystal
+ - crystal --version
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.0
- export PATH="$HOME/.yarn/bin:$PATH"
# install rust
diff --git a/CI/.drone.yml b/CI/.drone.yml
index 032d64b9e15..073d7332a43 100644
--- a/CI/.drone.yml
+++ b/CI/.drone.yml
@@ -7,8 +7,6 @@ steps:
commands:
- ./mvnw --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- ./mvnw --quiet verify -Psamples.droneio -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- # run ensure up-to-date
- - /bin/bash bin/utils/ensure-up-to-date
# test java native client
- ./mvnw clean test -f samples/client/petstore/java/native/pom.xml
- ./mvnw clean test -f samples/client/petstore/java/native-async/pom.xml
diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh
index b647131c7d7..f1a5a529a79 100755
--- a/CI/circle_parallel.sh
+++ b/CI/circle_parallel.sh
@@ -14,17 +14,6 @@ function cleanup {
trap cleanup EXIT
-function installDart {
- # install dart2
- sudo apt-get update
- sudo apt-get install apt-transport-https
- sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
- sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
- sudo apt-get update
- sudo apt-get install dart
- export PATH="$PATH:/usr/lib/dart/bin"
-}
-
if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
java -version
@@ -35,21 +24,6 @@ if [ "$NODE_INDEX" = "1" ]; then
ls -l /home/circleci/.ivy2/cache
elif [ "$NODE_INDEX" = "2" ]; then
- installDart
-
- # run ensure-up-to-date sample script on SNAPSHOT version only
- project_version=`mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout`
- if [[ $project_version == *"-SNAPSHOT" ]]; then
- echo "Running node $NODE_INDEX to test ensure-up-to-date"
- java -version
-
- # clear any changes to the samples
- git checkout -- .
-
- # look for outdated samples
- #./bin/utils/ensure-up-to-date
- # UPDATE: moved to drone.io
- fi
echo "Running node $NODE_INDEX to test haskell"
# install haskell
curl -sSL https://get.haskellstack.org/ | sh
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0fe833163af..4e59158cdb8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -88,12 +88,10 @@ To add test cases (optional) covering the change in the code generator, please r
To test the templates, please perform the following:
-- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh .
-/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
-- During development it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
+- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh ./bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
+- During development, it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
- Run the tests in the sample folder using maven `mvn integration-test -f /path/to/pom.xml`, e.g. `mvn integration-test -f samples/client/petstore/python/pom.xml`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
-- Finally, git commit the updated samples files: `git commit -a`
- (`git add -A` if added files with new test cases)
+- Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases)
- For new test cases, please add to the [Fake Petstore spec](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml)
To start the CI tests, you can:
diff --git a/README.md b/README.md
index 97e01df1c97..76fdb0d8d86 100644
--- a/README.md
+++ b/README.md
@@ -9,18 +9,26 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.2.0`):
-[](https://travis-ci.org/OpenAPITools/openapi-generator)
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.2.1`):
+[](https://travis-ci.com/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
[](https://app.bitrise.io/app/4a2b10a819d12b67)
[](https://github.com/OpenAPITools/openapi-generator/actions?query=workflow%3A%22Check+Supported+Java+Versions%22)
+
+[5.3.x](https://github.com/OpenAPITools/openapi-generator/tree/5.3.x) (`5.3.x`):
+[](https://travis-ci.com/OpenAPITools/openapi-generator)
+[](https://circleci.com/gh/OpenAPITools/openapi-generator)
+[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
+[](https://cloud.drone.io/OpenAPITools/openapi-generator)
+[](https://app.bitrise.io/app/4a2b10a819d12b67)
+
[6.0.x](https://github.com/OpenAPITools/openapi-generator/tree/6.0.x) (`6.0.x`):
-[](https://travis-ci.org/OpenAPITools/openapi-generator)
+[](https://travis-ci.com/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
[](https://app.bitrise.io/app/4a2b10a819d12b67)
@@ -67,11 +75,11 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
| | Languages/Frameworks |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0, .NET 5.0. Libraries: RestSharp, HttpClient), **C++** (cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
-| **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
+| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0, .NET 5.0. Libraries: RestSharp, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
+| **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
-| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer** |
+| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
## Table of contents
@@ -110,8 +118,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 6.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/) | Nov/Dec 2021 | Minor release with breaking changes (no fallback) |
-| 5.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.2.0-SNAPSHOT/) | Jun/Jul 2021 | Minor release with breaking changes (with fallback) |
-| [5.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.1.1) (latest stable release) | 07.05.2021 | Patch release (enhancements, bug fixes, etc) |
+| 5.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.3.0-SNAPSHOT/) | Aug/Sep 2021 | Minor release with breaking changes (with fallback) |
+| 5.2.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.2.1-SNAPSHOT/) | 09.08.2021 | Patch release (enhancements, bug fixes, etc) |
+| [5.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.2.0) (latest stable release) | 09.07.2021 | Minor release with breaking changes (with fallback) |
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
@@ -168,16 +177,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
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/5.1.1/openapi-generator-cli-5.1.1.jar`
+JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar`
For **Mac/Linux** users:
```sh
-wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar -O openapi-generator-cli.jar
+wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar -O openapi-generator-cli.jar
```
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/5.1.1/openapi-generator-cli-5.1.1.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -269,7 +278,7 @@ To reinstall with the latest master, run `brew uninstall openapi-generator && br
To install OpenJDK (pre-requisites), please run
```sh
brew tap AdoptOpenJDK/openjdk
-brew cask install adoptopenjdk12
+brew install --cask adoptopenjdk12
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home/
```
@@ -402,7 +411,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
-openapi-generator-cli version-manager set 5.1.1
+openapi-generator-cli version-manager set 5.2.0
```
Or install it as dev-dependency:
@@ -426,7 +435,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`)
-You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar)
+You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.2.0/openapi-generator-cli-5.2.0.jar)
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -564,6 +573,7 @@ Here is a list of community-contributed IDE plug-ins that integrate with OpenAPI
## [4 - Companies/Projects using OpenAPI Generator](#table-of-contents)
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
+- [Aalborg University](https://www.aau.dk)
- [Adaptant Solutions AG](https://www.adaptant.io/)
- [adesso SE](https://www.adesso.de/)
- [Agoda](https://www.agoda.com/)
@@ -813,6 +823,9 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2021-03-31 - [使用OpenAPI Generator實現Open API Server](https://www.1ju.org/article/java-openapi-generator-server) at [億聚網](https://www.1ju.org/)
- 2021-04-19 - [Introducing Twilio’s OpenAPI Specification Beta](https://www.twilio.com/blog/introducing-twilio-open-api-specification-beta) by [GARETH PAUL JONES](https://www.twilio.com/blog/author/gpj) at [Twilio Blog](https://www.twilio.com/blog)
- 2021-04-22 - [Leveraging OpenApi strengths in a Micro-Service environment](https://medium.com/unibuddy-technology-blog/leveraging-openapi-strengths-in-a-micro-service-environment-3d7f9e7c26ff) by Nicolas Jellab at [Unibuddy Technology Blog](https://medium.com/unibuddy-technology-blog)
+- 2021-04-27 - [From zero to publishing PowerShell API clients in PowerShell Gallery within minutes](https://speakerdeck.com/wing328/from-zero-to-publishing-powershell-api-clients-in-powershell-gallery-within-minutes) by [William Cheng](https://github.com/wing328) at [PowerShell + DevOps Global Summit 2021](https://events.devopscollective.org/event/powershell-devops-global-summit-2021/)
+- 2021-05-31 - [FlutterでOpen Api Generator(Swagger)を使う](https://aakira.app/blog/2021/05/flutter-open-api/) by [AAkira](https://twitter.com/_a_akira)
+- 2021-06-22 - [Rest API Documentation and Client Generation With OpenAPI](https://dzone.com/articles/rest-api-documentation-and-client-generation-with) by [Prasanth Gullapalli](https://dzone.com/users/1011797/prasanthnath.g@gmail.com.html)
## [6 - About Us](#table-of-contents)
@@ -842,6 +855,7 @@ Here is a list of template creators:
* Bash: @bkryza
* C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant)
* C++ REST: @Danielku15
+ * C++ Tiny: @AndersSpringborg @kaareHH @michelealbano @mkakbas
* C++ UE4: @Kahncode
* C# (.NET 2.0): @who
* C# (.NET Standard 1.3 ): @Gronsak
@@ -946,8 +960,10 @@ Here is a list of template creators:
* PHP Laravel: @renepardon
* PHP Lumen: @abcsun
* PHP Slim: @jfastnacht
+ * PHP Slim4: @ybelenko
* PHP Symfony: @ksm2
* PHP Zend Expressive (with Path Handler): @Articus
+ * Python FastAPI: @krjakbrjak
* Python AIOHTTP: @Jyhess
* Ruby on Rails 5: @zlx
* Rust (rust-server): @metaswitch
@@ -969,6 +985,7 @@ Here is a list of template creators:
* Ktorm: @Luiz-Monad
* MySQL: @ybelenko
* Protocol Buffer: @wing328
+ * WSDL @adessoDpd
:heart: = Link to support the contributor directly
@@ -1010,7 +1027,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
-| C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) |
+| C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) |
| Clojure | |
| Dart | @swipesight (2018/09) @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) |
| Eiffel | @jvelilla (2017/09) |
diff --git a/appveyor.yml b/appveyor.yml
index ec69f197198..e50dc6c2bb2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -29,8 +29,9 @@ install:
- cmd: java -version
- cmd: gradle -v
- cmd: dir/w
- - git clone https://github.com/wing328/swagger-samples
+ - git clone https://github.com/wing328/swagger-samples --depth 1
- ps: Start-Process -FilePath 'C:\maven\apache-maven-3.2.5\bin\mvn' -ArgumentList 'jetty:run' -WorkingDirectory "$env:appveyor_build_folder\swagger-samples\java\java-jersey-jaxrs-ci"
+ - ps: Start-Sleep -s 15
- ps: $PSVersionTable.PSVersion
- ps: Install-Module -Name Pester -Force -Scope CurrentUser
build_script:
@@ -54,6 +55,8 @@ build_script:
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-net47\Org.OpenAPITools.sln
# build C# API client (.net 5.0)
- 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"
@@ -79,6 +82,8 @@ test_script:
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-net47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test C# API client (.net 5.0)
- 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)
diff --git a/bin/configs/cpp-qt5-client.yaml b/bin/configs/cpp-qt-client.yaml
similarity index 72%
rename from bin/configs/cpp-qt5-client.yaml
rename to bin/configs/cpp-qt-client.yaml
index dc36141b436..14f4a274500 100644
--- a/bin/configs/cpp-qt5-client.yaml
+++ b/bin/configs/cpp-qt-client.yaml
@@ -1,7 +1,7 @@
-generatorName: cpp-qt5-client
-outputDir: samples/client/petstore/cpp-qt5
+generatorName: cpp-qt-client
+outputDir: samples/client/petstore/cpp-qt
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-client
+templateDir: modules/openapi-generator/src/main/resources/cpp-qt-client
additionalProperties:
cppNamespace: test_namespace
modelNamePrefix: PFX
diff --git a/bin/configs/cpp-qt5-qhttpengine-server.yaml b/bin/configs/cpp-qt-qhttpengine-server.yaml
similarity index 52%
rename from bin/configs/cpp-qt5-qhttpengine-server.yaml
rename to bin/configs/cpp-qt-qhttpengine-server.yaml
index 8ead0fe398d..9a03bcbc951 100644
--- a/bin/configs/cpp-qt5-qhttpengine-server.yaml
+++ b/bin/configs/cpp-qt-qhttpengine-server.yaml
@@ -1,4 +1,4 @@
-generatorName: cpp-qt5-qhttpengine-server
-outputDir: samples/server/petstore/cpp-qt5-qhttpengine-server
+generatorName: cpp-qt-qhttpengine-server
+outputDir: samples/server/petstore/cpp-qt-qhttpengine-server
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server
+templateDir: modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server
diff --git a/bin/configs/cpp-tiny.yaml b/bin/configs/cpp-tiny.yaml
new file mode 100644
index 00000000000..237ae1403f4
--- /dev/null
+++ b/bin/configs/cpp-tiny.yaml
@@ -0,0 +1,7 @@
+generatorName: cpp-tiny
+outputDir: samples/client/petstore/cpp-tiny
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/cpp-tiny
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ controller: "esp32"
diff --git a/bin/configs/csharp-netcore-OpenAPIClient_ConditionalSerialization.yaml b/bin/configs/csharp-netcore-OpenAPIClient_ConditionalSerialization.yaml
new file mode 100644
index 00000000000..7c7364771be
--- /dev/null
+++ b/bin/configs/csharp-netcore-OpenAPIClient_ConditionalSerialization.yaml
@@ -0,0 +1,12 @@
+# for .net standard
+generatorName: csharp-netcore
+outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization
+inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
+additionalProperties:
+ packageGuid: '{fa96c953-af24-457d-8a01-f2fd2a7547a9}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useOneOfDiscriminatorLookup: true
+ targetFramework: netstandard2.0
+ conditionalSerialization: true
\ No newline at end of file
diff --git a/bin/configs/other/erlang-server.yaml b/bin/configs/erlang-server.yaml
similarity index 100%
rename from bin/configs/other/erlang-server.yaml
rename to bin/configs/erlang-server.yaml
diff --git a/bin/configs/go-server-chi-api-server.yaml b/bin/configs/go-server-chi-api-server.yaml
new file mode 100644
index 00000000000..16db86a3d62
--- /dev/null
+++ b/bin/configs/go-server-chi-api-server.yaml
@@ -0,0 +1,9 @@
+generatorName: go-server
+outputDir: samples/server/petstore/go-chi-server
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/go-server
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ packageName: petstoreserver
+ addResponseHeaders: true
+ router: "chi"
diff --git a/bin/configs/other/haskell-servant.yaml b/bin/configs/haskell-servant.yaml
similarity index 100%
rename from bin/configs/other/haskell-servant.yaml
rename to bin/configs/haskell-servant.yaml
diff --git a/bin/configs/kotlin-json-request-string.yaml b/bin/configs/kotlin-json-request-string.yaml
index 375622ae5df..bbe5ddd4283 100644
--- a/bin/configs/kotlin-json-request-string.yaml
+++ b/bin/configs/kotlin-json-request-string.yaml
@@ -6,3 +6,4 @@ additionalProperties:
requestDateConverter: toString
artifactId: kotlin-petstore-json-request-string
parcelizeModels: true
+ supportAndroidApiLevel25AndBelow: true
diff --git a/bin/configs/php-mezzio-ph-modern.yaml b/bin/configs/php-mezzio-ph-modern.yaml
new file mode 100644
index 00000000000..accaa2dfe30
--- /dev/null
+++ b/bin/configs/php-mezzio-ph-modern.yaml
@@ -0,0 +1,6 @@
+generatorName: php-mezzio-ph
+outputDir: samples/server/petstore/php-mezzio-ph-modern
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/php-mezzio-ph-modern
+additionalProperties:
+ modern: "true"
diff --git a/bin/configs/python-fastapi.yaml b/bin/configs/python-fastapi.yaml
new file mode 100644
index 00000000000..7bf7405c527
--- /dev/null
+++ b/bin/configs/python-fastapi.yaml
@@ -0,0 +1,6 @@
+generatorName: python-fastapi
+outputDir: samples/server/petstore/python-fastapi
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/python-fastapi
+additionalProperties:
+ hideGenerationTimestamp: "true"
diff --git a/bin/configs/scala-legacy.yaml b/bin/configs/scala-legacy.yaml
new file mode 100644
index 00000000000..7c9c1865bc0
--- /dev/null
+++ b/bin/configs/scala-legacy.yaml
@@ -0,0 +1,9 @@
+# This is for generating scala legacy client
+generatorName: scala-httpclient-deprecated
+outputDir: samples/client/petstore/scala-httpclient-deprecated
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/scala-httpclient
+additionalProperties:
+ apiPackage: org.openapitools.example.api
+ invokerPackage: org.openapitools.example.invoker
+ artifactId: scala-legacy-petstore
\ No newline at end of file
diff --git a/bin/configs/swift5-oneOf.yaml b/bin/configs/swift5-oneOf.yaml
new file mode 100644
index 00000000000..975892b340c
--- /dev/null
+++ b/bin/configs/swift5-oneOf.yaml
@@ -0,0 +1,10 @@
+generatorName: swift5
+outputDir: samples/client/petstore/swift5/oneOf
+inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
+templateDir: modules/openapi-generator/src/main/resources/swift5
+generateAliasAsModel: true
+additionalProperties:
+ podAuthors: ""
+ podSummary: PetstoreClient
+ projectName: PetstoreClient
+ podHomepage: https://github.com/openapitools/openapi-generator
diff --git a/bin/configs/swift5-rxswiftLibrary.yaml b/bin/configs/swift5-rxswiftLibrary.yaml
index 49d0e24cca5..8751d347912 100644
--- a/bin/configs/swift5-rxswiftLibrary.yaml
+++ b/bin/configs/swift5-rxswiftLibrary.yaml
@@ -10,3 +10,4 @@ additionalProperties:
projectName: PetstoreClient
podHomepage: https://github.com/openapitools/openapi-generator
useBacktickEscapes: true
+ generateModelAdditionalProperties: false
diff --git a/bin/configs/swift5-urlsessionLibrary.yaml b/bin/configs/swift5-urlsessionLibrary.yaml
index b260611e602..1520a7c1ea9 100644
--- a/bin/configs/swift5-urlsessionLibrary.yaml
+++ b/bin/configs/swift5-urlsessionLibrary.yaml
@@ -11,3 +11,4 @@ additionalProperties:
podHomepage: https://github.com/openapitools/openapi-generator
useSPMFileStructure: true
useClasses: true
+ swiftUseApiNamespace: true
diff --git a/bin/configs/swift5-vapor.yaml b/bin/configs/swift5-vapor.yaml
new file mode 100644
index 00000000000..5f1d2067969
--- /dev/null
+++ b/bin/configs/swift5-vapor.yaml
@@ -0,0 +1,12 @@
+generatorName: swift5
+outputDir: samples/client/petstore/swift5/vaporLibrary
+library: vapor
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/swift5
+generateAliasAsModel: true
+additionalProperties:
+ projectName: PetstoreClient
+ useSPMFileStructure: true
+ useClasses: true
+ useBacktickEscapes: true
+ mapFileBinaryToData: true
diff --git a/bin/configs/swift5-x-swift-hashable.yaml b/bin/configs/swift5-x-swift-hashable.yaml
new file mode 100644
index 00000000000..c07937d5336
--- /dev/null
+++ b/bin/configs/swift5-x-swift-hashable.yaml
@@ -0,0 +1,11 @@
+generatorName: swift5
+outputDir: samples/client/petstore/swift5/x-swift-hashable
+inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/swift5
+generateAliasAsModel: true
+additionalProperties:
+ podAuthors: ""
+ podSummary: PetstoreClient
+ projectName: PetstoreClient
+ podHomepage: https://github.com/openapitools/openapi-generator
+ hashableModels: false
diff --git a/bin/configs/typescript-angular-v11-oneOf.yaml b/bin/configs/typescript-angular-v11-oneOf.yaml
new file mode 100644
index 00000000000..e9d83262ac8
--- /dev/null
+++ b/bin/configs/typescript-angular-v11-oneOf.yaml
@@ -0,0 +1,5 @@
+generatorName: typescript-angular
+outputDir: samples/client/petstore/typescript-angular-v11-oneOf/builds/default
+inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOfArrayMapImport.yaml
+additionalProperties:
+ ngVersion: 11.0.0
diff --git a/bin/configs/typescript-fetch-sagas-and-records.yaml b/bin/configs/typescript-fetch-sagas-and-records.yaml
new file mode 100644
index 00000000000..a9fbe6136c7
--- /dev/null
+++ b/bin/configs/typescript-fetch-sagas-and-records.yaml
@@ -0,0 +1,16 @@
+generatorName: typescript-fetch
+outputDir: samples/client/petstore/typescript-fetch/builds/sagas-and-records
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-saga-and-records.yaml
+additionalProperties:
+ npmVersion: 1.0.0
+ npmName: '@openapitools/typescript-fetch-petstore'
+ npmRepository: https://skimdb.npmjs.com/registry
+ useSingleRequestParameter: false
+ supportsES6: true
+ typescriptThreePlus: true
+ sagasAndRecords: true
+ detectPassthroughModelsWithSuffixAndField: 'Response.data'
+ inferUniqueIdFromNameSuffix: true
+ inferEntityFromUniqueIdWithName: id
+ packageAsSourceOnlyLibrary: false
+ snapshot: false
\ No newline at end of file
diff --git a/bin/configs/wsdl-schema.yaml b/bin/configs/wsdl-schema.yaml
new file mode 100644
index 00000000000..29484b39dfe
--- /dev/null
+++ b/bin/configs/wsdl-schema.yaml
@@ -0,0 +1,6 @@
+generatorName: wsdl-schema
+outputDir: samples/schema/petstore/wsdl-schema
+inputSpec: modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/wsdl-schema
+additionalProperties:
+ hideGenerationTimestamp: "true"
diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh
index c2be83681ca..f57fd7b7daf 100755
--- a/bin/utils/release/release_version_update.sh
+++ b/bin/utils/release/release_version_update.sh
@@ -83,7 +83,6 @@ declare -a xml_files=(
"${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml"
"${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
"${root}/modules/openapi-generator-maven-plugin/examples/non-java.xml"
- "${root}/samples/meta-codegen/lib/pom.xml"
"${root}/pom.xml"
)
diff --git a/docs/contributing.md b/docs/contributing.md
index fe325ae17e1..f47d79bd09f 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -92,12 +92,10 @@ To add test cases (optional) covering the change in the code generator, please r
To test the templates, please perform the following:
-- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh .
-/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
-- During development it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
+- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh ./bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
+- During development, it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
- Run the tests in the sample folder using maven `mvn integration-test -f /path/to/pom.xml`, e.g. `mvn integration-test -f samples/client/petstore/python/pom.xml`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
-- Finally, git commit the updated samples files: `git commit -a`
- (`git add -A` if added files with new test cases)
+- Finally, git commit the updated samples files: `git commit -a` (`git add -A` if added files with new test cases)
- For new test cases, please add to the [Fake Petstore spec](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml)
To start the CI tests, you can:
diff --git a/docs/generators.md b/docs/generators.md
index 6cb063b2230..c71da0663ed 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -12,8 +12,9 @@ The following generators are available:
* [bash](generators/bash.md)
* [c](generators/c.md)
* [clojure](generators/clojure.md)
-* [cpp-qt5-client](generators/cpp-qt5-client.md)
+* [cpp-qt-client](generators/cpp-qt-client.md)
* [cpp-restsdk](generators/cpp-restsdk.md)
+* [cpp-tiny (beta)](generators/cpp-tiny.md)
* [cpp-tizen](generators/cpp-tizen.md)
* [cpp-ue4 (beta)](generators/cpp-ue4.md)
* [crystal (beta)](generators/crystal.md)
@@ -61,7 +62,7 @@ The following generators are available:
* [scala-sttp (beta)](generators/scala-sttp.md)
* [scalaz](generators/scalaz.md)
* [swift4-deprecated (deprecated)](generators/swift4-deprecated.md)
-* [swift5 (beta)](generators/swift5.md)
+* [swift5](generators/swift5.md)
* [typescript (experimental)](generators/typescript.md)
* [typescript-angular](generators/typescript-angular.md)
* [typescript-angularjs-deprecated (deprecated)](generators/typescript-angularjs-deprecated.md)
@@ -80,7 +81,7 @@ The following generators are available:
* [ada-server](generators/ada-server.md)
* [aspnetcore](generators/aspnetcore.md)
* [cpp-pistache-server](generators/cpp-pistache-server.md)
-* [cpp-qt5-qhttpengine-server](generators/cpp-qt5-qhttpengine-server.md)
+* [cpp-qt-qhttpengine-server](generators/cpp-qt-qhttpengine-server.md)
* [cpp-restbed-server](generators/cpp-restbed-server.md)
* [csharp-nancyfx](generators/csharp-nancyfx.md)
* [erlang-server](generators/erlang-server.md)
@@ -119,6 +120,7 @@ The following generators are available:
* [php-symfony](generators/php-symfony.md)
* [python-aiohttp](generators/python-aiohttp.md)
* [python-blueplanet](generators/python-blueplanet.md)
+* [python-fastapi (beta)](generators/python-fastapi.md)
* [python-flask](generators/python-flask.md)
* [ruby-on-rails](generators/ruby-on-rails.md)
* [ruby-sinatra](generators/ruby-sinatra.md)
@@ -149,6 +151,7 @@ The following generators are available:
* [ktorm-schema (beta)](generators/ktorm-schema.md)
* [mysql-schema](generators/mysql-schema.md)
* [protobuf-schema (beta)](generators/protobuf-schema.md)
+* [wsdl-schema (beta)](generators/wsdl-schema.md)
## CONFIG generators
diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md
index 99f0b789bdc..d7e282c8279 100644
--- a/docs/generators/aspnetcore.md
+++ b/docs/generators/aspnetcore.md
@@ -9,7 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|aspnetCoreVersion|ASP.NET Core version: 5.0, 3.1, 3.0, 2.2, 2.1, 2.0 (deprecated)|
**2.0**
ASP.NET Core 2.0
**2.1**
ASP.NET Core 2.1
**2.2**
ASP.NET Core 2.2
**3.0**
ASP.NET Core 3.0
**3.1**
ASP.NET Core 3.1
**5.0**
ASP.NET Core 5.0
|3.1|
|buildTarget|Target to build an application or library|
**program**
Generate code for a standalone server
**library**
Generate code for a server abstract class library
|program|
-|classModifier|Class Modifier for controller classes: Empty string or abstract.|
****
Keep class default with no modifier
**abstract**
Make class abstract
||
+|classModifier|Class Modifier for controller classes: Empty string or abstract.| ||
|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_2|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumValueSuffix|Suffix that will be appended to all enum values.| |Enum|
@@ -17,8 +17,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|isLibrary|Is the build a library| |false|
|licenseName|The name of the license| |NoLicense|
|licenseUrl|The URL of the license| |http://localhost|
-|modelClassModifier|Model Class Modifier can be nothing or partial|
****
Keep model class default with no modifier
**partial**
Make model class partial
|partial|
+|modelClassModifier|Model Class Modifier can be nothing or partial| |partial|
|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0|
+|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.0 or newer.| |false|
|operationIsAsync|Set methods to async or sync (default).| |false|
|operationModifier|Operation Modifier can be virtual or abstract|
**virtual**
Keep method virtual
**abstract**
Make method abstract
|virtual|
|operationResultTask|Set methods result to Task<>.| |false|
diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt-client.md
similarity index 99%
rename from docs/generators/cpp-qt5-client.md
rename to docs/generators/cpp-qt-client.md
index ce9e00428f8..0dcbd968233 100644
--- a/docs/generators/cpp-qt5-client.md
+++ b/docs/generators/cpp-qt-client.md
@@ -1,6 +1,6 @@
---
-title: Config Options for cpp-qt5-client
-sidebar_label: cpp-qt5-client
+title: Config Options for cpp-qt-client
+sidebar_label: cpp-qt-client
---
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.
diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt-qhttpengine-server.md
similarity index 98%
rename from docs/generators/cpp-qt5-qhttpengine-server.md
rename to docs/generators/cpp-qt-qhttpengine-server.md
index 3467f16775b..efd57d28d7a 100644
--- a/docs/generators/cpp-qt5-qhttpengine-server.md
+++ b/docs/generators/cpp-qt-qhttpengine-server.md
@@ -1,6 +1,6 @@
---
-title: Config Options for cpp-qt5-qhttpengine-server
-sidebar_label: cpp-qt5-qhttpengine-server
+title: Config Options for cpp-qt-qhttpengine-server
+sidebar_label: cpp-qt-qhttpengine-server
---
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.
diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md
new file mode 100644
index 00000000000..1c90b5cbe8e
--- /dev/null
+++ b/docs/generators/cpp-tiny.md
@@ -0,0 +1,243 @@
+---
+title: Config Options for cpp-tiny
+sidebar_label: cpp-tiny
+---
+
+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 |
+| ------ | ----------- | ------ | ------- |
+|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|controller|name of microcontroller (e.g esp32 or esp8266)| |esp32|
+|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
+|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|true|
+|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
+|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
+|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
+|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
+|variableNameFirstCharacterUppercase|Make first character of variable name uppercase (eg. value -> Value)| |true|
+
+## IMPORT MAPPING
+
+| Type/Alias | Imports |
+| ---------- | ------- |
+
+
+## INSTANTIATION TYPES
+
+| Type/Alias | Instantiated By |
+| ---------- | --------------- |
+
+
+## LANGUAGE PRIMITIVES
+
+
+
bool
+
double
+
float
+
int
+
long
+
std::string
+
+
+## RESERVED WORDS
+
+
+
alignas
+
alignof
+
and
+
and_eq
+
asm
+
auto
+
bitand
+
bitor
+
bool
+
break
+
case
+
catch
+
char
+
char16_t
+
char32_t
+
class
+
compl
+
concept
+
const
+
const_cast
+
constexpr
+
continue
+
decltype
+
default
+
delete
+
do
+
double
+
dynamic_cast
+
else
+
enum
+
explicit
+
export
+
extern
+
false
+
float
+
for
+
friend
+
goto
+
if
+
inline
+
int
+
linux
+
long
+
mutable
+
namespace
+
new
+
noexcept
+
not
+
not_eq
+
nullptr
+
operator
+
or
+
or_eq
+
private
+
protected
+
public
+
register
+
reinterpret_cast
+
requires
+
return
+
short
+
signed
+
sizeof
+
static
+
static_assert
+
static_cast
+
struct
+
switch
+
template
+
this
+
thread_local
+
throw
+
true
+
try
+
typedef
+
typeid
+
typename
+
union
+
unsigned
+
using
+
virtual
+
void
+
volatile
+
wchar_t
+
while
+
xor
+
xor_eq
+
+
+## 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
+|Array|✓|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
+
+### 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
diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md
index 0887dcbfeca..8999e7a3a61 100644
--- a/docs/generators/csharp-netcore.md
+++ b/docs/generators/csharp-netcore.md
@@ -9,6 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false|
+|conditionalSerialization|Serialize only those properties which are initialized by user, accepted values are true or false, default value is false.| |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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I|
@@ -17,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase|
|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false|
|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false|
+|nullableReferenceTypes|Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.0 or newer.| |false|
|optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true|
|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false|
|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true|
diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md
index 36ac78aea6d..440b3461b0f 100644
--- a/docs/generators/go-server.md
+++ b/docs/generators/go-server.md
@@ -13,6 +13,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|packageName|Go package name (convention: lowercase).| |openapi|
|packageVersion|Go package version.| |1.0.0|
+|router|Specify the router which should be used.|
**mux**
mux
**chi**
chi
|mux|
|serverPort|The network port the generated server binds to| |8080|
|sourceFolder|source folder for generated code| |go|
diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md
index eca0bf2e080..51ac05927d3 100644
--- a/docs/generators/javascript-flowtyped.md
+++ b/docs/generators/javascript-flowtyped.md
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md
index 5499354747c..778b13ee7b3 100644
--- a/docs/generators/kotlin-server-deprecated.md
+++ b/docs/generators/kotlin-server-deprecated.md
@@ -80,16 +80,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl
continue
do
else
+
external
false
for
fun
if
in
interface
+
internal
is
null
object
+
open
package
+
private
return
super
this
diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md
index b45dc3ffb4d..f6e6c260343 100644
--- a/docs/generators/kotlin-server.md
+++ b/docs/generators/kotlin-server.md
@@ -17,6 +17,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false|
|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true|
|featureLocations|Generates routes in a typed way, for both: constructing URLs and reading the parameters.| |true|
+|featureMetrics|Enables metrics feature.| |true|
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|library|library template (sub-template)|
**ktor**
ktor framework
|ktor|
|modelMutable|Create mutable models| |false|
@@ -81,16 +82,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl
continue
do
else
+
external
false
for
fun
if
in
interface
+
internal
is
null
object
+
open
package
+
private
return
super
this
diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md
index 3c62035e71e..58152432964 100644
--- a/docs/generators/kotlin-spring.md
+++ b/docs/generators/kotlin-spring.md
@@ -93,16 +93,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl
continue
do
else
+
external
false
for
fun
if
in
interface
+
internal
is
null
object
+
open
package
+
private
return
super
this
diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md
index f92dadaf520..246ffa62a64 100644
--- a/docs/generators/kotlin-vertx.md
+++ b/docs/generators/kotlin-vertx.md
@@ -74,16 +74,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl
continue
do
else
+
external
false
for
fun
if
in
interface
+
internal
is
null
object
+
open
package
+
private
return
super
this
diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md
index f4b0aceeb60..8f853b41cac 100644
--- a/docs/generators/kotlin.md
+++ b/docs/generators/kotlin.md
@@ -14,7 +14,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|dateLibrary|Option. Date library to use|
**threetenbp-localdatetime**
Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
**string**
String
**java8-localdatetime**
Java 8 native JSR310 (jvm only, for legacy app only)
**java8**
Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
**threetenbp**
Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
|java8|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
-|library|Library template (sub-template) to use|
|jvm-okhttp4|
|modelMutable|Create mutable models| |false|
|moshiCodeGen|Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info.| |false|
|packageName|Generated artifact package name.| |org.openapitools.client|
@@ -25,6 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null|
|sourceFolder|source folder for generated code| |src/main/kotlin|
+|supportAndroidApiLevel25AndBelow|[WARNING] This flag will generate code that has a known security vulnerability. It uses `kotlin.io.createTempFile` instead of `java.nio.file.Files.createTempFile` in oder to support Android API level 25 and bellow. For more info, please check the following links https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf, https://github.com/OpenAPITools/openapi-generator/pull/9284| |false|
|useCoroutines|Whether to use the Coroutines adapter with the retrofit2 library.| |false|
|useRxJava|Whether to use the RxJava adapter with the retrofit2 library.| |false|
|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false|
@@ -83,16 +84,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl
continue
do
else
+
external
false
for
fun
if
in
interface
+
internal
is
null
object
+
open
package
+
private
return
super
this
diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md
index f691e8f57fb..93f31d7fbca 100644
--- a/docs/generators/php-mezzio-ph.md
+++ b/docs/generators/php-mezzio-ph.md
@@ -15,6 +15,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|true|
|modelPackage|package for generated models| |null|
+|modern|use modern language features (generated code will require PHP 8.0)| |false|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md
index a9c14eab47d..c822e241889 100644
--- a/docs/generators/powershell.md
+++ b/docs/generators/powershell.md
@@ -13,6 +13,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|discardReadOnly|Set discardReadonly to true to generate the Initialize cmdlet without readonly parameters| |null|
|iconUri|A URL to an icon representing the generated PowerShell module| |null|
|licenseUri|A URL to the license for the generated PowerShell module| |null|
+|modelsCmdletVerb|Verb to be used when generating the Models cmdlets in the examples.| |Initialize|
|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null|
|packageName|Client package name (e.g. PSTwitter).| |PSOpenAPITools|
|packageVersion|Package version (e.g. 0.1.2).| |0.1.2|
@@ -21,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|releaseNotes|Release notes of the generated PowerShell module| |null|
|skipVerbParsing|Set skipVerbParsing to not try get powershell verbs of operation names| |null|
|tags|Tags applied to the generated PowerShell module. These help with module discovery in online galleries| |null|
+|useClassNameInModelsExamples|Use classname instead of name when generating the Models cmdlets in the examples.| |true|
|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.| |null|
## IMPORT MAPPING
diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md
index 7c46da0b5b4..9adef96ba51 100644
--- a/docs/generators/python-aiohttp.md
+++ b/docs/generators/python-aiohttp.md
@@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|supportPython2|support python2. This option has been deprecated and will be removed in the 5.x release.| |false|
|useNose|use the nose test framework| |false|
+|usePythonSrcRootInImports|include pythonSrcRoot in import namespaces.| |false|
## IMPORT MAPPING
diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md
index 81c9b89cbf3..ba461d1822f 100644
--- a/docs/generators/python-blueplanet.md
+++ b/docs/generators/python-blueplanet.md
@@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|supportPython2|support python2. This option has been deprecated and will be removed in the 5.x release.| |false|
|useNose|use the nose test framework| |false|
+|usePythonSrcRootInImports|include pythonSrcRoot in import namespaces.| |false|
## IMPORT MAPPING
diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md
new file mode 100644
index 00000000000..2143321f2d7
--- /dev/null
+++ b/docs/generators/python-fastapi.md
@@ -0,0 +1,211 @@
+---
+title: Config Options for python-fastapi
+sidebar_label: python-fastapi
+---
+
+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 |
+| ------ | ----------- | ------ | ------- |
+|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
+|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|true|
+|packageName|python package name (convention: snake_case).| |openapi_server|
+|packageVersion|python package version.| |1.0.0|
+|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
+|serverPort|TCP port to listen to in app.run| |8080|
+|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
+|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
+
+## IMPORT MAPPING
+
+| Type/Alias | Imports |
+| ---------- | ------- |
+
+
+## INSTANTIATION TYPES
+
+| Type/Alias | Instantiated By |
+| ---------- | --------------- |
+
+
+## LANGUAGE PRIMITIVES
+
+
+
Dict
+
List
+
bool
+
bytes
+
date
+
datetime
+
dict
+
file
+
float
+
int
+
list
+
object
+
str
+
+
+## RESERVED WORDS
+
+
+
all_params
+
and
+
as
+
assert
+
async
+
auth_settings
+
await
+
body_params
+
break
+
class
+
continue
+
def
+
del
+
elif
+
else
+
except
+
exec
+
false
+
finally
+
for
+
form_params
+
from
+
global
+
header_params
+
if
+
import
+
in
+
is
+
lambda
+
local_var_files
+
none
+
nonlocal
+
not
+
or
+
pass
+
path_params
+
print
+
property
+
query_params
+
raise
+
resource_path
+
return
+
self
+
true
+
try
+
while
+
with
+
yield
+
+
+## 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
+|Array|✓|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
+
+### 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
diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md
index 92bf4fdb97f..9e69fa44302 100644
--- a/docs/generators/python-flask.md
+++ b/docs/generators/python-flask.md
@@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|supportPython2|support python2. This option has been deprecated and will be removed in the 5.x release.| |false|
|useNose|use the nose test framework| |false|
+|usePythonSrcRootInImports|include pythonSrcRoot in import namespaces.| |false|
## IMPORT MAPPING
diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md
index 9774b434f13..96cfe8424c0 100644
--- a/docs/generators/swift5.md
+++ b/docs/generators/swift5.md
@@ -11,10 +11,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|apiNamePrefix|Prefix that will be appended to all API names ('tags'). Default: empty string. e.g. Pet => Pet.| |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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
+|generateModelAdditionalProperties|Generate model additional properties (default: true)| |true|
+|hashableModels|Make hashable models (default: true)| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|true|
|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false|
-|library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
|urlsession|
+|library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
**vapor**
HTTP client: Vapor
|urlsession|
+|mapFileBinaryToData|[WARNING] This option will be removed and enabled by default in the future once we've enhanced the code to work with `Data` in all the different situations. Map File and Binary to Data (default: false)| |false|
|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null|
|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null|
|podAuthors|Authors used for Podspec| |null|
@@ -36,6 +39,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|swiftPackagePath|Set a custom source path instead of OpenAPIClient/Classes/OpenAPIs.| |null|
|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null|
|useBacktickEscapes|Escape reserved words using backticks (default: false)| |false|
+|useClasses|Use final classes for models instead of structs (default: false)| |false|
|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null|
## IMPORT MAPPING
diff --git a/docs/generators/tiny-cpp.md b/docs/generators/tiny-cpp.md
new file mode 100644
index 00000000000..f7f6a0385ca
--- /dev/null
+++ b/docs/generators/tiny-cpp.md
@@ -0,0 +1,243 @@
+---
+title: Config Options for tiny-cpp
+sidebar_label: tiny-cpp
+---
+
+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 |
+| ------ | ----------- | ------ | ------- |
+|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|controller|name of microcontroller (e.g esp32 or esp8266)| |esp32|
+|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
+|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|true|
+|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
+|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
+|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
+|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
+|variableNameFirstCharacterUppercase|Make first character of variable name uppercase (eg. value -> Value)| |true|
+
+## IMPORT MAPPING
+
+| Type/Alias | Imports |
+| ---------- | ------- |
+
+
+## INSTANTIATION TYPES
+
+| Type/Alias | Instantiated By |
+| ---------- | --------------- |
+
+
+## LANGUAGE PRIMITIVES
+
+
+
bool
+
double
+
float
+
int
+
long
+
std::string
+
+
+## RESERVED WORDS
+
+
+
alignas
+
alignof
+
and
+
and_eq
+
asm
+
auto
+
bitand
+
bitor
+
bool
+
break
+
case
+
catch
+
char
+
char16_t
+
char32_t
+
class
+
compl
+
concept
+
const
+
const_cast
+
constexpr
+
continue
+
decltype
+
default
+
delete
+
do
+
double
+
dynamic_cast
+
else
+
enum
+
explicit
+
export
+
extern
+
false
+
float
+
for
+
friend
+
goto
+
if
+
inline
+
int
+
linux
+
long
+
mutable
+
namespace
+
new
+
noexcept
+
not
+
not_eq
+
nullptr
+
operator
+
or
+
or_eq
+
private
+
protected
+
public
+
register
+
reinterpret_cast
+
requires
+
return
+
short
+
signed
+
sizeof
+
static
+
static_assert
+
static_cast
+
struct
+
switch
+
template
+
this
+
thread_local
+
throw
+
true
+
try
+
typedef
+
typeid
+
typename
+
union
+
unsigned
+
using
+
virtual
+
void
+
volatile
+
wchar_t
+
while
+
xor
+
xor_eq
+
+
+## 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
+|Array|✓|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
+
+### 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
diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md
index 6916e3f662c..67341026ceb 100644
--- a/docs/generators/typescript-angular.md
+++ b/docs/generators/typescript-angular.md
@@ -24,6 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|providedIn|Use this property to provide Injectables in wanted level (it is only valid in angular version greater or equal to 9.0.0).|
**root**
The application-level injector in most apps.
**none**
No providedIn (same as providedInRoot=false)
**any**
Provides a unique instance in each lazy loaded module while all eagerly loaded modules share one instance.
**platform**
A special singleton platform injector shared by all applications on the page.
|root|
|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0). IMPORTANT: Deprecated for angular version greater or equal to 9.0.0, use **providedIn** instead.| |false|
diff --git a/docs/generators/typescript-angularjs-deprecated.md b/docs/generators/typescript-angularjs-deprecated.md
index 889c9fb3d2d..9363a6958da 100644
--- a/docs/generators/typescript-angularjs-deprecated.md
+++ b/docs/generators/typescript-angularjs-deprecated.md
@@ -15,6 +15,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|true|
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md
index a1f568cfb65..aaad28dd75b 100644
--- a/docs/generators/typescript-aurelia.md
+++ b/docs/generators/typescript-aurelia.md
@@ -17,6 +17,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md
index 5bddee54189..3e9f31aed5f 100644
--- a/docs/generators/typescript-axios.md
+++ b/docs/generators/typescript-axios.md
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md
index 2acbe8c7741..f8e9cd2328a 100644
--- a/docs/generators/typescript-fetch.md
+++ b/docs/generators/typescript-fetch.md
@@ -18,8 +18,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prefixParameterInterfaces|Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
+|sagasAndRecords|Setting this property to true will generate additional files for use with redux-saga and immutablejs.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md
index 41df5d2b2b7..38077cb2b40 100644
--- a/docs/generators/typescript-inversify.md
+++ b/docs/generators/typescript-inversify.md
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md
index 33713bf6f85..fcff7abe194 100644
--- a/docs/generators/typescript-jquery.md
+++ b/docs/generators/typescript-jquery.md
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-nestjs.md b/docs/generators/typescript-nestjs.md
index 0697f2266f6..50e9acb1675 100644
--- a/docs/generators/typescript-nestjs.md
+++ b/docs/generators/typescript-nestjs.md
@@ -22,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service|
|serviceSuffix|The suffix of the generated service.| |Service|
diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md
index 8c755639588..388dfd551bd 100644
--- a/docs/generators/typescript-node.md
+++ b/docs/generators/typescript-node.md
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md
index f35e028ff4b..dd79fa1a433 100644
--- a/docs/generators/typescript-redux-query.md
+++ b/docs/generators/typescript-redux-query.md
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md
index 05909b89bd2..50999179985 100644
--- a/docs/generators/typescript-rxjs.md
+++ b/docs/generators/typescript-rxjs.md
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md
new file mode 100644
index 00000000000..7842f856749
--- /dev/null
+++ b/docs/generators/wsdl-schema.md
@@ -0,0 +1,150 @@
+---
+title: Config Options for wsdl-schema
+sidebar_label: wsdl-schema
+---
+
+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 |
+| ------ | ----------- | ------ | ------- |
+|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
+|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
+|hostname|the hostname of the service| |null|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|true|
+|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
+|serviceName|service name for the wsdl| |null|
+|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|
+
+## IMPORT MAPPING
+
+| Type/Alias | Imports |
+| ---------- | ------- |
+
+
+## INSTANTIATION TYPES
+
+| Type/Alias | Instantiated By |
+| ---------- | --------------- |
+
+
+## LANGUAGE PRIMITIVES
+
+
+
+
+## RESERVED WORDS
+
+
+
+
+## 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
+|Array|✓|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
+
+### 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
diff --git a/docs/plugins.md b/docs/plugins.md
index 691c5fa85d1..c9fbbe5b548 100644
--- a/docs/plugins.md
+++ b/docs/plugins.md
@@ -45,7 +45,7 @@ For full details of all options, see the [plugin README](https://github.com/Open
### Dependencies
-The generated models use commonly use Swagger v2 annotations like `@ApiModelProperty`. A user may add Swagger v3 annotations:
+The generated models use commonly used Swagger v2 annotations like `@ApiModelProperty`. A user may add Swagger v3 annotations:
```xml
diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc
index 08b09304900..86c2df36c1f 100644
--- a/modules/openapi-generator-gradle-plugin/README.adoc
+++ b/modules/openapi-generator-gradle-plugin/README.adoc
@@ -97,7 +97,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid
[source,group]
----
plugins {
- id "org.openapi.generator" version "5.1.0"
+ id "org.openapi.generator" version "5.1.1"
}
----
@@ -113,7 +113,7 @@ buildscript {
// url "https://plugins.gradle.org/m2/"
}
dependencies {
- classpath "org.openapitools:openapi-generator-gradle-plugin:5.1.0"
+ classpath "org.openapitools:openapi-generator-gradle-plugin:5.1.1"
}
}
diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt
index 3d0cbab2b06..6f3038e4e29 100644
--- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt
+++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt
@@ -56,11 +56,11 @@ import org.openapitools.codegen.validations.oas.RuleConfiguration
open class ValidateTask : DefaultTask() {
@get:InputFile
@PathSensitive(PathSensitivity.RELATIVE)
- var inputSpec = project.objects.property()
+ val inputSpec = project.objects.property()
@Optional
@Input
- var recommend = project.objects.property()
+ val recommend = project.objects.property()
@Suppress("unused")
@get:Internal
@@ -128,4 +128,4 @@ open class ValidateTask : DefaultTask() {
out.println("Spec is valid.")
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt
index 2b06e853192..94ae68ab3af 100644
--- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt
+++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt
@@ -3,6 +3,8 @@ package org.openapitools.generator.gradle.plugin
import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.TaskOutcome.FAILED
import org.gradle.testkit.runner.TaskOutcome.SUCCESS
+import org.gradle.util.GradleVersion
+import org.testng.annotations.DataProvider
import org.testng.annotations.Test
import java.io.File
import kotlin.test.assertEquals
@@ -11,8 +13,25 @@ import kotlin.test.assertTrue
class ValidateTaskDslTest : TestBase() {
override var temp: File = createTempDir(javaClass.simpleName)
- @Test
- fun `openApiValidate should fail on non-file spec`() {
+ @DataProvider(name = "gradle_version_provider")
+ fun gradleVersionProvider(): Array> = arrayOf(
+ arrayOf(null), // uses the version of Gradle used to build the plugin itself
+ arrayOf("5.6.4"),
+ arrayOf("6.9"),
+ arrayOf("7.0"))
+
+ private fun getGradleRunner(gradleVersion: String?): GradleRunner {
+ val gradleRunner = GradleRunner.create()
+ return if (gradleVersion.isNullOrBlank()) {
+ //Use the current version of Gradle
+ gradleRunner
+ } else {
+ gradleRunner.withGradleVersion(gradleVersion)
+ }
+ }
+
+ @Test(dataProvider = "gradle_version_provider")
+ fun `openApiValidate should fail on non-file spec`(gradleVersion: String?) {
// Arrange
withProject("""
| plugins {
@@ -25,20 +44,28 @@ class ValidateTaskDslTest : TestBase() {
""".trimMargin())
// Act
- val result = GradleRunner.create()
+ val result = getGradleRunner(gradleVersion)
.withProjectDir(temp)
.withArguments("openApiValidate")
.withPluginClasspath()
.buildAndFail()
// Assert
- assertTrue(result.output.contains("some_location' specified for property 'inputSpec' does not exist"), "Unexpected/no message presented to the user for a spec pointing to an invalid URI.")
+ val gradleActualVersion = gradleVersion ?: GradleVersion.current().version
+ val gradleVersionParts = gradleActualVersion.split(".")
+ val isBeforeGradle7 = (gradleVersionParts.isEmpty() || gradleVersionParts[0].toInt() < 7)
+ val expectedMessage = if (isBeforeGradle7) {
+ "some_location' specified for property 'inputSpec' does not exist"
+ } else {
+ "An input file was expected to be present but it doesn't exist."
+ }
+ assertTrue(result.output.contains(expectedMessage), "Unexpected/no message presented to the user for a spec pointing to an invalid URI.")
assertEquals(FAILED, result.task(":openApiValidate")?.outcome,
"Expected a failed run, but found ${result.task(":openApiValidate")?.outcome}")
}
- @Test
- fun `openApiValidate should succeed on valid spec`() {
+ @Test(dataProvider = "gradle_version_provider")
+ fun `openApiValidate should succeed on valid spec`(gradleVersion: String?) {
// Arrange
val projectFiles = mapOf(
"spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml")
@@ -55,7 +82,7 @@ class ValidateTaskDslTest : TestBase() {
""".trimMargin(), projectFiles)
// Act
- val result = GradleRunner.create()
+ val result = getGradleRunner(gradleVersion)
.withProjectDir(temp)
.withArguments("openApiValidate")
.withPluginClasspath()
@@ -67,8 +94,8 @@ class ValidateTaskDslTest : TestBase() {
"Expected a successful run, but found ${result.task(":openApiValidate")?.outcome}")
}
- @Test
- fun `openApiValidate should fail on invalid spec`() {
+ @Test(dataProvider = "gradle_version_provider")
+ fun `openApiValidate should fail on invalid spec`(gradleVersion: String?) {
// Arrange
val projectFiles = mapOf(
"spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0-invalid.yaml")
@@ -84,7 +111,7 @@ class ValidateTaskDslTest : TestBase() {
""".trimMargin(), projectFiles)
// Act
- val result = GradleRunner.create()
+ val result = getGradleRunner(gradleVersion)
.withProjectDir(temp)
.withArguments("openApiValidate")
.withPluginClasspath()
@@ -96,4 +123,4 @@ class ValidateTaskDslTest : TestBase() {
"Expected a failed run, but found ${result.task(":openApiValidate")?.outcome}")
}
-}
\ No newline at end of file
+}
diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml
index 3c3972591cb..57c046022a7 100644
--- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml
+++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml
@@ -219,6 +219,13 @@
okhttp4.2.2
+
+
+
+ org.jetbrains.kotlin
+ kotlin-stdlib
+ ${kotlin.version}
+
@@ -229,7 +236,7 @@
2.71.0.04.8.1
- 1.3.50
+ 1.5.101.81.8.02.2
diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java
index be21b970d7a..7cf052e3083 100644
--- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java
+++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java
@@ -153,7 +153,7 @@ public class Generator {
List files = new DefaultGenerator().opts(clientOptInput).generate();
if (files.size() > 0) {
List filesToAdd = new ArrayList<>();
- LOGGER.debug("adding to " + outputFolder);
+ LOGGER.debug("adding to {}", outputFolder);
filesToAdd.add(new File(outputFolder));
ZipUtil zip = new ZipUtil();
zip.compressFiles(filesToAdd, outputFilename);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
index 631ff47eedb..bb7aa069fe7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
@@ -184,6 +184,9 @@ public class CodegenConstants {
public static final String OPTIONAL_EMIT_DEFAULT_VALUES = "optionalEmitDefaultValues";
public static final String OPTIONAL_EMIT_DEFAULT_VALUES_DESC = "Set DataMember's EmitDefaultValue.";
+ public static final String OPTIONAL_CONDITIONAL_SERIALIZATION = "conditionalSerialization";
+ public static final String OPTIONAL_CONDITIONAL_SERIALIZATION_DESC = "Serialize only those properties which are initialized by user, accepted values are true or false, default value is false.";
+
public static final String NETCORE_PROJECT_FILE = "netCoreProjectFile";
public static final String NETCORE_PROJECT_FILE_DESC = "Use the new format (.NET Core) for .NET project files (.csproj).";
@@ -205,12 +208,20 @@ public class CodegenConstants {
public static final String MODEL_PROPERTY_NAMING = "modelPropertyNaming";
public static final String MODEL_PROPERTY_NAMING_DESC = "Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name";
+ public static final String PARAM_NAMING = "paramNaming";
+ public static final String PARAM_NAMING_DESC = "Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name";
+
public static final String DOTNET_FRAMEWORK = "targetFramework";
public static final String DOTNET_FRAMEWORK_DESC = "The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.0`";
+ public static final String NULLABLE_REFERENCE_TYPES = "nullableReferenceTypes";
+ public static final String NULLABLE_REFERENCE_TYPES_DESC = "Use nullable annotations in the project. Only supported on C# 8 / ASP.NET Core 3.0 or newer.";
+
public static final String TEMPLATING_ENGINE = "templatingEngine";
public static final String TEMPLATING_ENGINE_DESC = "The templating engine plugin to use: \"mustache\" (default) or \"handlebars\" (beta)";
+ public static enum PARAM_NAMING_TYPE {camelCase, PascalCase, snake_case, original}
+
public static enum MODEL_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, original}
public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case, original, UPPERCASE}
@@ -309,6 +320,12 @@ public class CodegenConstants {
public static final String REMOVE_OPERATION_ID_PREFIX = "removeOperationIdPrefix";
public static final String REMOVE_OPERATION_ID_PREFIX_DESC = "Remove prefix of operationId, e.g. config_getId => getId";
+ public static final String REMOVE_OPERATION_ID_PREFIX_DELIMITER = "removeOperationIdPrefixDelimiter";
+ public static final String REMOVE_OPERATION_ID_PREFIX_DELIMITER_DESC = "Character to use as a delimiter for the prefix. Default: '_'";
+
+ public static final String REMOVE_OPERATION_ID_PREFIX_COUNT = "removeOperationIdPrefixCount";
+ public static final String REMOVE_OPERATION_ID_PREFIX_COUNT_DESC = "Count of delimiter for the prefix. Use -1 for last Default: 1";
+
public static final String SKIP_OPERATION_EXAMPLE = "skipOperationExample";
public static final String SKIP_OPERATION_EXAMPLE_DESC = "Skip examples defined in operations to avoid out of memory errors.";
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index e7a3adce6a3..a441659434a 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
@@ -64,7 +64,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
public String defaultValue;
public String arrayModelType;
public boolean isAlias; // Is this effectively an alias of another simple type
- public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime;
+ public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isShort, isUnboundedInteger, isBoolean;
private boolean additionalPropertiesIsAnyType;
public List vars = new ArrayList(); // all properties (without parent's properties)
public List allVars = new ArrayList(); // all properties (with parent's properties)
@@ -606,6 +606,30 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
this.isArray = isArray;
}
+ @Override
+ public boolean getIsShort() { return isShort; }
+
+ @Override
+ public void setIsShort(boolean isShort) {
+ this.isShort = isShort;
+ }
+
+ @Override
+ public boolean getIsBoolean() { return isBoolean; }
+
+ @Override
+ public void setIsBoolean(boolean isBoolean) {
+ this.isBoolean= isBoolean;
+ }
+
+ @Override
+ public boolean getIsUnboundedInteger() { return isUnboundedInteger; }
+
+ @Override
+ public void setIsUnboundedInteger(boolean isUnboundedInteger) {
+ this.isUnboundedInteger = isUnboundedInteger;
+ }
+
@Override
public CodegenProperty getAdditionalProperties() { return additionalProperties; }
@@ -752,7 +776,10 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
return isAlias == that.isAlias &&
isString == that.isString &&
isInteger == that.isInteger &&
+ isShort == that.isShort &&
isLong == that.isLong &&
+ isUnboundedInteger == that.isUnboundedInteger &&
+ isBoolean == that.isBoolean &&
isNumber == that.isNumber &&
isNumeric == that.isNumeric &&
isFloat == that.isFloat &&
@@ -839,7 +866,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
getDescription(), getClassVarName(), getModelJson(), getDataType(), getXmlPrefix(), getXmlNamespace(),
getXmlName(), getClassFilename(), getUnescapedDescription(), getDiscriminator(), getDefaultValue(),
getArrayModelType(), isAlias, isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble,
- isDate, isDateTime, isNull, hasValidation,
+ isDate, isDateTime, isNull, hasValidation, isShort, isUnboundedInteger, isBoolean,
getVars(), getAllVars(), getRequiredVars(), getOptionalVars(), getReadOnlyVars(), getReadWriteVars(),
getParentVars(), getAllowableValues(), getMandatory(), getAllMandatory(), getImports(), hasVars,
isEmptyVars(), hasMoreModels, hasEnums, isEnum, isNullable, hasRequired, hasOptional, isArray,
@@ -881,7 +908,10 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
sb.append(", isAlias=").append(isAlias);
sb.append(", isString=").append(isString);
sb.append(", isInteger=").append(isInteger);
+ sb.append(", isShort=").append(isShort);
sb.append(", isLong=").append(isLong);
+ sb.append(", isUnboundedInteger=").append(isUnboundedInteger);
+ sb.append(", isBoolean=").append(isBoolean);
sb.append(", isNumber=").append(isNumber);
sb.append(", isNumeric=").append(isNumeric);
sb.append(", isFloat=").append(isFloat);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
index 326785046d9..874ac93d152 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
@@ -35,7 +35,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
public String example; // example value (x-example)
public String jsonSchema;
public boolean isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary,
- isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType;
+ isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isShort, isUnboundedInteger;
public boolean isArray, isMap;
public boolean isFile;
public boolean isEnum;
@@ -184,7 +184,9 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
output.isString = this.isString;
output.isNumeric = this.isNumeric;
output.isInteger = this.isInteger;
+ output.isShort = this.isShort;
output.isLong = this.isLong;
+ output.isUnboundedInteger = this.isUnboundedInteger;
output.isDouble = this.isDouble;
output.isDecimal = this.isDecimal;
output.isFloat = this.isFloat;
@@ -209,7 +211,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
@Override
public int hashCode() {
- return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, isDeepObject, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired);
+ return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, isDeepObject, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired, isShort, isUnboundedInteger);
}
@Override
@@ -231,7 +233,9 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
isString == that.isString &&
isNumeric == that.isNumeric &&
isInteger == that.isInteger &&
+ isShort == that.isShort &&
isLong == that.isLong &&
+ isUnboundedInteger == that.isUnboundedInteger &&
isNumber == that.isNumber &&
isFloat == that.isFloat &&
isDouble == that.isDouble &&
@@ -328,7 +332,9 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
sb.append(", isString=").append(isString);
sb.append(", isNumeric=").append(isNumeric);
sb.append(", isInteger=").append(isInteger);
+ sb.append(", isShort=").append(isShort);
sb.append(", isLong=").append(isLong);
+ sb.append(", isUnboundedInteger=").append(isUnboundedInteger);
sb.append(", isNumber=").append(isNumber);
sb.append(", isFloat=").append(isFloat);
sb.append(", isDouble=").append(isDouble);
@@ -560,6 +566,30 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
this.isArray = isArray;
}
+ @Override
+ public boolean getIsShort() { return isShort; }
+
+ @Override
+ public void setIsShort(boolean isShort) {
+ this.isShort = isShort;
+ }
+
+ @Override
+ public boolean getIsBoolean() { return isBoolean; }
+
+ @Override
+ public void setIsBoolean(boolean isBoolean) {
+ this.isBoolean = isBoolean;
+ }
+
+ @Override
+ public boolean getIsUnboundedInteger() { return isUnboundedInteger; }
+
+ @Override
+ public void setIsUnboundedInteger(boolean isUnboundedInteger) {
+ this.isUnboundedInteger = isUnboundedInteger;
+ }
+
@Override
public CodegenProperty getAdditionalProperties() { return additionalProperties; }
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
index b20e55f61b4..4ccbb8c3a9d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
@@ -118,7 +118,9 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
public boolean isString;
public boolean isNumeric;
public boolean isInteger;
+ public boolean isShort;
public boolean isLong;
+ public boolean isUnboundedInteger;
public boolean isNumber;
public boolean isFloat;
public boolean isDouble;
@@ -507,6 +509,30 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
this.isArray = isArray;
}
+ @Override
+ public boolean getIsShort() { return isShort; }
+
+ @Override
+ public void setIsShort(boolean isShort) {
+ this.isShort = isShort;
+ }
+
+ @Override
+ public boolean getIsBoolean() { return isBoolean; }
+
+ @Override
+ public void setIsBoolean(boolean isBoolean) {
+ this.isBoolean = isBoolean;
+ }
+
+ @Override
+ public boolean getIsUnboundedInteger() { return isUnboundedInteger; }
+
+ @Override
+ public void setIsUnboundedInteger(boolean isUnboundedInteger) {
+ this.isUnboundedInteger = isUnboundedInteger;
+ }
+
public Map getVendorExtensions() {
return vendorExtensions;
}
@@ -652,10 +678,12 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
this.maxProperties = maxProperties;
}
+ @Override
public Number getMultipleOf() {
return multipleOf;
}
+ @Override
public void setMultipleOf(Number multipleOf) {
this.multipleOf = multipleOf;
}
@@ -765,7 +793,9 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
sb.append(", isString=").append(isString);
sb.append(", isNumeric=").append(isNumeric);
sb.append(", isInteger=").append(isInteger);
+ sb.append(", isShort=").append(isShort);
sb.append(", isLong=").append(isLong);
+ sb.append(", isUnboundedInteger=").append(isUnboundedInteger);
sb.append(", isNumber=").append(isNumber);
sb.append(", isFloat=").append(isFloat);
sb.append(", isDouble=").append(isDouble);
@@ -838,7 +868,9 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
isString == that.isString &&
isNumeric == that.isNumeric &&
isInteger == that.isInteger &&
+ isShort == that.isShort &&
isLong == that.isLong &&
+ isUnboundedInteger == that.isUnboundedInteger &&
isNumber == that.isNumber &&
isFloat == that.isFloat &&
isDouble == that.isDouble &&
@@ -926,7 +958,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric,
isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile,
isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject,
- isArray, isMap, isEnum, isReadOnly, isWriteOnly, isNullable,
+ isArray, isMap, isEnum, isReadOnly, isWriteOnly, isNullable, isShort, isUnboundedInteger,
isSelfReference, isCircularReference, isDiscriminator, _enum, allowableValues,
items, mostInnerItems, additionalProperties, vars, requiredVars,
vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase,
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
index bb062c1304f..22c85170bbb 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
@@ -36,7 +36,9 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
public boolean isString;
public boolean isNumeric;
public boolean isInteger;
+ public boolean isShort;
public boolean isLong;
+ public boolean isUnboundedInteger;
public boolean isNumber;
public boolean isFloat;
public boolean isDouble;
@@ -89,7 +91,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate,
isDateTime, isUuid, isEmail, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType,
isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties,
- vars, requiredVars, isNull, hasValidation,
+ vars, requiredVars, isNull, hasValidation, isShort, isUnboundedInteger,
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(),
is1xx, is2xx, is3xx, is4xx, is5xx, additionalPropertiesIsAnyType, hasVars, hasRequired);
@@ -104,7 +106,9 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
isString == that.isString &&
isNumeric == that.isNumeric &&
isInteger == that.isInteger &&
+ isShort == that.isShort &&
isLong == that.isLong &&
+ isUnboundedInteger == that.isUnboundedInteger &&
isNumber == that.isNumber &&
isFloat == that.isFloat &&
isDouble == that.isDouble &&
@@ -316,6 +320,30 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
this.isArray = isArray;
}
+ @Override
+ public boolean getIsShort() { return isShort; }
+
+ @Override
+ public void setIsShort(boolean isShort) {
+ this.isShort = isShort;
+ }
+
+ @Override
+ public boolean getIsBoolean() { return isBoolean; }
+
+ @Override
+ public void setIsBoolean(boolean isBoolean) {
+ this.isBoolean = isBoolean;
+ }
+
+ @Override
+ public boolean getIsUnboundedInteger() { return isUnboundedInteger; }
+
+ @Override
+ public void setIsUnboundedInteger(boolean isUnboundedInteger) {
+ this.isUnboundedInteger = isUnboundedInteger;
+ }
+
@Override
public void setIsModel(boolean isModel) {
this.isModel = isModel;
@@ -402,7 +430,9 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
sb.append(", isString=").append(isString);
sb.append(", isNumeric=").append(isNumeric);
sb.append(", isInteger=").append(isInteger);
+ sb.append(", isShort=").append(isShort);
sb.append(", isLong=").append(isLong);
+ sb.append(", isUnboundedInteger=").append(isUnboundedInteger);
sb.append(", isNumber=").append(isNumber);
sb.append(", isFloat=").append(isFloat);
sb.append(", isDouble=").append(isDouble);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index 2edf1bf15af..b17b449893f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -177,6 +177,8 @@ public class DefaultCodegen implements CodegenConfig {
protected List cliOptions = new ArrayList();
protected boolean skipOverwrite;
protected boolean removeOperationIdPrefix;
+ protected String removeOperationIdPrefixDelimiter = "_";
+ protected int removeOperationIdPrefixCount = 1;
protected boolean skipOperationExample;
protected final static Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)application\\/json(;.*)?");
@@ -254,10 +256,12 @@ public class DefaultCodegen implements CodegenConfig {
// A cache to efficiently lookup a Schema instance based on the return value of `toModelName()`.
private Map modelNameToSchemaCache;
+ @Override
public List cliOptions() {
return cliOptions;
}
+ @Override
public void processOpts() {
if (additionalProperties.containsKey(CodegenConstants.TEMPLATE_DIR)) {
this.setTemplateDir((String) additionalProperties.get(CodegenConstants.TEMPLATE_DIR));
@@ -323,6 +327,16 @@ public class DefaultCodegen implements CodegenConfig {
.get(CodegenConstants.REMOVE_OPERATION_ID_PREFIX).toString()));
}
+ if (additionalProperties.containsKey(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER)) {
+ this.setRemoveOperationIdPrefixDelimiter(additionalProperties
+ .get(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER).toString());
+ }
+
+ if (additionalProperties.containsKey(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT)) {
+ this.setRemoveOperationIdPrefixCount(Integer.parseInt(additionalProperties
+ .get(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT).toString()));
+ }
+
if (additionalProperties.containsKey(CodegenConstants.SKIP_OPERATION_EXAMPLE)) {
this.setSkipOperationExample(Boolean.parseBoolean(additionalProperties
.get(CodegenConstants.SKIP_OPERATION_EXAMPLE).toString()));
@@ -398,6 +412,7 @@ public class DefaultCodegen implements CodegenConfig {
}
// override with any special post-processing for all models
+ @Override
@SuppressWarnings({"static-method", "unchecked"})
public Map postProcessAllModels(Map objs) {
if (this.useOneOfInterfaces) {
@@ -500,6 +515,7 @@ public class DefaultCodegen implements CodegenConfig {
* @param objs Map of models
* @return maps of models with various updates
*/
+ @Override
public Map updateAllModels(Map objs) {
Map allModels = getAllModels(objs);
@@ -612,6 +628,7 @@ public class DefaultCodegen implements CodegenConfig {
}
// override with any special post-processing
+ @Override
@SuppressWarnings("static-method")
public Map postProcessModels(Map objs) {
return objs;
@@ -716,7 +733,7 @@ public class DefaultCodegen implements CodegenConfig {
* @return the sanitized value for enum
*/
public String toEnumValue(String value, String datatype) {
- if ("number".equalsIgnoreCase(datatype)) {
+ if ("number".equalsIgnoreCase(datatype) || "boolean".equalsIgnoreCase(datatype)) {
return value;
} else {
return "\"" + escapeText(value) + "\"";
@@ -756,6 +773,7 @@ public class DefaultCodegen implements CodegenConfig {
}
// override with any message to be shown right before the process finishes
+ @Override
@SuppressWarnings("static-method")
public void postProcess() {
System.out.println("################################################################################");
@@ -766,28 +784,33 @@ public class DefaultCodegen implements CodegenConfig {
}
// override with any special post-processing
+ @Override
@SuppressWarnings("static-method")
public Map postProcessOperationsWithModels(Map objs, List