diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4466e9f51f..4b169aa25f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -16,5 +16,10 @@ These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/). -- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.1.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks) +- [ ] In case you are adding a new generator, run the following additional script : + ``` + ./bin/utils/ensure-up-to-date.sh + ``` + Commit all changed files. +- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.3.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks) - [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request. 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-cpp-qt-client.yaml b/.github/workflows/samples-cpp-qt-client.yaml new file mode 100644 index 0000000000..2ef3fbc96a --- /dev/null +++ b/.github/workflows/samples-cpp-qt-client.yaml @@ -0,0 +1,34 @@ +name: Samples cpp qt client + +on: + push: + branches: + - 'samples/client/petstore/cpp-qt/**' + pull_request: + paths: + - 'samples/client/petstore/cpp-qt/**' + +env: + GRADLE_VERSION: 6.9 + +jobs: + build: + name: Build cpp qt client + strategy: + matrix: + qt-version: + - '5.15.2' + - '6.4.2' + os: + - ubuntu-latest + - macOS-latest + - windows-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.qt-version }} + - name: Build + working-directory: "samples/client/petstore/cpp-qt" + run: ./build-and-test.bash diff --git a/.github/workflows/samples-dart.yaml b/.github/workflows/samples-dart.yaml index 229b0c4881..21c06d2ba2 100644 --- a/.github/workflows/samples-dart.yaml +++ b/.github/workflows/samples-dart.yaml @@ -40,7 +40,7 @@ jobs: key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.yaml') }} - uses: dart-lang/setup-dart@v1 with: - sdk: 2.14.0 + sdk: 2.15.0 - name: Run tests uses: ./.github/actions/run-samples with: diff --git a/.github/workflows/samples-dotnet-standard.yaml b/.github/workflows/samples-dotnet-standard.yaml new file mode 100644 index 0000000000..0635cbd7b0 --- /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: 3.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-erlang.yaml b/.github/workflows/samples-erlang.yaml new file mode 100644 index 0000000000..fb339e224e --- /dev/null +++ b/.github/workflows/samples-erlang.yaml @@ -0,0 +1,35 @@ +name: Samples Erlang + +on: + push: + paths: + # comment out due to errors + # ===> Compiling src/openapi_pet_handler.erl failed + # src/openapi_pet_handler.erl:278: function is_authorized/2 already defined + #- samples/server/petstore/erlang-server/** + - samples/client/petstore/erlang-client/** + - samples/client/petstore/erlang-proper/** + pull_request: + paths: + #- samples/server/petstore/erlang-server/** + - samples/client/petstore/erlang-client/** + - samples/client/petstore/erlang-proper/** +jobs: + build: + name: Build Erlang projects + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + sample: + #- samples/server/petstore/erlang-server/ + - samples/client/petstore/erlang-client/ + - samples/client/petstore/erlang-proper/ + steps: + - uses: actions/checkout@v3 + - uses: erlef/setup-beam@v1 + with: + otp-version: '22.2' + rebar3-version: '3.14.3' + - run: rebar3 compile + working-directory: ${{ matrix.sample }} 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 2c2cda527e..98d9b24f92 100644 --- a/.github/workflows/samples-java-client-jdk11.yaml +++ b/.github/workflows/samples-java-client-jdk11.yaml @@ -7,14 +7,16 @@ on: - samples/client/petstore/jaxrs-cxf-client/** - samples/client/petstore/java-micronaut-client/** - samples/openapi3/client/petstore/java/jersey2-java8-special-characters/** - - samples/openapi3/client/petstore/java/native/** + - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** + - samples/openapi3/client/petstore/java/native** pull_request: paths: - 'samples/client/petstore/java/**' - samples/client/petstore/jaxrs-cxf-client/** - samples/client/petstore/java-micronaut-client/** - samples/openapi3/client/petstore/java/jersey2-java8-special-characters/** - - samples/openapi3/client/petstore/java/native/** + - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** + - samples/openapi3/client/petstore/java/native** jobs: build: name: Build Java Client JDK11 @@ -27,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 @@ -34,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 @@ -48,6 +51,9 @@ jobs: - samples/client/petstore/java/jersey1 - samples/openapi3/client/petstore/java/jersey2-java8-special-characters - samples/openapi3/client/petstore/java/native + - samples/client/petstore/java/okhttp-gson-swagger1/ + - samples/client/petstore/java/resttemplate-swagger1/ + - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/ steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 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-jdk17.yaml b/.github/workflows/samples-jdk17.yaml index 6d89ce09da..ceb2b84ac9 100644 --- a/.github/workflows/samples-jdk17.yaml +++ b/.github/workflows/samples-jdk17.yaml @@ -6,6 +6,8 @@ on: - samples/openapi3/client/petstore/spring-cloud-3/** - samples/client/petstore/java-helidon-client/mp/** - samples/client/petstore/java-helidon-client/se/** + - samples/client/petstore/spring-http-interface-reactive/** + - samples/client/petstore/spring-http-interface/** # servers - samples/openapi3/server/petstore/springboot-3/** - samples/server/petstore/java-helidon-server/mp/** @@ -16,6 +18,8 @@ on: - samples/openapi3/client/petstore/spring-cloud-3/** - samples/client/petstore/java-helidon-client/mp/** - samples/client/petstore/java-helidon-client/se/** + - samples/client/petstore/spring-http-interface-reactive/** + - samples/client/petstore/spring-http-interface/** # servers - samples/openapi3/server/petstore/springboot-3/** - samples/server/petstore/java-helidon-server/mp/** @@ -32,10 +36,14 @@ jobs: - samples/openapi3/client/petstore/spring-cloud-3 - samples/client/petstore/java-helidon-client/mp - samples/client/petstore/java-helidon-client/se + - samples/client/petstore/spring-http-interface-reactive + - samples/client/petstore/spring-http-interface # servers - samples/openapi3/server/petstore/springboot-3 - samples/server/petstore/java-helidon-server/mp - samples/server/petstore/java-helidon-server/se + - samples/client/petstore/spring-http-interface-reactive + - samples/client/petstore/spring-http-interface steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 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-kotlin-server-jdk17.yaml b/.github/workflows/samples-kotlin-server-jdk17.yaml new file mode 100644 index 0000000000..099330f5b2 --- /dev/null +++ b/.github/workflows/samples-kotlin-server-jdk17.yaml @@ -0,0 +1,46 @@ +name: Samples Kotlin server + +on: + push: + branches: + - 'samples/server/petstore/kotlin-springboot-3*/**' + pull_request: + paths: + - 'samples/server/petstore/kotlin-springboot-3*/**' + +env: + GRADLE_VERSION: 7.4 + +jobs: + build: + name: Build Kotlin server + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # server + - samples/server/petstore/kotlin-springboot-3 + 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: | + ~/.gradle + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Install Gradle wrapper + uses: eskatos/gradle-command-action@v2 + with: + gradle-version: ${{ env.GRADLE_VERSION }} + build-root-directory: ${{ matrix.sample }} + arguments: wrapper + - name: Build + working-directory: ${{ matrix.sample }} + run: ./gradlew build -x test diff --git a/.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-python-nextgen-client-echo-api.yaml b/.github/workflows/samples-python-nextgen-client-echo-api.yaml new file mode 100644 index 0000000000..6d267f923a --- /dev/null +++ b/.github/workflows/samples-python-nextgen-client-echo-api.yaml @@ -0,0 +1,38 @@ +name: Python Client (Echo API) + +on: + push: + paths: + - samples/client/echo_api/python-nextgen/** + pull_request: + paths: + - samples/client/echo_api/python-nextgen/** +jobs: + build: + name: Test Python client + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/echo_api/python-nextgen + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.7' + - 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: Install + working-directory: ${{ matrix.sample }} + run: | + pip install -r requirements.txt + pip install -r test-requirements.txt + - name: Test + working-directory: ${{ matrix.sample }} + run: python -m pytest 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..3598d19172 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; @@ -214,15 +215,15 @@ after_success: echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi; - ## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks. - - if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then - cd website; - git config --global user.name "${GH_NAME}"; - git config --global user.email "${GH_EMAIL}"; - echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc; - yarn install; - GIT_USER="${GH_NAME}" yarn run publish-gh-pages; - fi; + # publish latest website, variables below are secure environment variables which are unavailable to PRs from forks. + #- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + # cd website; + # git config --global user.name "${GH_NAME}"; + # git config --global user.email "${GH_EMAIL}"; + # echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc; + # yarn install; + # GIT_USER="${GH_NAME}" yarn run publish-gh-pages; + # fi; env: - DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5 diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 6cba564ffb..260de84823 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -35,11 +35,11 @@ elif [ "$NODE_INDEX" = "2" ]; then #sudo apt-get -y build-dep libcurl4-gnutls-dev #sudo apt-get -y install libcurl4-gnutls-dev - # Install golang version 1.14 + # Install golang version 1.18 go version - sudo mkdir /usr/local/go1.14 - wget -c https://dl.google.com/go/go1.14.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local/go1.14 - export PATH="/usr/local/go1.14/go/bin:$PATH" + sudo mkdir /usr/local/go1.18 + wget -c https://dl.google.com/go/go1.18.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local/go1.18 + export PATH="/usr/local/go1.18/go/bin:$PATH" go version # run integration tests @@ -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/CONTRIBUTING.md b/CONTRIBUTING.md index 60b08e90b3..56d465c2a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,6 +60,7 @@ Code change should conform to the programming style guide of the respective lang - Haskell: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md - Java: https://google.github.io/styleguide/javaguide.html - JavaScript: https://github.com/airbnb/javascript/ +- Julia: https://docs.julialang.org/en/v1/manual/style-guide/ - Kotlin: https://kotlinlang.org/docs/reference/coding-conventions.html - ObjC: https://github.com/NYTimes/objective-c-style-guide - Perl: http://perldoc.perl.org/perlstyle.html diff --git a/README.md b/README.md index 44f309a193..d51150914a 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,23 @@
](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
@@ -70,13 +76,13 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
## Overview
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
-| | Languages/Frameworks |
-| -------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 13.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
-| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
-| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
-| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
-| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
+| | Languages/Frameworks |
+| -------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 13.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
+| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
+| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
+| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
+| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
## Table of contents
@@ -115,8 +121,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 7.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.0-SNAPSHOT/) | Feb/Mar 2023 | Major release with breaking changes (no fallback) |
-| 6.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.3.0-SNAPSHOT/) | 05.12.2022 | Minor release with breaking changes (with fallback) |
-| [6.2.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.2.1) (latest stable release) | 01.11.2022 | Patch release (enhancements, bug fixes, etc) |
+| 6.4.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.4.0-SNAPSHOT/) | 05.12.2022 | Minor release with breaking changes (with fallback) |
+| [6.3.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.3.0) (latest stable release) | 01.02.2023 | Minor release with breaking changes (with fallback) |
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
@@ -124,6 +130,8 @@ OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page.
+For decomissioned generators/libraries/frameworks, please refer to [the "Decommission" label](https://github.com/OpenAPITools/openapi-generator/issues?q=label%3ADecommission+is%3Amerged+) in the pull request page.
+
## [1.2 - Artifacts on Maven Central](#table-of-contents)
You can find our released artifacts on maven central:
@@ -174,16 +182,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
-JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar`
+JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar`
For **Mac/Linux** users:
```sh
-wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar -O openapi-generator-cli.jar
+wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar -O openapi-generator-cli.jar
```
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
-Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -408,7 +416,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
-openapi-generator-cli version-manager set 6.2.1
+openapi-generator-cli version-manager set 6.3.0
```
Or install it as dev-dependency:
@@ -432,7 +440,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
-You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.2.1/openapi-generator-cli-6.2.1.jar)
+You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar)
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -605,6 +613,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [DB Systel](https://www.dbsystel.de)
- [Deeporute.ai](https://www.deeproute.ai/)
- [Devsupply](https://www.devsupply.com/)
+- [dmTECH GmbH](https://www.dmTECH.de)
- [DocSpring](https://docspring.com/)
- [dwango](https://dwango.co.jp/)
- [Edge Impulse](https://www.edgeimpulse.com/)
@@ -876,6 +885,10 @@ 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/)
+- 2023-01-06 - [Major Improvements with Helidon and OpenAPI](https://medium.com/helidon/major-improvements-with-helidon-and-openapi-f76a0951508e) by [Tim Quinn](https://medium.com/@tquinno600)
+- 2023-02-02 - [Replacing Postman with the Jetbrains HTTP Client](https://lengrand.fr/replacing-postman-in-seconds-with-the-jetbrains-http-client/) by [julien Lengrand-Lambert](https://github.com/jlengrand)
## [6 - About Us](#table-of-contents)
@@ -945,13 +958,15 @@ Here is a list of template creators:
* Java (Google APIs Client Library): @charlescapps
* Java (Rest-assured): @viclovsky
* Java (Java 11 Native HTTP client): @bbdouglas
- * Java (Apache HttpClient): @harrywhite4
+ * Java (Apache HttpClient 5.x): @harrywhite4 @andrevegas
* Java (Helidon): @spericas @tjquinno @tvallin
* Javascript/NodeJS: @jfiala
* JavaScript (Apollo DataSource): @erithmetic
* JavaScript (Closure-annotated Angular) @achew22
* JavaScript (Flow types) @jaypea
+ * Jetbrains HTTP Client : @jlengrand
* JMeter: @davidkiss
+ * Julia: @tanmaykm
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Kotlin (MultiPlatform): @andrewemery
* Kotlin (Volley): @alisters
@@ -1019,6 +1034,7 @@ Here is a list of template creators:
* JAX-RS CXF: @hiveship
* JAX-RS CXF (CDI): @nickcmaynard
* JAX-RS RestEasy (JBoss EAP): @jfiala
+ * Julia: @tanmaykm
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Kotlin (Spring Boot): @dr4ke616
* Kotlin (Vertx): @Wooyme
@@ -1086,47 +1102,49 @@ If you want to join the committee, please kindly apply by sending an email to te
#### Members of Technical Committee
-| Languages/Generators | Member (join date) |
-| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| ActionScript | |
-| Ada | @stcarrez (2018/02) @michelealbano (2018/02) |
-| Android | @jaz-ah (2017/09) |
-| Apex | |
-| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
-| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) |
-| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
-| C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) |
-| Clojure | |
-| Crystal | @cyangle (2021/01) |
-| Dart | @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) |
-| Eiffel | @jvelilla (2017/09) |
-| Elixir | @mrmstn (2018/12) |
-| Elm | @eriktim (2018/09) |
-| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
-| F# | @nmfisher (2019/05) |
-| Go | @antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @jirikuncar (2021/01) @ph4r5h4d (2021/04) |
-| GraphQL | @renepardon (2018/12) |
-| Groovy | |
-| Haskell | |
-| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) |
-| Java Spring | @cachescrubber (2022/02) @welshm (2022/02) @MelleD (2022/02) @atextor (2022/02) @manedev79 (2022/02) @javisst (2022/02) @borsch (2022/02) @banlevente (2022/02) @Zomzog (2022/09) |
-| JMeter | @kannkyo (2021/01) |
-| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) |
-| Lua | @daurnimator (2017/08) |
-| Nim | |
-| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
-| ObjC | |
-| OCaml | @cgensoul (2019/08) |
-| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
-| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) |
-| PowerShell | @wing328 (2020/05) |
-| Python | @spacether (2019/11) [:heart:][spacether sponsorship] |
-| R | @Ramanth (2019/07) @saigiridhar21 (2019/07) |
-| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
-| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) |
-| Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) |
-| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) |
-| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) |
+| Languages/Generators | Member (join date) |
+|:----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ActionScript | |
+| Ada | @stcarrez (2018/02) @michelealbano (2018/02) |
+| Android | @jaz-ah (2017/09) |
+| Apex | |
+| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
+| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) |
+| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
+| C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) |
+| Clojure | |
+| Crystal | @cyangle (2021/01) |
+| Dart | @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) |
+| Eiffel | @jvelilla (2017/09) |
+| Elixir | @mrmstn (2018/12) |
+| Elm | @eriktim (2018/09) |
+| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
+| F# | @nmfisher (2019/05) |
+| Go | @antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @jirikuncar (2021/01) @ph4r5h4d (2021/04) |
+| GraphQL | @renepardon (2018/12) |
+| Groovy | |
+| Haskell | |
+| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) |
+| Java Spring | @cachescrubber (2022/02) @welshm (2022/02) @MelleD (2022/02) @atextor (2022/02) @manedev79 (2022/02) @javisst (2022/02) @borsch (2022/02) @banlevente (2022/02) @Zomzog (2022/09) |
+| JMeter | @kannkyo (2021/01) |
+| Jetbrains HTTP Client | @jlengrand (2023/01) |
+| Julia | @tanmaykm (2023/01) |
+| Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) |
+| Lua | @daurnimator (2017/08) |
+| Nim | |
+| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
+| ObjC | |
+| OCaml | @cgensoul (2019/08) |
+| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
+| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) |
+| PowerShell | @wing328 (2020/05) |
+| Python | @spacether (2019/11) [:heart:][spacether sponsorship] @krjakbrjak (2023/02) |
+| R | @Ramanth (2019/07) @saigiridhar21 (2019/07) |
+| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
+| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) |
+| Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) |
+| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) |
+| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) |
Past Members of Technical Committee:
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/cpp-qt-client.yaml b/bin/configs/cpp-qt-client.yaml
index 26f46eae4a..c10d98ae60 100644
--- a/bin/configs/cpp-qt-client.yaml
+++ b/bin/configs/cpp-qt-client.yaml
@@ -3,5 +3,6 @@ outputDir: samples/client/petstore/cpp-qt
inputSpec: modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/cpp-qt-client
additionalProperties:
+ packageName: CppQtPetstoreClient
cppNamespace: test_namespace
modelNamePrefix: PFX
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..7d80dc2338 100644
--- a/bin/configs/java-camel-petstore-new.yaml
+++ b/bin/configs/java-camel-petstore-new.yaml
@@ -12,6 +12,7 @@ additionalProperties:
library: "spring-boot"
withXml: true
jackson: true
- camelUseDefaultValidationtErrorProcessor: true
+ camelUseDefaultValidationErrorProcessor: true
camelRestClientRequestValidation: true
camelSecurityDefinitions: true
+ implicitHeaders: 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-jersey2-8-swagger1.yaml b/bin/configs/java-jersey2-8-swagger1.yaml
new file mode 100644
index 0000000000..643db1be12
--- /dev/null
+++ b/bin/configs/java-jersey2-8-swagger1.yaml
@@ -0,0 +1,14 @@
+generatorName: java
+outputDir: samples/openapi3/client/petstore/java/jersey2-java8-swagger1
+library: jersey2
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/Java
+additionalProperties:
+ artifactId: petstore-openapi3-jersey2-java8
+ hideGenerationTimestamp: true
+ serverPort: "8082"
+ dateLibrary: java8
+ useOneOfDiscriminatorLookup: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ gradleProperties: "\n# JVM arguments\norg.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m\n# set timeout\norg.gradle.daemon.idletimeout=3600000\n# show all warnings\norg.gradle.warning.mode=all"
+ annotationLibrary: "swagger1"
diff --git a/bin/configs/java-native-async.yaml b/bin/configs/java-native-async.yaml
index eb95d524a2..a193298048 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/java/native/petstore-with-fake-endpoints-models-for-testing-with-http-signature.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..cac729a68a 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/java/native/petstore-with-fake-endpoints-models-for-testing-with-http-signature.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-okhttp-gson-swagger1.yaml b/bin/configs/java-okhttp-gson-swagger1.yaml
new file mode 100644
index 0000000000..c8fea398d4
--- /dev/null
+++ b/bin/configs/java-okhttp-gson-swagger1.yaml
@@ -0,0 +1,12 @@
+generatorName: java
+outputDir: samples/client/petstore/java/okhttp-gson-swagger1
+library: okhttp-gson
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/Java
+additionalProperties:
+ artifactId: petstore-okhttp-gson
+ hideGenerationTimestamp: "true"
+ useOneOfDiscriminatorLookup: "true"
+ disallowAdditionalPropertiesIfNotPresent: false
+ annotationLibrary: "swagger1"
+
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-resttemplate-swagger1.yaml b/bin/configs/java-resttemplate-swagger1.yaml
new file mode 100644
index 0000000000..5c5cd2018c
--- /dev/null
+++ b/bin/configs/java-resttemplate-swagger1.yaml
@@ -0,0 +1,10 @@
+generatorName: java
+outputDir: samples/client/petstore/java/resttemplate-swagger1
+library: resttemplate
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/Java
+additionalProperties:
+ artifactId: petstore-resttemplate
+ hideGenerationTimestamp: "true"
+ annotationLibrary: "swagger1"
+ java8: true
diff --git a/bin/configs/java-resttemplate.yaml b/bin/configs/java-resttemplate.yaml
index 9c61a34ba9..477b09658d 100644
--- a/bin/configs/java-resttemplate.yaml
+++ b/bin/configs/java-resttemplate.yaml
@@ -7,3 +7,4 @@ additionalProperties:
artifactId: petstore-resttemplate
hideGenerationTimestamp: "true"
java8: true
+ containerDefaultToNull: 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/java-webclient.yaml b/bin/configs/java-webclient.yaml
index a78b3f5e47..d05ea4bc14 100644
--- a/bin/configs/java-webclient.yaml
+++ b/bin/configs/java-webclient.yaml
@@ -6,3 +6,4 @@ templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: petstore-webclient
hideGenerationTimestamp: "true"
+ containerDefaultToNull: "true"
diff --git a/bin/configs/jaxrs-spec-jakarta.yaml b/bin/configs/jaxrs-spec-jakarta.yaml
new file mode 100644
index 0000000000..760dbdea9d
--- /dev/null
+++ b/bin/configs/jaxrs-spec-jakarta.yaml
@@ -0,0 +1,11 @@
+generatorName: jaxrs-spec
+outputDir: samples/server/petstore/jaxrs-spec-jakarta
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
+additionalProperties:
+ artifactId: jaxrs-spec-petstore-server-jakarta
+ serializableModel: "true"
+ hideGenerationTimestamp: "true"
+ implicitHeadersRegex: (api_key|enum_header_string)
+ generateBuilders: "true"
+ useJakartaEe: "true"
diff --git a/bin/configs/jetbrains-http-client-petstore-new.yaml b/bin/configs/jetbrains-http-client-petstore-new.yaml
new file mode 100644
index 0000000000..72c5012b97
--- /dev/null
+++ b/bin/configs/jetbrains-http-client-petstore-new.yaml
@@ -0,0 +1,6 @@
+generatorName: jetbrains-http-client
+outputDir: samples/client/petstore/jetbrains/http/client
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/jetbrains-http-client
+additionalProperties:
+ hideGenerationTimestamp: "true"
diff --git a/bin/configs/julia-client-petstore-new.yaml b/bin/configs/julia-client-petstore-new.yaml
new file mode 100644
index 0000000000..c117487efd
--- /dev/null
+++ b/bin/configs/julia-client-petstore-new.yaml
@@ -0,0 +1,7 @@
+generatorName: julia-client
+outputDir: samples/client/petstore/julia
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/julia-client
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ packageName: PetStoreClient
diff --git a/bin/configs/julia-server-petstore-new.yaml b/bin/configs/julia-server-petstore-new.yaml
new file mode 100644
index 0000000000..9b709b71db
--- /dev/null
+++ b/bin/configs/julia-server-petstore-new.yaml
@@ -0,0 +1,7 @@
+generatorName: julia-server
+outputDir: samples/server/petstore/julia
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/julia-server
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ packageName: PetStoreServer
diff --git a/bin/configs/kotlin-spring-boot-3.yaml b/bin/configs/kotlin-spring-boot-3.yaml
new file mode 100644
index 0000000000..609efd31f2
--- /dev/null
+++ b/bin/configs/kotlin-spring-boot-3.yaml
@@ -0,0 +1,13 @@
+generatorName: kotlin-spring
+outputDir: samples/server/petstore/kotlin-springboot-3
+library: spring-boot
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
+additionalProperties:
+ documentationProvider: none
+ annotationLibrary: none
+ useSwaggerUI: "false"
+ serviceImplementation: "true"
+ serializableModel: "true"
+ beanValidations: "true"
+ useSpringBoot3: "true"
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..b211652bf5
--- /dev/null
+++ b/bin/configs/python-nextgen-aiohttp.yaml
@@ -0,0 +1,8 @@
+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
+ floatStrictType: false
diff --git a/bin/configs/python-nextgen-echo-api.yaml b/bin/configs/python-nextgen-echo-api.yaml
new file mode 100644
index 0000000000..47dd5fa3ba
--- /dev/null
+++ b/bin/configs/python-nextgen-echo-api.yaml
@@ -0,0 +1,7 @@
+generatorName: python-nextgen
+outputDir: samples/client/echo_api/python-nextgen
+inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
+templateDir: modules/openapi-generator/src/main/resources/python-nextgen
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ allowStringInDateTimeParameters: true
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/spring-http-interface-reactive.yaml b/bin/configs/spring-http-interface-reactive.yaml
new file mode 100644
index 0000000000..749d6fbf08
--- /dev/null
+++ b/bin/configs/spring-http-interface-reactive.yaml
@@ -0,0 +1,11 @@
+generatorName: spring
+library: spring-http-interface
+outputDir: samples/client/petstore/spring-http-interface-reactive
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ artifactId: spring-http-interface-reactive
+ snapshotVersion: "true"
+ hideGenerationTimestamp: "true"
+ reactive: "true"
+
diff --git a/bin/configs/spring-http-interface.yaml b/bin/configs/spring-http-interface.yaml
new file mode 100644
index 0000000000..a5cf6c2d7c
--- /dev/null
+++ b/bin/configs/spring-http-interface.yaml
@@ -0,0 +1,10 @@
+generatorName: spring
+library: spring-http-interface
+outputDir: samples/client/petstore/spring-http-interface
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ artifactId: spring-http-interface
+ snapshotVersion: "true"
+ hideGenerationTimestamp: "true"
+ modelNameSuffix: 'Dto'
diff --git a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml
index c4d1eb5b68..6cb1ca4b9c 100644
--- a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml
+++ b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml
@@ -8,3 +8,4 @@ additionalProperties:
documentationProvider: springfox
artifactId: springboot-spring-pageable-delegatePattern
hideGenerationTimestamp: 'true'
+ implicitHeadersRegex: ^Version.*
diff --git a/bin/configs/springboot-petstore-server-spring-pageable.yaml b/bin/configs/springboot-petstore-server-spring-pageable.yaml
index db518c2260..2f4e88ed81 100644
--- a/bin/configs/springboot-petstore-server-spring-pageable.yaml
+++ b/bin/configs/springboot-petstore-server-spring-pageable.yaml
@@ -7,3 +7,4 @@ additionalProperties:
documentationProvider: springfox
artifactId: springboot-spring-pageable
hideGenerationTimestamp: 'true'
+ implicitHeadersRegex: ^Version.*
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 e294749026..e6356812f9 100644
--- a/bin/utils/test_file_list.yaml
+++ b/bin/utils/test_file_list.yaml
@@ -1,8 +1,11 @@
---
# csharp-netcore test files and image for upload
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs"
- sha256: aaa596db60531417994533b0e7962eca21dcaf8fa3aea1e2e3cb8b1b216cb89f
+ sha256: 054adb6efaff70f492e471cb3e4d628d22cda814906808fd3fcce36ce710b7ee
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs"
- sha256: dae985015ba461297927d544a78267f2def35e07c3f14ca66468fd61e1fd1c26
+ sha256: ff6a5fccd4c026d85fe7232911cda445f5065dcefd03abe258e19af5b28d05c5
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png"
sha256: 0a67c32728197e942b13bdda064b73793f12f5c795f1e5cf35a3adf69c973230
+# java okhttp gson test files
+- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java"
+ sha256: db505f7801fef62c13a08a8e9ca1fc4c5c947ab46b46f12943139d353feacf17
diff --git a/bitrise.yml b/bitrise.yml
index 16084569fd..d296195174 100644
--- a/bitrise.yml
+++ b/bitrise.yml
@@ -10,27 +10,15 @@ trigger_map:
workflows:
primary:
steps:
- - git-clone@4.0.17: {}
- - brew-install@0.11.0:
- inputs:
- - packages: maven
- - script@1.1.6:
+ - git-clone@8.0.0: {}
+ - script@1.2.0:
title: Install Cocoapods
inputs:
- content: |
#!/usr/bin/env bash
sudo gem install cocoapods
- - script@1.1.6:
- inputs:
- - content: |
- #!/usr/bin/env bash
-
- set -e
-
- mvn --no-snapshot-updates package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- title: Build openapi-generator
- - script@1.1.6:
+ - script@1.2.0:
title: Run Swift5 tests
inputs:
- content: |
@@ -40,3 +28,6 @@ workflows:
./samples/client/petstore/swift5/swift5_test_all.sh
+meta:
+ bitrise.io:
+ stack: osx-xcode-14.2.x
diff --git a/docs/contributing.md b/docs/contributing.md
index de8dcade6b..7075b7792b 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -64,6 +64,7 @@ Code change should conform to the programming style guide of the respective lang
- Haskell: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
- Java: https://google.github.io/styleguide/javaguide.html
- JavaScript: https://github.com/airbnb/javascript/
+- Julia: https://docs.julialang.org/en/v1/manual/style-guide/
- Kotlin: https://kotlinlang.org/docs/reference/coding-conventions.html
- ObjC: https://github.com/NYTimes/objective-c-style-guide
- Perl: http://perldoc.perl.org/perlstyle.html
diff --git a/docs/customization.md b/docs/customization.md
index 39d45c3834..f9be18ff07 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,78 @@ paths:
## Inline Schema Naming
-Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option, e.g. in CLI
+Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option. For exmaple, run the following,
```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings inline_object_2=SomethingMapped,inline_object_4=nothing_new
```
+will show the following in the console:
+```
+[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as arbitraryObjectRequestBodyProperty_request. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI).
+[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as meta_200_response. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI).
+```
+For example, to name the inline schema `meta_200_response` as `MetaObject`, use the `--inline-schema-name-mappings` option as follows:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings meta_200_response=MetaObject,arbitraryObjectRequestBodyProperty_request=ArbitraryRequest
+```
Another useful option is `inlineSchemaNameDefaults`, which allows you to customize the suffix of the auto-generated inline schema name, e.g. in CLI
```
---inline-schema-name-defaults arrayItemSuffix=_array_item
+--inline-schema-name-defaults arrayItemSuffix=_array_item,mapItemSuffix=_map_item
```
-Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment.
+Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas.
+
+## 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/ --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true
+```
+
+- `REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY`: when set to `true`, oneOf/anyOf schema with only required properies only in a schema with properties will be removed. [(example)](modules/openapi-generator/src/test/resources/3_0/removeAnyOfOneOfAndKeepPropertiesOnly_test.yaml)
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/removeAnyOfOneOfAndKeepPropertiesOnly_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY=true
+```
+
+- `SIMPLIFY_ANYOF_STRING_AND_ENUM_STRING`: when set to `true`, simplify anyOf schema with string and enum of string to just `string`
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/simplifyAnyOfStringAndEnumString_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SIMPLIFY_ANYOF_STRING_AND_ENUM_STRING=true
+```
+
+- `SIMPLIFY_BOOLEAN_ENUM`: when set to `true`, convert boolean enum to just enum.
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/simplifyBooleanEnum_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SIMPLIFY_BOOLEAN_ENUM=true
+```
+
+- `SIMPLIFY_ONEOF_ANYOF`: when set to `true`, simplify oneOf/anyOf by 1) removing null (sub-schema) and setting nullable to true instead, and 2) simplifying oneOf/anyOf with a single sub-schema to just the sub-schema itself.
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/simplifyOneOfAnyOf_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SIMPLIFY_ONEOF_ANYOF=true
+```
+
+- `KEEP_ONLY_FIRST_TAG_IN_OPERATION`: when set to `true`, only keep the first tag in operation if there are more than one tag defined.
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/enableKeepOnlyFirstTagInOperation_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer KEEP_ONLY_FIRST_TAG_IN_OPERATION=true
+```
+
+- `SET_TAGS_FOR_ALL_OPERATIONS`: when set to a string value, tags in all operatinos will reset to the string value provided.
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/enableKeepOnlyFirstTagInOperation_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=true
+```
diff --git a/docs/generators.md b/docs/generators.md
index cd0466f9ad..a21693e18e 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -39,7 +39,9 @@ The following generators are available:
* [javascript-closure-angular](generators/javascript-closure-angular.md)
* [javascript-flowtyped](generators/javascript-flowtyped.md)
* [jaxrs-cxf-client](generators/jaxrs-cxf-client.md)
+* [jetbrains-http-client (experimental)](generators/jetbrains-http-client.md)
* [jmeter](generators/jmeter.md)
+* [julia-client (beta)](generators/julia-client.md)
* [k6 (beta)](generators/k6.md)
* [kotlin](generators/kotlin.md)
* [lua (beta)](generators/lua.md)
@@ -52,6 +54,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)
@@ -109,6 +112,7 @@ The following generators are available:
* [jaxrs-resteasy](generators/jaxrs-resteasy.md)
* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md)
* [jaxrs-spec](generators/jaxrs-spec.md)
+* [julia-server (beta)](generators/julia-server.md)
* [kotlin-server](generators/kotlin-server.md)
* [kotlin-spring](generators/kotlin-spring.md)
* [kotlin-vertx (beta)](generators/kotlin-vertx.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/cpp-qt-client.md b/docs/generators/cpp-qt-client.md
index c7da6c1da0..09d65c8ea4 100644
--- a/docs/generators/cpp-qt-client.md
+++ b/docs/generators/cpp-qt-client.md
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
@@ -382,6 +392,7 @@ public final class GeneratorSettings implements Serializable {
schemaMappings = Collections.unmodifiableMap(builder.schemaMappings);
inlineSchemaNameMappings = Collections.unmodifiableMap(builder.inlineSchemaNameMappings);
inlineSchemaNameDefaults = Collections.unmodifiableMap(builder.inlineSchemaNameDefaults);
+ openapiNormalizer = Collections.unmodifiableMap(builder.openapiNormalizer);
languageSpecificPrimitives = Collections.unmodifiableSet(builder.languageSpecificPrimitives);
reservedWordsMappings = Collections.unmodifiableMap(builder.reservedWordsMappings);
serverVariables = Collections.unmodifiableMap(builder.serverVariables);
@@ -455,6 +466,7 @@ public final class GeneratorSettings implements Serializable {
schemaMappings = Collections.unmodifiableMap(new HashMap<>(0));
inlineSchemaNameMappings = Collections.unmodifiableMap(new HashMap<>(0));
inlineSchemaNameDefaults = Collections.unmodifiableMap(new HashMap<>(0));
+ openapiNormalizer = Collections.unmodifiableMap(new HashMap<>(0));
languageSpecificPrimitives = Collections.unmodifiableSet(new HashSet<>(0));
reservedWordsMappings = Collections.unmodifiableMap(new HashMap<>(0));
serverVariables = Collections.unmodifiableMap(new HashMap<>(0));
@@ -515,6 +527,9 @@ public final class GeneratorSettings implements Serializable {
if (copy.getInlineSchemaNameDefaults() != null) {
builder.inlineSchemaNameDefaults.putAll(copy.getInlineSchemaNameDefaults());
}
+ if (copy.getOpenAPINormalizer() != null) {
+ builder.openapiNormalizer.putAll(copy.getOpenAPINormalizer());
+ }
if (copy.getLanguageSpecificPrimitives() != null) {
builder.languageSpecificPrimitives.addAll(copy.getLanguageSpecificPrimitives());
}
@@ -557,6 +572,7 @@ public final class GeneratorSettings implements Serializable {
private Map
+ * Return null if you do NOT want a default value.
+ * Any non-null value will cause {{#defaultValue} check to pass.
+ *
+ * @param schema Property schema
+ * @param codegenProperty Codegen property
+ * @return string presentation of the default value of the property
+ */
+ public String toDefaultValue(CodegenProperty codegenProperty, Schema schema) {
+ // use toDefaultValue(schema) if generator has not overriden this method
+ return toDefaultValue(schema);
+ }
+
/**
* returns the OpenAPI type for the property. Use getAlias to handle $ref of primitive type
*
@@ -2761,7 +2836,7 @@ public class DefaultCodegen implements CodegenConfig {
/**
* A method that allows generators to pre-process test example payloads
- * This can be useful if one needs to change how values like null in string are represnted
+ * This can be useful if one needs to change how values like null in string are represented
* @param data the test data payload
* @return the updated test data payload
*/
@@ -2861,10 +2936,6 @@ public class DefaultCodegen implements CodegenConfig {
@Override
public CodegenModel fromModel(String name, Schema schema) {
Map