diff --git a/.github/workflows/check-supported-versions.yaml b/.github/workflows/check-supported-versions.yaml index 350c008e90..c46a56cfab 100644 --- a/.github/workflows/check-supported-versions.yaml +++ b/.github/workflows/check-supported-versions.yaml @@ -91,5 +91,7 @@ jobs: git config --global core.safecrlf false git config --global core.autocrlf true 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 + # test with java (jersey2) client generation only as ensure-up-to-date script is run in another job instead ./bin/generate-samples.sh ./bin/configs/java-jersey2-8.yaml + # test debugSupportingFiles + ./bin/generate-samples.sh ./bin/configs/python.yaml -- --global-property debugSupportingFiles diff --git a/.github/workflows/samples-dotnet-standard.yaml b/.github/workflows/samples-dotnet-standard.yaml new file mode 100644 index 0000000000..794042e21b --- /dev/null +++ b/.github/workflows/samples-dotnet-standard.yaml @@ -0,0 +1,30 @@ +name: Samples C# .Net Standard + +on: + push: + paths: + - 'samples/client/petstore/csharp-netcore/**netstandard**/' + pull_request: + paths: + - 'samples/client/petstore/csharp-netcore/**netstandard**/' +jobs: + build: + name: Build .Net projects + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3.0.3 + with: + dotnet-version: 2.1.* + - name: Build + working-directory: ${{ matrix.sample }} + run: dotnet build Org.OpenAPITools.sln + - name: Test + working-directory: ${{ matrix.sample }} + run: dotnet test Org.OpenAPITools.sln diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml index 56a8ec2d4d..c345dad282 100644 --- a/.github/workflows/samples-dotnet.yaml +++ b/.github/workflows/samples-dotnet.yaml @@ -4,11 +4,13 @@ on: push: paths: - 'samples/client/petstore/csharp-netcore/**net6.0**/' + - 'samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore**/' - 'samples/server/petstore/aspnetcore-6.0/**' - 'samples/server/petstore/aspnetcore-6.0-pocoModels/**' pull_request: paths: - 'samples/client/petstore/csharp-netcore/**net6.0**/' + - 'samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore**/' - 'samples/server/petstore/aspnetcore-6.0/**' - 'samples/server/petstore/aspnetcore-6.0-pocoModels/**' jobs: @@ -22,6 +24,9 @@ jobs: # clients - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0 - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt + - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf + - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf + - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf - samples/server/petstore/aspnetcore-6.0 - samples/server/petstore/aspnetcore-6.0-pocoModels - samples/server/petstore/aspnetcore-6.0-project4Models @@ -29,7 +34,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v3.0.3 with: - dotnet-version: '6.0.x' + dotnet-version: '7.0.x' - name: Build working-directory: ${{ matrix.sample }} run: dotnet build Org.OpenAPITools.sln diff --git a/.github/workflows/samples-java-client-echo-api-jdk11.yaml b/.github/workflows/samples-java-client-echo-api-jdk11.yaml new file mode 100644 index 0000000000..12813b6350 --- /dev/null +++ b/.github/workflows/samples-java-client-echo-api-jdk11.yaml @@ -0,0 +1,44 @@ +name: Java Client (Echo API) JDK11 + +on: + push: + paths: + - samples/client/echo_api/java/** + pull_request: + paths: + - samples/client/echo_api/java/** +jobs: + build: + name: Build Java Client JDK11 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/echo_api/java/apache-httpclient + - samples/client/echo_api/java/native + - samples/client/echo_api/java/feign-gson + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 11 + - name: Cache maven dependencies + uses: actions/cache@v3 + env: + cache-name: maven-repository + with: + path: | + ~/.m2 + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Setup node.js + uses: actions/setup-node@v3 + - name: Run echo server + run: | + git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server + (cd http-echo-server && npm install && npm start &) + - name: Build + working-directory: ${{ matrix.sample }} + run: mvn clean package diff --git a/.github/workflows/samples-java-client-echo-api-jdk8.yaml b/.github/workflows/samples-java-client-echo-api-jdk8.yaml new file mode 100644 index 0000000000..42a220e658 --- /dev/null +++ b/.github/workflows/samples-java-client-echo-api-jdk8.yaml @@ -0,0 +1,48 @@ +name: Java Client (Echo API) JDK8 + +on: + push: + paths: + - samples/client/echo_api/java/apache-httpclient/** + - samples/client/echo_api/java/feign-gson/** + - samples/client/echo_api/java/okhttp-gson/** + pull_request: + paths: + - samples/client/echo_api/java/apache-httpclient/** + - samples/client/echo_api/java/feign-gson/** + - samples/client/echo_api/java/okhttp-gson/** +jobs: + build: + name: Build Java Client JDK8 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/echo_api/java/apache-httpclient + - samples/client/echo_api/java/feign-gson + - samples/client/echo_api/java/okhttp-gson + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + - name: Cache maven dependencies + uses: actions/cache@v3 + env: + cache-name: maven-repository + with: + path: | + ~/.m2 + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Setup node.js + uses: actions/setup-node@v3 + - name: Run echo server + run: | + git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server + (cd http-echo-server && npm install && npm start &) + - name: Build + working-directory: ${{ matrix.sample }} + run: mvn clean package diff --git a/.github/workflows/samples-java-client-jdk11.yaml b/.github/workflows/samples-java-client-jdk11.yaml index 48e996cc18..98d9b24f92 100644 --- a/.github/workflows/samples-java-client-jdk11.yaml +++ b/.github/workflows/samples-java-client-jdk11.yaml @@ -8,7 +8,7 @@ on: - samples/client/petstore/java-micronaut-client/** - samples/openapi3/client/petstore/java/jersey2-java8-special-characters/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** - - samples/openapi3/client/petstore/java/native/** + - samples/openapi3/client/petstore/java/native** pull_request: paths: - 'samples/client/petstore/java/**' @@ -16,7 +16,7 @@ on: - samples/client/petstore/java-micronaut-client/** - samples/openapi3/client/petstore/java/jersey2-java8-special-characters/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** - - samples/openapi3/client/petstore/java/native/** + - samples/openapi3/client/petstore/java/native** jobs: build: name: Build Java Client JDK11 @@ -29,6 +29,7 @@ jobs: - samples/client/petstore/jaxrs-cxf-client - samples/client/petstore/java/native - samples/client/petstore/java/native-async + - samples/client/petstore/java/native-jakarta - samples/client/petstore/java/retrofit2 - samples/client/petstore/java/retrofit2rx2 - samples/client/petstore/java/retrofit2rx3 @@ -36,7 +37,7 @@ jobs: - samples/client/petstore/java/resttemplate - samples/client/petstore/java/resttemplate-withXml - samples/client/petstore/java/webclient - - samples/client/petstore/java/webclient-nulable-arrays + - samples/client/petstore/java/webclient-nullable-arrays - samples/client/petstore/java/vertx - samples/client/petstore/java/jersey2-java8-localdatetime - samples/client/petstore/java/resteasy diff --git a/.github/workflows/samples-java-client-jdk17.yaml b/.github/workflows/samples-java-client-jdk17.yaml new file mode 100644 index 0000000000..cb439e9760 --- /dev/null +++ b/.github/workflows/samples-java-client-jdk17.yaml @@ -0,0 +1,39 @@ +name: Samples Java Client JDK17 + +on: + push: + paths: + - samples/client/petstore/java/resttemplate-jakarta/** + - samples/client/petstore/java/webclient-jakarta/** + pull_request: + paths: + - samples/client/petstore/java/resttemplate-jakarta/** + - samples/client/petstore/java/webclient-jakarta/** +jobs: + build: + name: Build Java Client JDK17 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/petstore/java/resttemplate-jakarta + - samples/client/petstore/java/webclient-jakarta + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + - name: Cache maven dependencies + uses: actions/cache@v3 + env: + cache-name: maven-repository + with: + path: | + ~/.m2 + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Build + working-directory: ${{ matrix.sample }} + run: mvn clean package diff --git a/.github/workflows/samples-java-server-jdk8.yaml b/.github/workflows/samples-java-server-jdk8.yaml new file mode 100644 index 0000000000..ead0a70ecc --- /dev/null +++ b/.github/workflows/samples-java-server-jdk8.yaml @@ -0,0 +1,49 @@ +name: Samples Java Server + +on: + push: + paths: + # java-camel is tested locally for the time being + #- 'samples/server/petstore/java-camel/**' + - 'samples/server/petstore/java-vertx-web/**' + - 'samples/server/petstore/java-inflector/**' + - 'samples/server/petstore/java-pkmst/**' + - 'samples/server/petstore/java-undertow/**' + pull_request: + paths: + #- 'samples/server/petstore/java-camel/**' + - 'samples/server/petstore/java-vertx-web/**' + - 'samples/server/petstore/java-inflector/**' + - 'samples/server/petstore/java-pkmst/**' + - 'samples/server/petstore/java-undertow/**' +jobs: + build: + name: Build Java Server + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # servers + #- samples/server/petstore/java-camel/ + - samples/server/petstore/java-vertx-web/ + - samples/server/petstore/java-inflector/ + - samples/server/petstore/java-pkmst/ + - samples/server/petstore/java-undertow/ + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + - name: Cache maven dependencies + uses: actions/cache@v3 + env: + cache-name: maven-repository + with: + path: | + ~/.m2 + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Build + working-directory: ${{ matrix.sample }} + run: mvn clean package diff --git a/.github/workflows/samples-kotlin-client.yaml b/.github/workflows/samples-kotlin-client.yaml index 9eaecf529b..653119c413 100644 --- a/.github/workflows/samples-kotlin-client.yaml +++ b/.github/workflows/samples-kotlin-client.yaml @@ -1,4 +1,4 @@ -name: Samples Kotlin cilent +name: Samples Kotlin client on: push: diff --git a/.github/workflows/samples-php8.yaml b/.github/workflows/samples-php8.yaml index 18c279bc3c..b9bb97a33d 100644 --- a/.github/workflows/samples-php8.yaml +++ b/.github/workflows/samples-php8.yaml @@ -3,10 +3,10 @@ name: Samples PHP 8.x on: push: paths: - - samples/server/petstore/php-symfony/SymfonyBundle-php/ + - samples/server/petstore/php-symfony/SymfonyBundle-php/** pull_request: paths: - - samples/server/petstore/php-symfony/SymfonyBundle-php/ + - samples/server/petstore/php-symfony/SymfonyBundle-php/** jobs: build: name: Build PHP projects diff --git a/.github/workflows/samples-rust.yaml b/.github/workflows/samples-rust.yaml new file mode 100644 index 0000000000..1d0aa74501 --- /dev/null +++ b/.github/workflows/samples-rust.yaml @@ -0,0 +1,31 @@ +name: Samples Rust + +on: + push: + paths: + - 'samples/client/petstore/rust/**' + - 'samples/server/petstore/rust-server/**' + pull_request: + paths: + - 'samples/client/petstore/rust/**' + - 'samples/server/petstore/rust-server/**' + +jobs: + build: + name: Build Rust + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # these folders contain sub-projects of rust clients, servers + - samples/client/petstore/rust/ + - samples/server/petstore/rust-server/ + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Build + working-directory: ${{ matrix.sample }} + run: cargo build diff --git a/.gitpod.yml b/.gitpod.yml index 1dd7933eff..ee1ae6f0f7 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,7 +12,7 @@ ## customise it to your individual needs - from themes to extensions, you ## have full control. ## -## The easiest way to try out Gitpod is install the browser extenion: +## The easiest way to try out Gitpod is install the browser extension: ## 'https://www.gitpod.io/docs/browser-extension' or by prefixing ## 'https://gitpod.io#' to the source control URL of any project. ## diff --git a/.travis.yml b/.travis.yml index ddec30b70b..e6dbd437d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,15 +50,16 @@ before_install: - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge" - sudo apt-get update - - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce + #- sudo apt-get install -qqy --no-install-recommends google-chrome-stable + #- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce - mkdir -vp ~/.docker/cli-plugins/ - curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx - chmod a+x ~/.docker/cli-plugins/docker-buildx # to run petstore server locally via docker - - echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin || true - - docker pull swaggerapi/petstore - - docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore - - docker ps -a + #- echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin || true + #- docker pull swaggerapi/petstore + #- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore + #- docker ps -a # comment out crystal installation as the tests will run on circleci or github action instead # install crystal #- echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list @@ -69,11 +70,11 @@ before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.0 - export PATH="$HOME/.yarn/bin:$PATH" # install rust - - curl https://sh.rustup.rs -sSf | sh -s -- -y -v - # required when sudo: required for the Ruby petstore tests - - gem install bundler - # set python 3.6.3 as default - - source ~/virtualenv/python3.6/bin/activate + #- curl https://sh.rustup.rs -sSf | sh -s -- -y -v + ## required when sudo: required for the Ruby petstore tests + #- gem install bundler -v 2.3.26 + ## set python 3.6.3 as default + #- source ~/virtualenv/python3.6/bin/activate # -- skip bash test to shorten build time # Add bats test framework and cURL for Bash script integration tests #- sudo add-apt-repository ppa:duggan/bats --yes @@ -88,18 +89,18 @@ before_install: #- sudo sh -c 'curl 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 - # switch to php7 - - sudo apt-get install libonig-dev libzip-dev - - git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build - - git clone https://github.com/ngyuki/phpenv-composer.git $(phpenv root)/plugins/phpenv-composer - - if [ $(ls -A "$HOME/.phpenv/versions/8.1.4" | wc -l) -eq 0 ]; then - phpenv install 8.1.4; - fi; - - phpenv rehash - - phpenv versions - #- phpenv global 7.2.15 - - phpenv global 8.1.4 - - php -v + # switch to php8 + #- sudo apt-get install -f libonig-dev libzip-dev + #- git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build + #- git clone https://github.com/ngyuki/phpenv-composer.git $(phpenv root)/plugins/phpenv-composer + #- if [ $(ls -A "$HOME/.phpenv/versions/8.1.4" | wc -l) -eq 0 ]; then + # phpenv install 8.1.4; + # fi; + #- phpenv rehash + #- phpenv versions + ##- phpenv global 7.2.15 + #- phpenv global 8.1.4 + #- php -v # comment out below as installation failed in travis # Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests. # - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490). @@ -107,15 +108,15 @@ before_install: # - . ~/otp/18.2.1/activate && erl -version #- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH" # install C++ tools - - sudo apt install -y --no-install-recommends valgrind cmake build-essential - - cmake --version + #- sudo apt install -y --no-install-recommends valgrind cmake build-essential + #- cmake --version # install Qt5 #- sudo apt install -y --no-install-recommends qt5-default # install boost - - sudo apt install -y --no-install-recommends libboost-all-dev + #- sudo apt install -y --no-install-recommends libboost-all-dev # perl dep - - cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) - - cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Ignored failure from cpanm" + #- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) + #- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Ignored failure from cpanm" # show host table to confirm petstore.swagger.io is mapped to localhost - cat /etc/hosts # show java version @@ -127,8 +128,8 @@ before_install: fi; - pushd .; cd website; yarn install; popd # install Deno - - sh -s v1.6.2 < ./CI/deno_install.sh - - export PATH="$HOME/.deno/bin:$PATH" + #- sh -s v1.6.2 < ./CI/deno_install.sh + #- export PATH="$HOME/.deno/bin:$PATH" install: # Add Godeps dependencies to GOPATH and PATH @@ -150,7 +151,7 @@ script: # run integration tests defined in maven pom.xml # WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet. - mvn -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error - - mvn -e --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error + #- mvn -e --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error after_success: # push to maven repo - if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then @@ -160,8 +161,8 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishMavenJavaPublicationToNexusRepository closeAndReleaseRepository --no-daemon; - echo "Finished ./gradlew publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository"; + ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository; + echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository"; popd; elif [ -z $TRAVIS_TAG ] && [[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then echo "Publishing from branch $TRAVIS_BRANCH"; @@ -169,15 +170,15 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository --no-daemon; - echo "Finished ./gradlew publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository"; + ./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository; + echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository"; popd; fi; if [ -n $TRAVIS_TAG ] && [[ "$TRAVIS_TAG" =~ ^[v][0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Publishing the gradle plugin to Gradle Portal on tag $TRAVIS_TAG (only)"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET --no-daemon; + ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET; echo "Finished ./gradlew publishPlugins (plugin portal)"; popd; fi; diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 6cba564ffb..962a13584a 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -53,9 +53,9 @@ elif [ "$NODE_INDEX" = "3" ]; then #./configure --enable-optimizations #sudo make altinstall pyenv install --list - pyenv install 3.6.3 + pyenv install 3.7.12 pyenv install 2.7.14 - pyenv global 3.6.3 + pyenv global 3.7.12 # Install node@stable (for angular 6) set +e diff --git a/README.md b/README.md index 44f309a193..2138bae23d 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ If you find OpenAPI Generator useful for work, please consider asking your compa [](https://www.merge.dev/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://www.burkert.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://www.finbourne.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) +[](https://bump.sh/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) #### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS and Checkly for sponsoring the API monitoring @@ -876,6 +877,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2022-10-01 - [OpenAPI Generatorをカスタマイズしたコードを生成する(Swagger Codegenとほぼ同じ)](https://nainaistar.hatenablog.com/entry/2022/10/03/120000) by [きり丸](https://twitter.com/nainaistar) - 2022-10-21 - [Kotlin(Spring Boot)の API を OpenAPI Generator で自動生成](https://zenn.dev/msksgm/articles/20221021-kotlin-spring-openapi-generator) by [msksgm](https://zenn.dev/msksgm) - 2022-10-26 - [Quarkus Insights #106: Quarkiverse Extension Spotlight: OpenApi Generator](https://www.youtube.com/watch?v=_s_if69t2iQ) by [Quarkusio](https://www.youtube.com/c/Quarkusio) +- 2022-11-28 - [The REST API implementation flow](https://tmsvr.com/openapi-code-generation-for-rest-apis/) by [Imre Tömösvári](https://tmsvr.com/author/imre/) +- 2022-12-13 - [API-First with Spring WebFlux and OpenAPI Generator](https://boottechnologies-ci.medium.com/api-first-with-spring-webflux-and-openapi-generator-38b7804c4ed4) by [Eric Anicet](https://boottechnologies-ci.medium.com/) ## [6 - About Us](#table-of-contents) diff --git a/appveyor.yml b/appveyor.yml index c5483fe836..492e9f5d68 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: '{branch}-{build}' -image: Visual Studio 2019 +image: Visual Studio 2022 hosts: petstore.swagger.io: 127.0.0.1 install: @@ -15,14 +15,14 @@ install: # install gradle - ps: | Add-Type -AssemblyName System.IO.Compression.FileSystem - if (!(Test-Path -Path "C:\gradle\gradle-5.6.4" )) { + if (!(Test-Path -Path "C:\gradle\gradle-7.6" )) { (new-object System.Net.WebClient).DownloadFile( - 'https://services.gradle.org/distributions/gradle-5.6.4-bin.zip', + 'https://services.gradle.org/distributions/gradle-7.6-bin.zip', 'C:\gradle-bin.zip' ) [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\gradle-bin.zip", "C:\gradle") } - - cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-5.6.4\bin;%JAVA_HOME%\bin;%PATH% + - cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-7.6\bin;%JAVA_HOME%\bin;%PATH% - cmd: SET MAVEN_OPTS=-Xmx4g - cmd: SET JAVA_OPTS=-Xmx4g - cmd: SET M2_HOME=C:\maven\apache-maven-3.8.3 @@ -61,12 +61,12 @@ build_script: - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-net5.0\Org.OpenAPITools.sln # build C# API client (.net 5.0 with ConditionalSerialization) - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln - # build C# API client - - nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln - - msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - # build C# API client (with PropertyChanged) - - nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln - - msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + ## build C# API client + #- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln + #- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + ## build C# API client (with PropertyChanged) + #- nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln + #- msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" # build C# .net standard 1.3+ API client #- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln #- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" @@ -92,10 +92,10 @@ test_script: - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-net5.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test C# API Client using conditional-serialization - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - # test c# API client - - nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor - # test c# API client (with PropertyChanged) - - nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor + ## test c# API client + #- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor + ## test c# API client (with PropertyChanged) + #- nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor ### TODO: Execute all generators via powershell or other # generate all petstore clients diff --git a/bin/configs/aspnetcore-6.0-project4Models.yaml b/bin/configs/aspnetcore-6.0-project4Models.yaml index bb8b63602c..ae4b1a9c23 100644 --- a/bin/configs/aspnetcore-6.0-project4Models.yaml +++ b/bin/configs/aspnetcore-6.0-project4Models.yaml @@ -6,4 +6,4 @@ additionalProperties: packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}' aspnetCoreVersion: "6.0" userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37' - useSeperateModelProject: true + useSeparateModelProject: true diff --git a/bin/configs/c.yaml b/bin/configs/c.yaml index f622e7919a..378b5d1f36 100644 --- a/bin/configs/c.yaml +++ b/bin/configs/c.yaml @@ -1,4 +1,4 @@ generatorName: c outputDir: samples/client/petstore/c -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/C-libcurl diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-allOf.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-allOf.yaml new file mode 100644 index 0000000000..7c2d2e4c4c --- /dev/null +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-allOf.yaml @@ -0,0 +1,12 @@ +# for csharp-netcore generichost +generatorName: csharp-netcore +outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf +inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml +library: generichost +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore +additionalProperties: + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' + useCompareNetObjects: true + disallowAdditionalPropertiesIfNotPresent: false + targetFramework: net7.0 + nullableReferenceTypes: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-anyOf.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-anyOf.yaml new file mode 100644 index 0000000000..98ec989915 --- /dev/null +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-anyOf.yaml @@ -0,0 +1,12 @@ +# for csharp-netcore generichost +generatorName: csharp-netcore +outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf +inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml +library: generichost +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore +additionalProperties: + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' + useCompareNetObjects: true + disallowAdditionalPropertiesIfNotPresent: false + targetFramework: net7.0 + nullableReferenceTypes: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-oneOf.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-oneOf.yaml new file mode 100644 index 0000000000..a670bb5812 --- /dev/null +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-oneOf.yaml @@ -0,0 +1,12 @@ +# for csharp-netcore generichost +generatorName: csharp-netcore +outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf +inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml +library: generichost +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore +additionalProperties: + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' + useCompareNetObjects: true + disallowAdditionalPropertiesIfNotPresent: false + targetFramework: net7.0 + nullableReferenceTypes: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml index d234b5399f..ae882e5771 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml @@ -8,5 +8,5 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false - targetFramework: net6.0 + targetFramework: net7.0 nullableReferenceTypes: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml index 1b07cd23c2..4e36214bc5 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml @@ -8,5 +8,5 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false - targetFramework: net6.0 + targetFramework: net7.0 nullableReferenceTypes: false diff --git a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml index 9036f89e02..a4fec62e03 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml @@ -8,4 +8,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true - targetFramework: net5.0 + targetFramework: net7.0 diff --git a/bin/configs/java-apache-httpclient-echo-api.yaml b/bin/configs/java-apache-httpclient-echo-api.yaml new file mode 100644 index 0000000000..618117777c --- /dev/null +++ b/bin/configs/java-apache-httpclient-echo-api.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/echo_api/java/apache-httpclient +library: apache-httpclient +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: echo-api-apache-httpclient + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-apache-httpclient.yaml b/bin/configs/java-apache-httpclient.yaml index 5696973f86..d08233fecd 100644 --- a/bin/configs/java-apache-httpclient.yaml +++ b/bin/configs/java-apache-httpclient.yaml @@ -1,7 +1,7 @@ generatorName: java outputDir: samples/client/petstore/java/apache-httpclient library: apache-httpclient -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-apache-httpclient diff --git a/bin/configs/java-camel-petstore-new.yaml b/bin/configs/java-camel-petstore-new.yaml index 9b28eaf1ee..7984a5a57a 100644 --- a/bin/configs/java-camel-petstore-new.yaml +++ b/bin/configs/java-camel-petstore-new.yaml @@ -12,6 +12,6 @@ additionalProperties: library: "spring-boot" withXml: true jackson: true - camelUseDefaultValidationtErrorProcessor: true + camelUseDefaultValidationErrorProcessor: true camelRestClientRequestValidation: true camelSecurityDefinitions: true diff --git a/bin/configs/java-feign-gson-echo-api.yaml b/bin/configs/java-feign-gson-echo-api.yaml new file mode 100644 index 0000000000..d765eb41c0 --- /dev/null +++ b/bin/configs/java-feign-gson-echo-api.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/echo_api/java/feign-gson +library: feign +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + serializationLibrary: gson + artifactId: echo-api-feign-json + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-native-async.yaml b/bin/configs/java-native-async.yaml index eb95d524a2..25fc601fb8 100644 --- a/bin/configs/java-native-async.yaml +++ b/bin/configs/java-native-async.yaml @@ -1,7 +1,7 @@ generatorName: java outputDir: samples/client/petstore/java/native-async library: native -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-native diff --git a/bin/configs/java-native-echo-api.yaml b/bin/configs/java-native-echo-api.yaml new file mode 100644 index 0000000000..dd14faddab --- /dev/null +++ b/bin/configs/java-native-echo-api.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/echo_api/java/native +library: native +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: echo-api-native + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-native-jakarta.yaml b/bin/configs/java-native-jakarta.yaml new file mode 100644 index 0000000000..9c6709fdc4 --- /dev/null +++ b/bin/configs/java-native-jakarta.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/native-jakarta +library: native +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-native-jakarta + hideGenerationTimestamp: "true" + useJakartaEe: "true" diff --git a/bin/configs/java-native.yaml b/bin/configs/java-native.yaml index 1425976525..0ec877a86f 100644 --- a/bin/configs/java-native.yaml +++ b/bin/configs/java-native.yaml @@ -1,7 +1,7 @@ generatorName: java outputDir: samples/client/petstore/java/native library: native -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-native diff --git a/bin/configs/java-okhttp-gson-awsv4signature.yaml b/bin/configs/java-okhttp-gson-awsv4signature.yaml new file mode 100644 index 0000000000..2c665cb4b0 --- /dev/null +++ b/bin/configs/java-okhttp-gson-awsv4signature.yaml @@ -0,0 +1,11 @@ +generatorName: java +outputDir: samples/client/petstore/java/okhttp-gson-awsv4signature +library: okhttp-gson +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: okhttp-gson-awsv4signature + hideGenerationTimestamp: "true" + useOneOfDiscriminatorLookup: "true" + disallowAdditionalPropertiesIfNotPresent: false + withAWSV4Signature: true \ No newline at end of file diff --git a/bin/configs/java-okhttp-gson-echo-api.yaml b/bin/configs/java-okhttp-gson-echo-api.yaml new file mode 100644 index 0000000000..825c1902ee --- /dev/null +++ b/bin/configs/java-okhttp-gson-echo-api.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/echo_api/java/okhttp-gson +#library: okhttp-gson +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: echo-api-okhttp-gson + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-resttemplate-jakarta.yaml b/bin/configs/java-resttemplate-jakarta.yaml new file mode 100644 index 0000000000..098e0d96e7 --- /dev/null +++ b/bin/configs/java-resttemplate-jakarta.yaml @@ -0,0 +1,10 @@ +generatorName: java +outputDir: samples/client/petstore/java/resttemplate-jakarta +library: resttemplate +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-resttemplate + hideGenerationTimestamp: "true" + java8: true + useJakartaEe: true diff --git a/bin/configs/java-webclient-jakarta.yaml b/bin/configs/java-webclient-jakarta.yaml new file mode 100644 index 0000000000..038c741126 --- /dev/null +++ b/bin/configs/java-webclient-jakarta.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/webclient-jakarta +library: webclient +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-webclient + hideGenerationTimestamp: "true" + useJakartaEe: true diff --git a/bin/configs/java-webclient-nullable-array.yaml b/bin/configs/java-webclient-nullable-array.yaml index 24d280bc8c..9e94c2271c 100644 --- a/bin/configs/java-webclient-nullable-array.yaml +++ b/bin/configs/java-webclient-nullable-array.yaml @@ -1,5 +1,5 @@ generatorName: java -outputDir: samples/client/petstore/java/webclient-nulable-arrays +outputDir: samples/client/petstore/java/webclient-nullable-arrays library: webclient inputSpec: modules/openapi-generator/src/test/resources/3_0/schema-with-nullable-arrays.yaml templateDir: modules/openapi-generator/src/main/resources/Java diff --git a/bin/configs/php-symfony-SymfonyBundle-php.yaml b/bin/configs/php-symfony-SymfonyBundle-php.yaml index 45871b6da2..3d6c3b7edc 100644 --- a/bin/configs/php-symfony-SymfonyBundle-php.yaml +++ b/bin/configs/php-symfony-SymfonyBundle-php.yaml @@ -1,6 +1,6 @@ generatorName: php-symfony outputDir: samples/server/petstore/php-symfony/SymfonyBundle-php -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/php-symfony/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/php-symfony gitUserId: openapitools gitRepoId: petstore diff --git a/bin/configs/python-nextgen-aiohttp.yaml b/bin/configs/python-nextgen-aiohttp.yaml new file mode 100644 index 0000000000..4d71a6d3d6 --- /dev/null +++ b/bin/configs/python-nextgen-aiohttp.yaml @@ -0,0 +1,7 @@ +generatorName: python-nextgen +outputDir: samples/openapi3/client/petstore/python-nextgen-aiohttp +inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python-nextgen +library: asyncio +additionalProperties: + packageName: petstore_api diff --git a/bin/configs/python-nextgen.yaml b/bin/configs/python-nextgen.yaml new file mode 100644 index 0000000000..c2c09ee014 --- /dev/null +++ b/bin/configs/python-nextgen.yaml @@ -0,0 +1,8 @@ +generatorName: python-nextgen +outputDir: samples/openapi3/client/petstore/python-nextgen +inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python-nextgen +additionalProperties: + packageName: petstore_api + useOneOfDiscriminatorLookup: "true" + disallowAdditionalPropertiesIfNotPresent: false diff --git a/bin/configs/rust-reqwest-petstore-async-middleware.yaml b/bin/configs/rust-reqwest-petstore-async-middleware.yaml new file mode 100644 index 0000000000..e790831596 --- /dev/null +++ b/bin/configs/rust-reqwest-petstore-async-middleware.yaml @@ -0,0 +1,11 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/reqwest/petstore-async-middleware +library: reqwest +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: true + supportMiddleware: true + supportMultipleResponses: true + packageName: petstore-reqwest-async-middleware + useSingleRequestParameter: true diff --git a/bin/configs/spring-boot.yaml b/bin/configs/spring-boot.yaml index c0d8268ae7..8d3e101cea 100644 --- a/bin/configs/spring-boot.yaml +++ b/bin/configs/spring-boot.yaml @@ -8,3 +8,4 @@ additionalProperties: snapshotVersion: "true" hideGenerationTimestamp: "true" camelCaseDollarSign: "true" + modelNameSuffix: 'Dto' diff --git a/bin/configs/swift5-deprecated.yaml b/bin/configs/swift5-deprecated.yaml index 0b02067313..c378394e62 100644 --- a/bin/configs/swift5-deprecated.yaml +++ b/bin/configs/swift5-deprecated.yaml @@ -1,6 +1,6 @@ generatorName: swift5 outputDir: samples/client/petstore/swift5/deprecated -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-deprecated-fields.yaml templateDir: modules/openapi-generator/src/main/resources/swift5 generateAliasAsModel: true additionalProperties: diff --git a/bin/configs/swift5-validation.yaml b/bin/configs/swift5-validation.yaml new file mode 100644 index 0000000000..7bd8b94d6e --- /dev/null +++ b/bin/configs/swift5-validation.yaml @@ -0,0 +1,10 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/validation +inputSpec: modules/openapi-generator/src/test/resources/3_0/validation.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/typescript-angular-v15-provided-in-root.yaml b/bin/configs/typescript-angular-v15-provided-in-root.yaml new file mode 100644 index 0000000000..b8b86c7f66 --- /dev/null +++ b/bin/configs/typescript-angular-v15-provided-in-root.yaml @@ -0,0 +1,7 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-angular +additionalProperties: + ngVersion: 15.0.3 + supportsES6: true diff --git a/bin/configs/typescript-fetch-allOf-nullable.yaml b/bin/configs/typescript-fetch-allOf-nullable.yaml new file mode 100644 index 0000000000..89db874a19 --- /dev/null +++ b/bin/configs/typescript-fetch-allOf-nullable.yaml @@ -0,0 +1,4 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/allOf-nullable +inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf-nullable.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-fetch diff --git a/bin/utils/test_file_list.yaml b/bin/utils/test_file_list.yaml index 2554a17803..e6356812f9 100644 --- a/bin/utils/test_file_list.yaml +++ b/bin/utils/test_file_list.yaml @@ -1,9 +1,9 @@ --- # csharp-netcore test files and image for upload - filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs" - sha256: aaa596db60531417994533b0e7962eca21dcaf8fa3aea1e2e3cb8b1b216cb89f + sha256: 054adb6efaff70f492e471cb3e4d628d22cda814906808fd3fcce36ce710b7ee - filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs" - sha256: dae985015ba461297927d544a78267f2def35e07c3f14ca66468fd61e1fd1c26 + sha256: ff6a5fccd4c026d85fe7232911cda445f5065dcefd03abe258e19af5b28d05c5 - filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png" sha256: 0a67c32728197e942b13bdda064b73793f12f5c795f1e5cf35a3adf69c973230 # java okhttp gson test files diff --git a/docs/customization.md b/docs/customization.md index 39d45c3834..22c34373ea 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -56,7 +56,7 @@ The above configuration will do the following: * Compile a user-provided `my_custom_templates/api_interfaces.mustache` following our usual API template compilation logic. That is, one file will be created per API; APIs are generated defined according to tags in your spec documentation. The destination filename of `Interface.kt` will act as a suffix for the filename. So, a tag of `Equipment` will output a corresponding `EquipmentInterface.kt`. * Because `api.mustache` is the same mustache filename as used in your target generator (`kotlin` in this example), we support the following: - The destination filename provides a suffix for the generated output. APIs generate per tag in your specification. So, a tag of `Equipment` will output a corresponding `EquipmentImpl.kt`. This option will be used whether `api.mustache` targets a user customized template or a built-in template. - - The built-in template will be used if you haven't provided an customized template. The kotlin generator defines the suffix as simply `.kt`, so this scenario would modify only the generated file suffixes according to the previous bullet point. + - The built-in template will be used if you haven't provided a customized template. The kotlin generator defines the suffix as simply `.kt`, so this scenario would modify only the generated file suffixes according to the previous bullet point. - Your `api.mustache` will be used if it exists in your custom template directory. For generators with library options, such as `jvm-okhttp3` in the kotlin generator, your file must exist in the same relative location as the embedded template. For kotlin using the `jvm-okhttp3` library option, this file would need to be located at `my_custom_templates/libraries/jvm-okhttp/api.mustache`. See [templating](./templating.md) for more details. * Compile `my_custom_templates/other/check.mustache` with the supporting files bundle, and output to `scripts/check.sh` in your output directory. Note that we don't currently support setting file flags on output, so scripts such as these will either have to be sourced rather than executed, or have file flags set separately after generation (external to our tooling). @@ -169,7 +169,7 @@ If you publish your artifact to a distant maven repository, do not forget to add You may not want to generate *all* models in your project. Likewise, you may want just one or two apis to be written. If that's the case, you can use system properties or [global properties](./global-properties.md) to control the output. -The default is generate *everything* supported by the specific library. Once you enable a feature, it will restrict the contents generated: +The default is to generate *everything* supported by the specific library. Once you enable a feature, it will restrict the contents generated: ```sh # generate only models @@ -397,7 +397,7 @@ or ## Schema Mapping -One can map the schema to someting else (e.g. external objects/models outside of the package) using the `schemaMappings` option, e.g. in CLI +One can map the schema to something else (e.g. external objects/models outside of the package) using the `schemaMappings` option, e.g. in CLI ```sh java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/type-alias.yaml -o /tmp/java2/ --schema-mapping TypeAlias=foo.bar.TypeAlias ``` @@ -430,15 +430,37 @@ paths: ## Inline Schema Naming -Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option, e.g. in CLI +Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option. For exmaple, run the following, ``` java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings inline_object_2=SomethingMapped,inline_object_4=nothing_new ``` +will show the following in the console: +``` +[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as arbitraryObjectRequestBodyProperty_request. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI). +[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as meta_200_response. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI). +``` +For example, to name the inline schema `meta_200_response` as `MetaObject`, use the `--inline-schema-name-mappings` option as follows: +``` +java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings meta_200_response=MetaObject,arbitraryObjectRequestBodyProperty_request=ArbitraryRequest +``` Another useful option is `inlineSchemaNameDefaults`, which allows you to customize the suffix of the auto-generated inline schema name, e.g. in CLI ``` ---inline-schema-name-defaults arrayItemSuffix=_array_item +--inline-schema-name-defaults arrayItemSuffix=_array_item,mapItemSuffix=_map_item +``` + +Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas. + +## OpenAPI Normalizer + +OpenAPI Normalizer (off by default) transforms the input OpenAPI doc/spec (which may not perfectly conform to the specification) to make it workable with OpenAPI Generator. Here is a list of rules supported: + +- `REF_AS_PARENT_IN_ALLOF`: when set to `true`, child schemas in `allOf` is considered a parent if it's a `$ref` (instead of inline schema) + + +Example: +``` +java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/allOf_extension_parent.yaml -o /tmp/java-okhttp/ --additional-properties hideGenerationTimestamp="true" --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true ``` -Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. diff --git a/docs/generators.md b/docs/generators.md index cd0466f9ad..f05f73224e 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -52,6 +52,7 @@ The following generators are available: * [powershell (beta)](generators/powershell.md) * [python](generators/python.md) * [python-legacy](generators/python-legacy.md) +* [python-nextgen (beta)](generators/python-nextgen.md) * [python-prior](generators/python-prior.md) * [r](generators/r.md) * [ruby](generators/ruby.md) diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index b7f2193194..ed22b58027 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -51,7 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useDefaultRouting|Use default routing for the ASP.NET Core version.| |true| |useFrameworkReference|Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.| |false| |useNewtonsoft|Uses the Newtonsoft JSON library.| |true| -|useSeperateModelProject|Create a seperate project for models| |false| +|useSeparateModelProject|Create a separate project for models| |false| |useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true| ## IMPORT MAPPING diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 481ffa3fee..8f929b158e 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -42,7 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |releaseNote|Release note, default to 'Minor update'.| |Minor update| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sourceFolder|source folder for generated code| |src| -|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net48**
.NET Framework 4.8 compatible
**net5.0**
.NET 5.0 compatible
**net6.0**
.NET 6.0 compatible
|netstandard2.0| +|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible (End of Support 13 Dec 2022)
**net47**
.NET Framework 4.7 compatible
**net48**
.NET Framework 4.8 compatible
**net6.0**
.NET 6.0 compatible
**net7.0**
.NET 7.0 compatible
|netstandard2.0| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false| diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index e60f802f17..d42218a5f5 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy| @@ -62,6 +63,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| |sourceFolder|source folder for generated code| |src/main/groovy| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 348f689876..ae510a1033 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |annotationLibrary|Select the complementary documentation annotation library.|
**none**
Do not annotate Model and Api with complementary annotations.
**swagger1**
Annotate Model and Api using the Swagger Annotations 1.x library.
**swagger2**
Annotate Model and Api using the Swagger Annotations 2.x library.
|swagger2| |apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| @@ -38,7 +39,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelRestClientRequestValidation|enable validation of the client request to check whether the Content-Type and Accept headers from the client is supported by the Rest-DSL configuration| |false| |camelRestComponent|name of the Camel component to use as the REST consumer| |servlet| |camelSecurityDefinitions|generate camel security definitions| |true| -|camelUseDefaultValidationtErrorProcessor|generate default validation error processor| |true| +|camelUseDefaultValidationErrorProcessor|generate default validation error processor| |true| |camelValidationErrorProcessor|validation error processor bean name| |validationErrorProcessor| |configPackage|configuration package for generated code| |org.openapitools.configuration| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app only)
**legacy**
Legacy java.util.Date
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+)
|java8| @@ -92,8 +93,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| |useBeanValidation|Use BeanValidation API annotations| |true| |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOptional|Use Optional container for optional parameters| |false| -|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports).| |true| +|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false| |useSpringController|Annotate the generated API as a Spring Controller| |false| |useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true| |useTags|use tags for creating interface and controller classnames| |false| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index a2c57ac695..5d4fb37757 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.client.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -59,6 +60,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| |sourceFolder|source folder for generated code| |src/main/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index b96f173075..9fd013b114 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.server.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -62,6 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |useAbstractClass|Whether to generate abstract classes for REST API instead of interfaces.| |false| |useBeanValidation|Use Bean Validation| |false| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 8dfd8797cd..c99e23f5f0 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.controllers| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -64,6 +65,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| |sourceFolder|source folder for generated code| |src/gen/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index b0368d3ef5..7078d72c7e 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -18,8 +18,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|additionalClientTypeAnnotations|Additional annotations for client type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut-client| @@ -69,6 +71,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|serializationLibrary|Serialization library for model|
**jackson**
Jackson as serialization library
**micronaut_serde_jackson**
Use micronaut-serialization with Jackson annotations
|jackson| |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|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| @@ -77,6 +80,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|Client service name| |null| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOptional|Use Optional container for optional parameters| |false| |visitable|Generate visitor for subtypes with a discriminator| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 85422ca8bb..ce3c74cf02 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -71,6 +72,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|serializationLibrary|Serialization library for model|
**jackson**
Jackson as serialization library
**micronaut_serde_jackson**
Use micronaut-serialization with Jackson annotations
|jackson| |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|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| @@ -80,6 +82,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |title|Client service name| |null| |useAuth|Whether to import authorization and to annotate controller methods accordingly| |true| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOptional|Use Optional container for optional parameters| |false| |visitable|Generate visitor for subtypes with a discriminator| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 15ab35ba4e..685e0357e7 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -69,6 +70,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index efb3e265c2..30a48087f1 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |com.prokarma.pkmst.controller| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -70,6 +71,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |springBootAdminUri|Spring-Boot URI| |null| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |null| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |zipkinUri|Zipkin URI| |null| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 65ae38fc1a..3fcaa8449c 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |controllers| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -72,6 +73,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |title|server title name or client service name| |openapi-java-playframework| |useBeanValidation|Use BeanValidation API annotations| |true| |useInterfaces|Makes the controllerImp implements an interface to facilitate automatic completion when updating from version x to y of your spec| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| |wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 019efb9117..cf0eaf2920 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -64,6 +65,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| |sourceFolder|source folder for generated code| |src/main/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 3a721083c2..0d46a523a5 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.vertxweb.server.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -64,6 +65,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| |sourceFolder|source folder for generated code| |src/main/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index d5e12fe3f3..a919b2b404 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.server.api.verticle| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -66,6 +67,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| |sourceFolder|source folder for generated code| |src/main/java| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/java.md b/docs/generators/java.md index 750e9c9944..3a5aea732c 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |annotationLibrary|Select the complementary documentation annotation library.|
**none**
Do not annotate Model and Api with complementary annotations.
**swagger1**
Annotate Model and Api using the Swagger Annotations 1.x library.
|none| |apiPackage|package for generated api classes| |org.openapitools.client.api| @@ -55,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.client| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**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| -|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**jersey3**
HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
**feign**
HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: JSON-B
**apache-httpclient**
HTTP client: Apache httpclient 4.x
|okhttp-gson| +|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**jersey3**
HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
**feign**
HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: JSON-B
**apache-httpclient**
HTTP client: Apache httpclient 4.x
|okhttp-gson| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null| @@ -82,13 +83,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useAbstractionForFiles|Use alternative types instead of java.io.File to allow passing bytes without a file on disk. Available on resttemplate, webclient, libraries| |false| |useBeanValidation|Use BeanValidation API annotations| |false| |useGzipFeature|Send gzip-encoded requests| |false| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false| |usePlayWS|Use Play! Async HTTP client (Play WS API)| |false| |useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false| -|useRuntimeException|Use RuntimeException instead of Exception| |false| +|useRuntimeException|Use RuntimeException instead of Exception. Only jersey, jersey2, jersey3, okhttp-gson, vertx, microprofile support this option.| |false| |useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false| |useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson support this option.| |false| +|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false| +|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 6cd328248a..8e857d9fea 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -75,6 +76,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 72cb6f71bc..5f7d804345 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -67,6 +68,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useBeanValidation|Use BeanValidation API annotations| |false| |useGenericResponse|Use generic response| |false| |useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useLoggingFeatureForTests|Use Logging Feature for tests| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index e1778d3101..1e6553ff5c 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -83,6 +84,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useGenericResponse|Use generic response| |false| |useGzipFeature|Use Gzip Feature| |false| |useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useLoggingFeature|Use Logging Feature| |false| |useLoggingFeatureForTests|Use Logging Feature for tests| |false| |useMultipartFeature|Use Multipart Feature| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index e54504b1ca..47d0ec6e8d 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -78,6 +79,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useGenericResponse|Use generic response| |false| |useGzipFeature|Use Gzip Feature| |false| |useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useLoggingFeature|Use Logging Feature| |false| |useLoggingFeatureForTests|Use Logging Feature for tests| |false| |useMultipartFeature|Use Multipart Feature| |false| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 73bf0d8f6b..9a8da73eee 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -70,6 +71,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 726c44cd45..d2802b42e8 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -69,6 +70,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useSwaggerFeature|Use dynamic Swagger generator| |false| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index aa92d499db..6f86b8a642 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -69,6 +70,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 84aea15c97..b043a13b82 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| @@ -75,6 +76,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| +|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| |useTags|use tags for creating interface and controller classnames| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/docs/generators/python-legacy.md b/docs/generators/python-legacy.md index 0af42bd30b..3d0b1165a6 100644 --- a/docs/generators/python-legacy.md +++ b/docs/generators/python-legacy.md @@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES