diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c453503d315e..6750d76e7f13 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,7 @@ assignees: '' #### Bug Report Checklist - [ ] Have you provided a full/minimal spec to reproduce the issue? -- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))? +- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))? - [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists? - [ ] Have you searched for related issues/PRs? - [ ] What's the actual output vs expected output? diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 78143868c3b4..27a2fbe420a1 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -45,7 +45,7 @@ jobs: ${{ runner.os }}-gradle- - name: Setup Maven - uses: s4u/setup-maven-action@v1.17.0 + uses: s4u/setup-maven-action@v1.18.0 with: java-version: ${{ matrix.java }} maven-version: 3.8.8 @@ -87,7 +87,7 @@ jobs: - name: Check out code uses: actions/checkout@v4 - name: Setup Maven - uses: s4u/setup-maven-action@v1.17.0 + uses: s4u/setup-maven-action@v1.18.0 with: java-version: 11 maven-version: 3.8.8 diff --git a/.github/workflows/samples-aspnet-fastenpoints-server.yaml b/.github/workflows/samples-aspnet-fastenpoints-server.yaml index 1b6e4eed457a..c7f102cecc48 100644 --- a/.github/workflows/samples-aspnet-fastenpoints-server.yaml +++ b/.github/workflows/samples-aspnet-fastenpoints-server.yaml @@ -26,7 +26,7 @@ jobs: - samples/server/petstore/aspnet/fastendpoints-useValidators steps: - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4.1.0 + - uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: '8.0.x' - name: Build diff --git a/.github/workflows/samples-dotnet-standard.yaml b/.github/workflows/samples-dotnet-standard.yaml index 13389ca6b316..f2b6a6454c00 100644 --- a/.github/workflows/samples-dotnet-standard.yaml +++ b/.github/workflows/samples-dotnet-standard.yaml @@ -16,7 +16,7 @@ on: jobs: build: name: Build .Net projects - runs-on: ubuntu-latest + runs-on: windows-latest strategy: fail-fast: false matrix: @@ -28,7 +28,7 @@ jobs: # - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/ steps: - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4.1.0 + - uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: 3.1.* - name: Build diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml deleted file mode 100644 index f5437863780a..000000000000 --- a/.github/workflows/samples-dotnet.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: Samples C# .Net 8 Clients - -on: - push: - paths: - - samples/client/petstore/csharp/generichost/latest/** - - samples/client/petstore/csharp/generichost/net8/** - - samples/client/petstore/csharp/httpclient/net8/** - - samples/client/petstore/csharp/restsharp/net8/** - - samples/client/petstore/csharp/unityWebRequest/net8/** - pull_request: - paths: - - samples/client/petstore/csharp/generichost/latest/** - - samples/client/petstore/csharp/generichost/net8/** - - samples/client/petstore/csharp/httpclient/net8/** - - samples/client/petstore/csharp/restsharp/net8/** - - samples/client/petstore/csharp/unityWebRequest/net8/** -jobs: - build: - name: Build .Net projects - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - sample: - - samples/client/petstore/csharp/generichost/latest/Tags - - samples/client/petstore/csharp/generichost/net8/AllOf - - samples/client/petstore/csharp/generichost/net8/AnyOf - - samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare - - samples/client/petstore/csharp/generichost/net8/FormModels - - samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests - - samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests - - samples/client/petstore/csharp/generichost/net8/NullReferenceTypes - - samples/client/petstore/csharp/generichost/net8/OneOf - - samples/client/petstore/csharp/generichost/net8/Petstore - - samples/client/petstore/csharp/generichost/net8/SourceGeneration - - samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4.1.0 - with: - dotnet-version: '8.0.x' - - 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-dotnet6-client-echo-api.yaml b/.github/workflows/samples-dotnet6-client-echo-api.yaml deleted file mode 100644 index e384ef5b74b1..000000000000 --- a/.github/workflows/samples-dotnet6-client-echo-api.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Samples C# .Net 6 Client Echo API - -on: - push: - paths: - - samples/client/echo_api/csharp-restsharp/** - pull_request: - paths: - - samples/client/echo_api/csharp-restsharp/** -jobs: - build: - name: Build .Net clients - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - sample: - # clients - - samples/client/echo_api/csharp-restsharp/ - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4.1.0 - with: - dotnet-version: '6.0.x' - - 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: | - dotnet build Org.OpenAPITools.sln - dotnet test Org.OpenAPITools.sln diff --git a/.github/workflows/samples-dotnet6-client.yaml b/.github/workflows/samples-dotnet6-client.yaml deleted file mode 100644 index 87c099b4c17f..000000000000 --- a/.github/workflows/samples-dotnet6-client.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Samples C# .Net 6 Client - -on: - push: - paths: - - samples/client/petstore/csharp/restsharp/net6/** - pull_request: - paths: - - samples/client/petstore/csharp/restsharp/net6/** -jobs: - build: - name: Build .Net clients - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - sample: - - samples/client/petstore/csharp/restsharp/net6/ParameterMappings/ - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4.1.0 - with: - dotnet-version: '6.0.x' - - name: Build - working-directory: ${{ matrix.sample }} - run: dotnet build Org.OpenAPITools.sln diff --git a/.github/workflows/samples-dotnet6-server.yaml b/.github/workflows/samples-dotnet6-server.yaml index 32b313ce7136..52482c065e9a 100644 --- a/.github/workflows/samples-dotnet6-server.yaml +++ b/.github/workflows/samples-dotnet6-server.yaml @@ -25,7 +25,7 @@ jobs: - samples/server/petstore/aspnetcore-6.0-useSwashBuckle steps: - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4.1.0 + - uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: '6.0.x' - name: Build diff --git a/.github/workflows/samples-dotnet8-client-echo-api.yaml b/.github/workflows/samples-dotnet8-client-echo-api.yaml new file mode 100644 index 000000000000..cba70044c353 --- /dev/null +++ b/.github/workflows/samples-dotnet8-client-echo-api.yaml @@ -0,0 +1,33 @@ +name: Samples C# .Net 8 Client Echo API + +on: + push: + paths: + - samples/client/echo_api/csharp/restsharp/net8/** + pull_request: + paths: + - samples/client/echo_api/csharp/restsharp/net8/** +jobs: + build: + name: Build .Net clients + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/echo_api/csharp/restsharp/net8/EchoApi + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4.2.0 + with: + dotnet-version: '8.0.x' + - 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: | + dotnet build Org.OpenAPITools.sln + dotnet test Org.OpenAPITools.sln diff --git a/.github/workflows/samples-dotnet8-client.yaml b/.github/workflows/samples-dotnet8-client.yaml new file mode 100644 index 000000000000..f6708d0f6658 --- /dev/null +++ b/.github/workflows/samples-dotnet8-client.yaml @@ -0,0 +1,26 @@ +name: Samples C# .Net 8 Client + +on: + push: + paths: + - samples/client/petstore/csharp/restsharp/net8/** + pull_request: + paths: + - samples/client/petstore/csharp/restsharp/net8/** +jobs: + build: + name: Build .Net clients + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + - samples/client/petstore/csharp/restsharp/net8/ParameterMappings/ + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4.2.0 + with: + dotnet-version: '8.0.x' + - name: Build + working-directory: ${{ matrix.sample }} + run: dotnet build Org.OpenAPITools.sln diff --git a/.github/workflows/samples-dotnet8-server.yaml b/.github/workflows/samples-dotnet8-server.yaml index 0b8a9ac99d92..0ac62ddafc3d 100644 --- a/.github/workflows/samples-dotnet8-server.yaml +++ b/.github/workflows/samples-dotnet8-server.yaml @@ -23,9 +23,10 @@ jobs: - samples/server/petstore/aspnetcore-8.0-pocoModels - samples/server/petstore/aspnetcore-8.0-project4Models - samples/server/petstore/aspnetcore-8.0-useSwashBuckle + - samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management steps: - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4.1.0 + - uses: actions/setup-dotnet@v4.2.0 with: dotnet-version: '8.0.x' - name: Build diff --git a/.github/workflows/samples-dotnet8.yaml b/.github/workflows/samples-dotnet8.yaml new file mode 100644 index 000000000000..ff66725e3358 --- /dev/null +++ b/.github/workflows/samples-dotnet8.yaml @@ -0,0 +1,45 @@ +name: Samples C# .Net 8 Clients + +on: + push: + paths: + - samples/client/petstore/csharp/generichost/net8/** + - samples/client/petstore/csharp/httpclient/net8/** + - samples/client/petstore/csharp/restsharp/net8/** + - samples/client/petstore/csharp/unityWebRequest/net8/** + pull_request: + paths: + - samples/client/petstore/csharp/generichost/net8/** + - samples/client/petstore/csharp/httpclient/net8/** + - samples/client/petstore/csharp/restsharp/net8/** + - samples/client/petstore/csharp/unityWebRequest/net8/** +jobs: + build: + name: Build .Net projects + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + - samples/client/petstore/csharp/generichost/net8/AllOf + - samples/client/petstore/csharp/generichost/net8/AnyOf + - samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare + - samples/client/petstore/csharp/generichost/net8/FormModels + - samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests + - samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests + - samples/client/petstore/csharp/generichost/net8/NullReferenceTypes + - samples/client/petstore/csharp/generichost/net8/OneOf + - samples/client/petstore/csharp/generichost/net8/Petstore + - samples/client/petstore/csharp/generichost/net8/SourceGeneration + - samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4.2.0 + with: + dotnet-version: '8.0.x' + - 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-dotnet9.yaml b/.github/workflows/samples-dotnet9.yaml new file mode 100644 index 000000000000..5c27aa230887 --- /dev/null +++ b/.github/workflows/samples-dotnet9.yaml @@ -0,0 +1,54 @@ +name: Samples C# .Net 9 Clients + +on: + push: + paths: + - samples/client/petstore/csharp/generichost/latest/** + - samples/client/petstore/csharp/generichost/net9/** + - samples/client/petstore/csharp/httpclient/net9/** + - samples/client/petstore/csharp/restsharp/net9/** + - samples/client/petstore/csharp/unityWebRequest/net9/** + pull_request: + paths: + - samples/client/petstore/csharp/generichost/latest/** + - samples/client/petstore/csharp/generichost/net9/** + - samples/client/petstore/csharp/httpclient/net9/** + - samples/client/petstore/csharp/restsharp/net9/** + - samples/client/petstore/csharp/unityWebRequest/net9/** +jobs: + build: + name: Build .Net projects + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + - samples/client/petstore/csharp/generichost/latest/Tags + - samples/client/petstore/csharp/generichost/net9/AllOf + - samples/client/petstore/csharp/generichost/net9/AnyOf + - samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare + - samples/client/petstore/csharp/generichost/net9/FormModels + # - samples/client/petstore/csharp/generichost/net9/ManualPetstoreTests + # - samples/client/petstore/csharp/generichost/net9/ManualSourceGenerationTests + - samples/client/petstore/csharp/generichost/net9/NullReferenceTypes + - samples/client/petstore/csharp/generichost/net9/OneOf + - samples/client/petstore/csharp/generichost/net9/Petstore + - samples/client/petstore/csharp/generichost/net9/SourceGeneration + - samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate + # restsharp + - samples/client/petstore/csharp/restsharp/net9/EnumMappings + # httpclient + - samples/client/petstore/csharp/httpclient/net9/Petstore + # unity + #- samples/client/petstore/csharp/unityWebRequest/net9/Petstore + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4.2.0 + with: + dotnet-version: '9.0.101' + - 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-java-client-jdk11.yaml b/.github/workflows/samples-java-client-jdk11.yaml index 59f52728d805..bc10898a4ee0 100644 --- a/.github/workflows/samples-java-client-jdk11.yaml +++ b/.github/workflows/samples-java-client-jdk11.yaml @@ -14,6 +14,7 @@ on: - samples/client/others/java/okhttp-gson-oneOf-array/** - samples/client/others/java/resttemplate-useAbstractionForFiles/** - samples/client/others/java/webclient-useAbstractionForFiles/** + - samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/others/java/jersey2-oneOf-duplicates/** - samples/client/others/java/jersey2-oneOf-Mixed/** - samples/client/others/java/resttemplate-list-schema-validation/** @@ -31,6 +32,7 @@ on: - samples/client/others/java/okhttp-gson-oneOf-array/** - samples/client/others/java/resttemplate-useAbstractionForFiles/** - samples/client/others/java/webclient-useAbstractionForFiles/** + - samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/others/java/jersey2-oneOf-duplicates/** - samples/client/others/java/jersey2-oneOf-Mixed/** - samples/client/others/java/resttemplate-list-schema-validation/** @@ -57,6 +59,7 @@ jobs: - samples/client/petstore/java/webclient - samples/client/petstore/java/webclient-nullable-arrays - samples/client/petstore/java/webclient-swagger2 + - samples/client/petstore/java/webclient-useSingleRequestParameter - samples/client/petstore/java/vertx - samples/client/petstore/java/jersey2-java8-localdatetime - samples/client/petstore/java/google-api-client diff --git a/.github/workflows/samples-java-client-jdk17.yaml b/.github/workflows/samples-java-client-jdk17.yaml index 00c23e6a55ca..f7a5a1fbb300 100644 --- a/.github/workflows/samples-java-client-jdk17.yaml +++ b/.github/workflows/samples-java-client-jdk17.yaml @@ -5,12 +5,14 @@ on: paths: - samples/client/petstore/java/resttemplate-jakarta/** - samples/client/petstore/java/webclient-jakarta/** - - samples/client/petstore/java/restclient-*/** + - samples/client/petstore/java/restclient-*/** + - samples/client/petstore/java/webclient-useSingleRequestParameter/** pull_request: paths: - samples/client/petstore/java/resttemplate-jakarta/** - samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/restclient-*/** + - samples/client/petstore/java/webclient-useSingleRequestParameter/** jobs: build: name: Build Java Client JDK17 @@ -26,6 +28,7 @@ jobs: - samples/client/petstore/java/restclient-nullable-arrays - samples/client/petstore/java/restclient-swagger2 - samples/client/petstore/java/restclient-useSingleRequestParameter + - samples/client/petstore/java/webclient-useSingleRequestParameter steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 diff --git a/.github/workflows/samples-kotlin-echo-api.yaml b/.github/workflows/samples-kotlin-echo-api.yaml index 0d92c30383bf..9fc5a0df4bb5 100644 --- a/.github/workflows/samples-kotlin-echo-api.yaml +++ b/.github/workflows/samples-kotlin-echo-api.yaml @@ -19,6 +19,7 @@ jobs: # clients - samples/client/echo_api/kotlin-jvm-spring-3-restclient - samples/client/echo_api/kotlin-model-prefix-type-mappings + - samples/client/echo_api/kotlin-jvm-okhttp steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 diff --git a/.github/workflows/samples-kotlin-server-jdk17.yaml b/.github/workflows/samples-kotlin-server-jdk17.yaml index b66723da4b1d..3cda9e23224a 100644 --- a/.github/workflows/samples-kotlin-server-jdk17.yaml +++ b/.github/workflows/samples-kotlin-server-jdk17.yaml @@ -41,6 +41,7 @@ jobs: - samples/server/petstore/kotlin-server/javalin - samples/server/petstore/kotlin-server/javalin-6 - samples/server/petstore/kotlin-server/ktor + - samples/server/petstore/kotlin-server/ktor2 # comment out due to gradle build failure # - samples/server/petstore/kotlin-spring-default/ steps: diff --git a/.github/workflows/samples-kotlin-server-jdk21.yaml b/.github/workflows/samples-kotlin-server-jdk21.yaml index 0de80197cb7c..cb9134a95b9d 100644 --- a/.github/workflows/samples-kotlin-server-jdk21.yaml +++ b/.github/workflows/samples-kotlin-server-jdk21.yaml @@ -23,6 +23,7 @@ jobs: sample: - samples/server/petstore/kotlin-server/javalin-6 - samples/server/petstore/kotlin-server/ktor + - samples/server/petstore/kotlin-server/ktor2 - samples/server/petstore/kotlin-server-required-and-nullable-properties steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/samples-kotlin-server.yaml b/.github/workflows/samples-kotlin-server.yaml index f46719f46b4f..07af163a810e 100644 --- a/.github/workflows/samples-kotlin-server.yaml +++ b/.github/workflows/samples-kotlin-server.yaml @@ -34,10 +34,12 @@ jobs: - samples/server/petstore/kotlin-springboot-delegate - samples/server/petstore/kotlin-springboot-modelMutable - samples/server/petstore/kotlin-springboot-reactive + - samples/server/petstore/kotlin-springboot-reactive-without-flow - samples/server/petstore/kotlin-springboot-source-swagger1 - samples/server/petstore/kotlin-springboot-source-swagger2 - samples/server/petstore/kotlin-springboot-springfox - samples/server/petstore/kotlin-server/ktor + - samples/server/petstore/kotlin-server/ktor2 - samples/server/petstore/kotlin-server/jaxrs-spec - samples/server/petstore/kotlin-server/jaxrs-spec-mutiny - samples/server/petstore/kotlin-server-modelMutable diff --git a/.github/workflows/samples-scala.yaml b/.github/workflows/samples-scala.yaml index 5b937b0a42bb..5c2cb8bc04fe 100644 --- a/.github/workflows/samples-scala.yaml +++ b/.github/workflows/samples-scala.yaml @@ -40,6 +40,8 @@ jobs: with: distribution: 'temurin' java-version: 8 + - name: Setup sbt launcher + uses: sbt/setup-sbt@v1 - name: Cache maven dependencies uses: actions/cache@v4 env: diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index b65448e8f1b9..5824c4cd90f8 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -39,7 +39,7 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- - name: Setup Maven - uses: s4u/setup-maven-action@v1.17.0 + uses: s4u/setup-maven-action@v1.18.0 with: java-version: ${{ matrix.java }} maven-version: 3.8.8 diff --git a/.gitignore b/.gitignore index 0b5b93e04a38..a2e29abe05bc 100644 --- a/.gitignore +++ b/.gitignore @@ -220,6 +220,7 @@ samples/client/petstore/kotlin*/src/main/kotlin/test/ samples/client/petstore/kotlin*/build/ samples/server/others/kotlin-server/jaxrs-spec/build/ samples/client/echo_api/kotlin-jvm-spring-3-restclient/build/ +samples/client/echo_api/kotlin-jvm-okhttp/build/ # haskell .stack-work diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 9d54203ba031..0d02dce87a7c 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -15,12 +15,22 @@ if [ "$NODE_INDEX" = "1" ]; then sudo apt-get -y install cpanminus + # install rust + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source "$HOME/.cargo/env" + + echo "Testing perl" (cd samples/client/petstore/perl && /bin/bash ./test.bash) + + echo "Testing ruby" (cd samples/client/petstore/ruby && mvn integration-test) (cd samples/client/petstore/ruby-faraday && mvn integration-test) (cd samples/client/petstore/ruby-httpx && mvn integration-test) (cd samples/client/petstore/ruby-autoload && mvn integration-test) + echo "Testing rust" + (cd samples/server/petstore/rust-axum && mvn integration-test) + elif [ "$NODE_INDEX" = "2" ]; then echo "Running node $NODE_INDEX to test Go" # install haskell @@ -121,6 +131,7 @@ else (cd samples/client/others/java/okhttp-gson-streaming && mvn integration-test) (cd samples/client/petstore/java/okhttp-gson && mvn integration-test) (cd samples/client/petstore/java/okhttp-gson-3.1 && mvn integration-test) + (cd samples/client/petstore/java/okhttp-gson-dynamicOperations && mvn integration-test) (cd samples/client/petstore/java/resteasy && mvn integration-test) (cd samples/client/petstore/java-micronaut-client && mvn integration-test) (cd samples/client/petstore/java/apache-httpclient && mvn integration-test) diff --git a/README.md b/README.md index 08d16048effc..bbaca59a3e25 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [](./LICENSE) [](https://opencollective.com/openapi_generator) -[](https://join.slack.com/t/openapi-generator/shared_invite/zt-2uoef5v0g-XGwo8~2oJ3EoziDSO1CmdQ) +[](https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA) [](https://twitter.com/oas_generator) [](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator) [](https://conan.io/center/recipes/openapi-generator) @@ -15,7 +15,7 @@
](https://konghq.com/products/kong-konnect?utm_medium=referral&utm_source=github&utm_campaign=platform&utm_content=openapi-generator)
[
](https://route4me.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[
](https://www.dotcom-monitor.com/sponsoring-open-source-projects/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
+[
](https://www.clickittech.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
@@ -106,6 +107,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
- [1.5 - Homebrew](#15---homebrew)
- [1.6 - Docker](#16---docker)
- [1.7 - NPM](#17---npm)
+ - [1.8 - pip](#18---pip)
- [2 - Getting Started](#2---getting-started)
- [3 - Usage](#3---usage)
- [3.1 - Customization](#31---customization)
@@ -129,8 +131,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
-| 7.11.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.11.0-SNAPSHOT/) | 20.12.2024 | Minor release with breaking changes (with fallback) |
-| [7.10.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.10.0) (latest stable release) | 18.11.2024 | Minor release with breaking changes (with fallback) |
+| 7.12.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.12.0-SNAPSHOT/) | 17.02.2024 | Minor release with breaking changes (with fallback) |
+| [7.11.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.11.0) (latest stable release) | 20.01.2024 | Minor release with breaking changes (with fallback) |
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
@@ -141,7 +143,7 @@ OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0, 3.1 (beta support)
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.
+For decommissioned 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)
@@ -193,16 +195,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 11 runtime at a minimum):
-JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.10.0/openapi-generator-cli-7.10.0.jar`
+JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.0.jar`
For **Mac/Linux** users:
```sh
-wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.10.0/openapi-generator-cli-7.10.0.jar -O openapi-generator-cli.jar
+wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.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/7.10.0/openapi-generator-cli-7.10.0.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -437,7 +439,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
-openapi-generator-cli version-manager set 7.10.0
+openapi-generator-cli version-manager set 7.11.0
```
Or install it as dev-dependency:
@@ -449,6 +451,29 @@ npm install @openapitools/openapi-generator-cli -D
You can use [locally built JARs](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-locally-built-jar) or [`SNAPSHOT` versions](https://github.com/OpenAPITools/openapi-generator-cli?tab=readme-ov-file#use-nightly-snapshot-build) as well.
+### [1.8 - pip](#table-of-contents)
+
+
+> **Platform(s)**: Linux, macOS, Windows
+**Install** via [PyPI](https://pypi.org/) (`java` executable is needed to run):
+
+```
+pip install openapi-generator-cli
+```
+
+To install a specific version
+```
+pip install openapi-generator-cli==7.11.0
+```
+
+You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
+
+```
+pip install openapi-generator-cli[jdk4py]
+```
+
+Ref: https://github.com/openAPITools/openapi-generator-pip
+
## [2 - Getting Started](#table-of-contents)
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml), please run the following
@@ -464,7 +489,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/7.10.0/openapi-generator-cli-7.10.0.jar)
+You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.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`
@@ -944,6 +969,10 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2024-03-04 - [Generating TypeScript Types with OpenAPI for REST API Consumption](https://www.pullrequest.com/blog/generating-typescript-types-with-openapi-for-rest-api-consumption/) by [PullRequest](https://www.pullrequest.com/)
- 2024-03-07 - [Fully typed Web Apps with OpenAPI (Part 1)](https://medium.com/@gfox1984/fully-typed-web-apps-with-openapi-part-1-595d55766670) by [Guillaume Renard](https://medium.com/@gfox1984)
- 2024-03-08 - [Laravel OpenAPIによる "辛くない" スキーマ駆動開発](https://fortee.jp/phperkaigi-2024/proposal/9e2e6c38-d078-4efa-99b4-83ebf9033b34) by [KentarouTakeda](https://twitter.com/KentarouTakeda)
+- 2024-04-04 - [Working with OpenAPI using Rust](https://www.shuttle.dev/blog/2024/04/04/using-openapi-rust) by [Joshua Mo](https://twitter.com/joshmo_dev)
+- 2024-04-08 - [Implement API first strategy with OpenAPI generator plugin](https://medium.com/javarevisited/implement-api-first-strategy-with-openapi-generator-plugin-e4bbe7f0d778) by [Rui Zhou](https://medium.com/@wirelesser)
+- 2024-05-06 - [OpenAPI Generator Custom Templates](https://www.javacodegeeks.com/openapi-generator-custom-templates.html) by [Mary Zheng](https://www.javacodegeeks.com/author/mary-zheng)
+
## [6 - About Us](#table-of-contents)
@@ -1182,7 +1211,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| 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 | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) @eafer (2024/12) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
| C# | @mandrean (2017/08) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) @iBicha (2023/07) |
| Clojure | |
diff --git a/appveyor.yml b/appveyor.yml
index ae17c012c1fc..29fcd12cd8df 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -43,6 +43,18 @@ build_script:
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln
test_script:
+ - dotnet test samples\client\petstore\csharp\generichost\net9\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ # - dotnet test samples\client\petstore\csharp\generichost\net9\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
+ # - dotnet test samples\client\petstore\csharp\generichost\net9\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\generichost\net9\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+
- dotnet test samples\client\petstore\csharp\generichost\net8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
@@ -78,10 +90,10 @@ test_script:
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\MultipleFrameworks\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\restsharp\net6\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\restsharp\net7\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\restsharp\net7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\restsharp\net7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\restsharp\net8\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\restsharp\net8\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\restsharp\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
+ - dotnet test samples\client\petstore\csharp\restsharp\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
diff --git a/bin/configs/aspnetcore-8.0-use-centralized-package-version-management.yaml b/bin/configs/aspnetcore-8.0-use-centralized-package-version-management.yaml
new file mode 100644
index 000000000000..3b5cb95879ec
--- /dev/null
+++ b/bin/configs/aspnetcore-8.0-use-centralized-package-version-management.yaml
@@ -0,0 +1,9 @@
+generatorName: aspnetcore
+outputDir: samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
+inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
+additionalProperties:
+ packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
+ aspnetCoreVersion: "8.0"
+ userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
+ centralizedPackageVersionManagement: "enable"
diff --git a/bin/configs/csharp-generichost-net9-allOf.yaml b/bin/configs/csharp-generichost-net9-allOf.yaml
new file mode 100644
index 000000000000..9a527a5b9fb9
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-allOf.yaml
@@ -0,0 +1,15 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/AllOf
+inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ nullableReferenceTypes: true
+ equatable: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-generichost-net9-anyOf.yaml b/bin/configs/csharp-generichost-net9-anyOf.yaml
new file mode 100644
index 000000000000..8a9f57a28724
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-anyOf.yaml
@@ -0,0 +1,15 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/AnyOf
+inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ nullableReferenceTypes: true
+ equatable: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-generichost-net9-anyOfNoCompare.yaml b/bin/configs/csharp-generichost-net9-anyOfNoCompare.yaml
new file mode 100644
index 000000000000..34ff5d48ee4a
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-anyOfNoCompare.yaml
@@ -0,0 +1,15 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare
+inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: false
+ disallowAdditionalPropertiesIfNotPresent: false
+ nullableReferenceTypes: true
+ equatable: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-generichost-net9-formModels.yaml b/bin/configs/csharp-generichost-net9-formModels.yaml
new file mode 100644
index 000000000000..5533854a06aa
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-formModels.yaml
@@ -0,0 +1,18 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/FormModels
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ nullableReferenceTypes: false
+ equatable: true
+ targetFramework: net9.0
+ skipFormModel: false
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
+inlineSchemaOptions:
+ RESOLVE_INLINE_ENUMS: true
diff --git a/bin/configs/csharp-generichost-net9-nrt-useSourceGeneration.yaml b/bin/configs/csharp-generichost-net9-nrt-useSourceGeneration.yaml
new file mode 100644
index 000000000000..0bbff72763a0
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-nrt-useSourceGeneration.yaml
@@ -0,0 +1,15 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/SourceGeneration
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useSourceGeneration: true
+ equatable: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-generichost-net9-nrt.yaml b/bin/configs/csharp-generichost-net9-nrt.yaml
new file mode 100644
index 000000000000..cf03312ee4c5
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-nrt.yaml
@@ -0,0 +1,15 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/NullReferenceTypes
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ nullableReferenceTypes: true
+ equatable: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-generichost-net9-oneOf.yaml b/bin/configs/csharp-generichost-net9-oneOf.yaml
new file mode 100644
index 000000000000..af07b34b5c3c
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-oneOf.yaml
@@ -0,0 +1,15 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/OneOf
+inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ nullableReferenceTypes: true
+ equatable: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-generichost-net9-useDateTimeForDate.yaml b/bin/configs/csharp-generichost-net9-useDateTimeForDate.yaml
new file mode 100644
index 000000000000..a5ed3faf5330
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9-useDateTimeForDate.yaml
@@ -0,0 +1,12 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
+ useDateTimeForDate: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-generichost-net9.yaml b/bin/configs/csharp-generichost-net9.yaml
new file mode 100644
index 000000000000..3bcf2a5d5e0d
--- /dev/null
+++ b/bin/configs/csharp-generichost-net9.yaml
@@ -0,0 +1,15 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/generichost/net9/Petstore
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ nullableReferenceTypes: false
+ equatable: true
+ targetFramework: net9.0
+ modelPropertySorting: alphabetical
+ operationParameterSorting: alphabetical
diff --git a/bin/configs/csharp-httpclient-net9.yaml b/bin/configs/csharp-httpclient-net9.yaml
new file mode 100644
index 000000000000..b1ce09e64d1f
--- /dev/null
+++ b/bin/configs/csharp-httpclient-net9.yaml
@@ -0,0 +1,13 @@
+# for .net standard httpclient
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/httpclient/net9/Petstore
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+library: httpclient
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useOneOfDiscriminatorLookup: true
+ targetFramework: net9.0
+ equatable: true
diff --git a/bin/configs/csharp-restsharp-echo-api.yaml b/bin/configs/csharp-restsharp-echo-api.yaml
deleted file mode 100644
index 4d93a0d3562d..000000000000
--- a/bin/configs/csharp-restsharp-echo-api.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-generatorName: csharp
-outputDir: samples/client/echo_api/csharp-restsharp
-inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-additionalProperties:
- packageGuid: '{322C8CAF-0156-40C1-AE42-D59761FB9B6C}'
- targetFramework: net6.0
- setCompareNetObjects: "true"
- hideGenerationTimestamp: "true"
- equatable: true
diff --git a/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml b/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml
deleted file mode 100644
index c2941292d22f..000000000000
--- a/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-generatorName: csharp
-outputDir: samples/client/petstore/csharp/restsharp/net6/ParameterMappings
-inputSpec: modules/openapi-generator/src/test/resources/3_0/name-parameter-mappings.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-nameMappings:
- _type: UnderscoreType
- type_: TypeWithUnderscore
- http_debug_operation: HttpDebugOperation
-parameterNameMappings:
- _type: UnderscoreType
- type_: TypeWithUnderscore
- http_debug_operation: HttpDebugOperation
-modelNameMappings:
- Environment: Env
-additionalProperties:
- packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
- hideGenerationTimestamp: "true"
- targetFramework: net6.0
- equatable: true
diff --git a/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml b/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml
deleted file mode 100644
index c50ee0e0eb8d..000000000000
--- a/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-generatorName: csharp
-outputDir: samples/client/petstore/csharp/restsharp/net7/Petstore
-inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-additionalProperties:
- packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
- targetFramework: net7.0
- useCompareNetObjects: "true"
- equatable: true
diff --git a/bin/configs/csharp-restsharp-net7.0-useDateTimeForDate.yaml b/bin/configs/csharp-restsharp-net7.0-useDateTimeForDate.yaml
deleted file mode 100644
index d385a2431dc1..000000000000
--- a/bin/configs/csharp-restsharp-net7.0-useDateTimeForDate.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-# for .net standard
-generatorName: csharp
-outputDir: samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate
-inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-additionalProperties:
- packageGuid: '{D0A67E81-4061-48EB-B4B8-C73BDF8B2D95}'
- targetFramework: net7.0
- useDateTimeForDate: true
diff --git a/bin/configs/csharp-restsharp-net7.0.yaml b/bin/configs/csharp-restsharp-net7.0.yaml
deleted file mode 100644
index 061827eb7f3b..000000000000
--- a/bin/configs/csharp-restsharp-net7.0.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-# for .net standard
-generatorName: csharp
-outputDir: samples/client/petstore/csharp/restsharp/net7/EnumMappings
-inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-additionalProperties:
- packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
- useCompareNetObjects: true
- disallowAdditionalPropertiesIfNotPresent: false
- useOneOfDiscriminatorLookup: true
- targetFramework: net7.0
- equatable: true
-enumNameMappings:
- delivered: Shipped
diff --git a/bin/configs/csharp-restsharp-net8-compareNetObjects.yaml b/bin/configs/csharp-restsharp-net8-compareNetObjects.yaml
new file mode 100644
index 000000000000..306bf6856496
--- /dev/null
+++ b/bin/configs/csharp-restsharp-net8-compareNetObjects.yaml
@@ -0,0 +1,9 @@
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/restsharp/net8/Petstore
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ targetFramework: net8.0
+ useCompareNetObjects: "true"
+ equatable: true
diff --git a/bin/configs/csharp-restsharp-net8-echo-api.yaml b/bin/configs/csharp-restsharp-net8-echo-api.yaml
new file mode 100644
index 000000000000..7f24b0c5f533
--- /dev/null
+++ b/bin/configs/csharp-restsharp-net8-echo-api.yaml
@@ -0,0 +1,10 @@
+generatorName: csharp
+outputDir: samples/client/echo_api/csharp/restsharp/net8/EchoApi
+inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{322C8CAF-0156-40C1-AE42-D59761FB9B6C}'
+ targetFramework: net8.0
+ setCompareNetObjects: "true"
+ hideGenerationTimestamp: "true"
+ equatable: true
diff --git a/bin/configs/csharp-restsharp-net8-name-mappings.yaml b/bin/configs/csharp-restsharp-net8-name-mappings.yaml
new file mode 100644
index 000000000000..a46dc8620434
--- /dev/null
+++ b/bin/configs/csharp-restsharp-net8-name-mappings.yaml
@@ -0,0 +1,19 @@
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/restsharp/net8/ParameterMappings
+inputSpec: modules/openapi-generator/src/test/resources/3_0/name-parameter-mappings.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+nameMappings:
+ _type: UnderscoreType
+ type_: TypeWithUnderscore
+ http_debug_operation: HttpDebugOperation
+parameterNameMappings:
+ _type: UnderscoreType
+ type_: TypeWithUnderscore
+ http_debug_operation: HttpDebugOperation
+modelNameMappings:
+ Environment: Env
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ hideGenerationTimestamp: "true"
+ targetFramework: net8.0
+ equatable: true
diff --git a/bin/configs/csharp-restsharp-net8-useDateTimeForDate.yaml b/bin/configs/csharp-restsharp-net8-useDateTimeForDate.yaml
new file mode 100644
index 000000000000..f8b2102196ab
--- /dev/null
+++ b/bin/configs/csharp-restsharp-net8-useDateTimeForDate.yaml
@@ -0,0 +1,9 @@
+# for .net standard
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{D0A67E81-4061-48EB-B4B8-C73BDF8B2D95}'
+ targetFramework: net8.0
+ useDateTimeForDate: true
diff --git a/bin/configs/csharp-restsharp-net8.yaml b/bin/configs/csharp-restsharp-net8.yaml
new file mode 100644
index 000000000000..a99fb1acf095
--- /dev/null
+++ b/bin/configs/csharp-restsharp-net8.yaml
@@ -0,0 +1,14 @@
+# for .net standard
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/restsharp/net8/EnumMappings
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useOneOfDiscriminatorLookup: true
+ targetFramework: net8.0
+ equatable: true
+enumNameMappings:
+ delivered: Shipped
diff --git a/bin/configs/csharp-restsharp-net9.yaml b/bin/configs/csharp-restsharp-net9.yaml
new file mode 100644
index 000000000000..568c9462b8d7
--- /dev/null
+++ b/bin/configs/csharp-restsharp-net9.yaml
@@ -0,0 +1,14 @@
+# for .net standard
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/restsharp/net9/EnumMappings
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useOneOfDiscriminatorLookup: true
+ targetFramework: net9.0
+ equatable: true
+enumNameMappings:
+ delivered: Shipped
diff --git a/bin/configs/csharp-unityWebRequest-net9.yaml b/bin/configs/csharp-unityWebRequest-net9.yaml
new file mode 100644
index 000000000000..b5e84fae8528
--- /dev/null
+++ b/bin/configs/csharp-unityWebRequest-net9.yaml
@@ -0,0 +1,9 @@
+# for .net Unity
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/unityWebRequest/net9/Petstore
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+library: unityWebRequest
+additionalProperties:
+ targetFramework: net9.0
+ equatable: true
diff --git a/bin/configs/go-oneof-discriminator-lookup.yaml b/bin/configs/go-oneof-discriminator-lookup.yaml
new file mode 100644
index 000000000000..b6b9e7ad28ef
--- /dev/null
+++ b/bin/configs/go-oneof-discriminator-lookup.yaml
@@ -0,0 +1,6 @@
+generatorName: go
+outputDir: samples/client/others/go/oneof-discriminator-lookup
+inputSpec: modules/openapi-generator/src/test/resources/3_0/go/spec-with-oneof-discriminator.yaml
+additionalProperties:
+ useOneOfDiscriminatorLookup: "true"
+ hideGenerationTimestamp: "true"
diff --git a/bin/configs/java-okhttp-gson.yaml b/bin/configs/java-okhttp-gson.yaml
index 8f5c07cae49c..a5c109e1a38d 100644
--- a/bin/configs/java-okhttp-gson.yaml
+++ b/bin/configs/java-okhttp-gson.yaml
@@ -15,6 +15,7 @@ additionalProperties:
useOneOfDiscriminatorLookup: true
disallowAdditionalPropertiesIfNotPresent: false
useReflectionEqualsHashCode:: true
+ removeEnumValuePrefix: true
enumNameMappings:
s: LOWER_CASE_S
S: UPPER_CASE_S
diff --git a/bin/configs/java-webclient-useSingleRequestParameter.yaml b/bin/configs/java-webclient-useSingleRequestParameter.yaml
new file mode 100644
index 000000000000..d0e3662823f9
--- /dev/null
+++ b/bin/configs/java-webclient-useSingleRequestParameter.yaml
@@ -0,0 +1,9 @@
+generatorName: java
+outputDir: samples/client/petstore/java/webclient-useSingleRequestParameter
+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: singleparam-webclient
+ hideGenerationTimestamp: "true"
+ useSingleRequestParameter: true
diff --git a/bin/configs/javascript-es6.yaml b/bin/configs/javascript-es6.yaml
index bc9562f93e76..a88a20d55af3 100644
--- a/bin/configs/javascript-es6.yaml
+++ b/bin/configs/javascript-es6.yaml
@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/javascript/petstore-
templateDir: modules/openapi-generator/src/main/resources/Javascript
additionalProperties:
appName: PetstoreClient
+ skipDefaultUserAgent: true
modelNameMappings:
HealthCheckResult: HealthCheckStatus
parameterNameMappings:
diff --git a/bin/configs/kotlin-jvm-okhttp-echo-api.yaml b/bin/configs/kotlin-jvm-okhttp-echo-api.yaml
new file mode 100644
index 000000000000..d28f767c6a40
--- /dev/null
+++ b/bin/configs/kotlin-jvm-okhttp-echo-api.yaml
@@ -0,0 +1,8 @@
+generatorName: kotlin
+outputDir: samples/client/echo_api/kotlin-jvm-okhttp
+inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/echo_api.yaml
+templateDir: modules/openapi-generator/src/main/resources/kotlin-client
+modelNamePrefix: Api
+additionalProperties:
+ library: jvm-okhttp4
+ artifactId: kotlin-jvm-okhttp-echo-api
\ No newline at end of file
diff --git a/bin/configs/kotlin-jvm-okhttp-non-ascii-headers.yaml b/bin/configs/kotlin-jvm-okhttp-non-ascii-headers.yaml
new file mode 100644
index 000000000000..3b355751624c
--- /dev/null
+++ b/bin/configs/kotlin-jvm-okhttp-non-ascii-headers.yaml
@@ -0,0 +1,8 @@
+generatorName: kotlin
+outputDir: samples/client/others/kotlin-jvm-okhttp-non-ascii-headers
+library: jvm-okhttp4
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/kotlin-client
+additionalProperties:
+ useNonAsciiHeaders: true
+ artifactId: kotlin-petstore-jvm-okhttp-non-ascii-headers
diff --git a/bin/configs/kotlin-server-ktor2.yaml b/bin/configs/kotlin-server-ktor2.yaml
new file mode 100644
index 000000000000..240bb5bc6d9a
--- /dev/null
+++ b/bin/configs/kotlin-server-ktor2.yaml
@@ -0,0 +1,8 @@
+generatorName: kotlin-server
+outputDir: samples/server/petstore/kotlin-server/ktor2
+library: ktor2
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/kotlin-server
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ serializableModel: "true"
diff --git a/bin/configs/kotlin-spring-boot-reactive-without-flow.yaml b/bin/configs/kotlin-spring-boot-reactive-without-flow.yaml
new file mode 100644
index 000000000000..e2988c675d18
--- /dev/null
+++ b/bin/configs/kotlin-spring-boot-reactive-without-flow.yaml
@@ -0,0 +1,13 @@
+generatorName: kotlin-spring
+outputDir: samples/server/petstore/kotlin-springboot-reactive-without-flow
+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: springdoc
+ annotationLibrary: swagger2
+ useSwaggerUI: "true"
+ serviceImplementation: "true"
+ reactive: "true"
+ beanValidations: "true"
+ useFlowForArrayReturnType: "false"
diff --git a/bin/configs/kotlin-spring-boot-reactive.yaml b/bin/configs/kotlin-spring-boot-reactive.yaml
index f9a3f1996792..cff5b79adc79 100644
--- a/bin/configs/kotlin-spring-boot-reactive.yaml
+++ b/bin/configs/kotlin-spring-boot-reactive.yaml
@@ -1,7 +1,7 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-reactive
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: springdoc
@@ -10,3 +10,5 @@ additionalProperties:
serviceImplementation: "true"
reactive: "true"
beanValidations: "true"
+ # the following option is set to true by default
+ #useFlowForArrayReturnType: "true"
diff --git a/bin/configs/manual/rust-axum-oneof-v3.yaml b/bin/configs/manual/rust-axum-oneof-v3.yaml
new file mode 100644
index 000000000000..4d1bb07c1d71
--- /dev/null
+++ b/bin/configs/manual/rust-axum-oneof-v3.yaml
@@ -0,0 +1,11 @@
+generatorName: rust-axum
+outputDir: samples/server/petstore/rust-axum/output/rust-axum-oneof
+inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-axum/rust-axum-oneof.yaml
+templateDir: modules/openapi-generator/src/main/resources/rust-axum
+generateAliasAsModel: true
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ packageName: rust-axum-oneof
+globalProperties:
+ skipFormModel: "false"
+enablePostProcessFile: true
diff --git a/bin/utils/test_file_list.yaml b/bin/utils/test_file_list.yaml
index bdb057850e46..735f2821f9b4 100644
--- a/bin/utils/test_file_list.yaml
+++ b/bin/utils/test_file_list.yaml
@@ -6,7 +6,7 @@
sha256: b98a6043573332de4f049db50b36bce7b5fada8511769da97f6561066a0f8c5c
- filename: "samples/client/petstore/csharp/restsharp/standard2.0/Petstore/src/Org.OpenAPITools.Test/linux-logo.png"
sha256: 0a67c32728197e942b13bdda064b73793f12f5c795f1e5cf35a3adf69c973230
-# java okhttp gson test files
+# java test files
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java"
sha256: 325fdd5d7e2c97790c0fb44f712ab7b2ba022d7e1a5b0056f47b07f342682b6d
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java"
@@ -15,3 +15,42 @@
sha256: 8b1b8f2a2ad00ccb090873a94a5f73e328b98317d2ec715f53bd7a1accb2a023
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java"
sha256: a1f8a70bf7b0c382a8def5bacf7b1fb189e687fabb40235aa799001e0597f545
+- filename: "samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/AuthApiTest.java"
+ sha256: 26f2dd90f9075e51add1cd7e88869a1e9345d9dbacf01199c1bf8a49395a8648
+- filename: "samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/AuthApiTest.java"
+ sha256: b45d2ff04ad65e39a4d67a86a37d1a406e125df392f51ef0484d6c8da8b10454
+- filename: "samples/client/echo_api/java/okhttp-gson/src/test/java/org/openapitools/client/api/AuthApiTest.java"
+ sha256: 761d101afddb8920f640c91741b5e7af56ebd753c80d537e0aaa4e1021887666
+- filename: "samples/client/echo_api/java/resteasy/src/test/java/org/openapitools/client/api/BodyApiTest.java"
+ sha256: 04715cabbe9bd27ff98dd56e3db489ebc9ffbf98d9af104a6707b0a40ab4f8fe
+- filename: "samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/AuthApiTest.java"
+ sha256: 38193bbad7f3eef087bc1474352e484178b14a2b8c0e0ba0cd4e4960516a14f9
+- filename: "samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java"
+ sha256: 24c6a39a9d7327d397dc038c368a19c84f14ed96a69fe28d53719b3eaf0a725c
+- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/PetApiTest.java"
+ sha256: 5e9f471d34310f94895751bb96cc79583376f043593c3a387c82077c70f8102f
+- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MammalTest.java"
+ sha256: 67a9e63e13ebddac21cb236aa015edce30f5d3bd8d6adcf50044cad00d48c45e
+- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ZebraTest.java"
+ sha256: 15eeb6d8a9a79d0f1930b861540d9c5780d6c49ea4fdb68269ac3e7ec481e142
+- filename: "samples/client/petstore/java/okhttp-gson-3.1/src/test/java/org/openapitools/client/api/PetApiTest.java"
+ sha256: d8f7fff724f81e666daf115cc25f8347e1fda4e861aa30df0dae3fa50c91404c
+- filename: "samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/PetApiTest.java"
+ sha256: 0cc079be64fe261b46f89976be2cbfad4fe5173dbe0d4b45303570299b0b5ecc
+- filename: "samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java"
+ sha256: 3c41eb12d126f90392d97e3250b53ea9dce1663fb714a19339445b9da734d634
+- filename: "samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/PetApiTest.java"
+ sha256: 68ed9228c99ecf2ff3842074242d3be7565da3b702b7f46008a5e119ef15c167
+- filename: "samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java"
+ sha256: f0a82dd21d10f199bc403241fc9c7f4a8fa5e2d1646fd06f7941c2e528a1da45
+- filename: "samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java"
+ sha256: 5e9f471d34310f94895751bb96cc79583376f043593c3a387c82077c70f8102f
+- filename: "samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MammalTest.java"
+ sha256: 67a9e63e13ebddac21cb236aa015edce30f5d3bd8d6adcf50044cad00d48c45e
+- filename: "samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java"
+ sha256: 15eeb6d8a9a79d0f1930b861540d9c5780d6c49ea4fdb68269ac3e7ec481e142
+# rust axum test files
+- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
+ sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
+- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
+ sha256: e72fbf81a9849dc7abb7e2169f2fc355c8b1cf991c0e2ffc083126abd9e966e7
diff --git a/docs/3.0.0-release-note.md b/docs/3.0.0-release-note.md
index b2127975817e..e61130b9fde7 100644
--- a/docs/3.0.0-release-note.md
+++ b/docs/3.0.0-release-note.md
@@ -10,7 +10,7 @@ sidebar_label: "Release Notes: 3.0.0"
* e58dc2c77 Fix COPY in Dockerfile (#64)
* 9d7feaaeb Fix online generator (docker push) (#58)
* 9247cd01e Changes for Docker
-* 64037ee59 update docker-related files to ues jdk8
+* 64037ee59 update docker-related files to use jdk8
* ## Plug-ins
* b6b8c0db8 \[gradle-plugin] Initial implementation (#162)
diff --git a/docs/customization.md b/docs/customization.md
index f0026728d1c1..89b6a4e4bd51 100644
--- a/docs/customization.md
+++ b/docs/customization.md
@@ -266,7 +266,7 @@ Upon first code generation, you may also pass the CLI option `--ignore-file-over
Editor support for `.openapi-generator-ignore` files is available in IntelliJ via the [.ignore plugin](https://plugins.jetbrains.com/plugin/7495--ignore).
-One may want to pre-populate `.openapi-generator-ignore` with a list of entries during the code generation process and the global/general option `openapiGeneatorIgnoreList` (e.g. --openapi-generator-ignore-list in CLI) can do exactly that. For example,
+One may want to pre-populate `.openapi-generator-ignore` with a list of entries during the code generation process and the global/general option `openapiGeneratorIgnoreList` (e.g. --openapi-generator-ignore-list in CLI) can do exactly that. For example,
```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g spring -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/spring --additional-properties useTags=true --openapi-generator-ignore-list "README.md,pom.xml,docs/*.md,src/main/java/org/openapitools/model/*"
```
@@ -434,9 +434,9 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
```
will rename SOLD to UNAVAILABLE instead.
-Not all generators support thess features yet. Please give it a try to confirm the behaviour and open an issue (ticket) to let us know which generators you would like to have this feature enabled and we'll prioritize accordingly. We also welcome PRs to add these features to generators. Related PRs for reference: #16209, #16234 (modelNameMappings), #16194, #16206 (nameMappings, parameterNameMappings), #17108 (enumNameMappings).
+Not all generators support these features yet. Please give it a try to confirm the behaviour and open an issue (ticket) to let us know which generators you would like to have this feature enabled and we'll prioritize accordingly. We also welcome PRs to add these features to generators. Related PRs for reference: #16209, #16234 (modelNameMappings), #16194, #16206 (nameMappings, parameterNameMappings), #17108 (enumNameMappings).
-NOTE: some generators use `baseName` (original name obtained direclty from OpenAPI spec, e.g. `shipping-date`) mustache tag in the templates so the mapping feature won't work.
+NOTE: some generators use `baseName` (original name obtained directly from OpenAPI spec, e.g. `shipping-date`) mustache tag in the templates so the mapping feature won't work.
To map `operationId` (used in method naming) to something else, use `operationIdNameMappings` option, e.g.
@@ -480,7 +480,7 @@ 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. For exmaple, run the following,
+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 example, 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
@@ -503,7 +503,7 @@ Another useful option is `inlineSchemaOptions`, which allows you to customize ho
- `ARRAY_ITEM_SUFFIX` sets the array item suffix
- `MAP_ITEM_SUFFIX` set the map item suffix
- `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas during refactoring
-- `REFACTOR_ALLOF_INLINE_SCHEMAS=true` will restore the 6.x (or below) behaviour to refactor allOf inline schemas into $ref. (v7.0.0 will skip the refactoring of these allOf inline schmeas by default)
+- `REFACTOR_ALLOF_INLINE_SCHEMAS=true` will restore the 6.x (or below) behaviour to refactor allOf inline schemas into $ref. (v7.0.0 will skip the refactoring of these allOf inline schemas by default)
- `RESOLVE_INLINE_ENUMS=true` will refactor inline enum definitions into $ref
## OpenAPI Normalizer
@@ -524,7 +524,7 @@ 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)](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/removeAnyOfOneOfAndKeepPropertiesOnly_test.yaml)
+- `REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY`: when set to `true`, oneOf/anyOf schema with only required properties only in a schema with properties will be removed. [(example)](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/removeAnyOfOneOfAndKeepPropertiesOnly_test.yaml)
Example:
```
diff --git a/docs/faq.md b/docs/faq.md
index 9b416e374d56..99ca22c51e74 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -5,7 +5,9 @@ title: "FAQ: General"
## Do you have a chat room?
-[](https://join.slack.com/t/openapi-generator/shared_invite/zt-2uoef5v0g-XGwo8~2oJ3EoziDSO1CmdQ)
+Yes, we use Slack.
+
+[](https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA)
## What is the governance structure of the OpenAPI Generator project?
diff --git a/docs/generators/README.md b/docs/generators/README.md
index 3b624bd8b8f6..c9c48556912b 100644
--- a/docs/generators/README.md
+++ b/docs/generators/README.md
@@ -40,7 +40,7 @@ The following generators are available:
* [php-dt](php-dt.md)
* [powershell](powershell.md)
* [python](python.md)
-* [python-legacy](python-legacy.md)
+* [python-pydantic-v1](python-pydantic-v1.md)
* [r](r.md)
* [ruby](ruby.md)
* [rust](rust.md)
@@ -100,6 +100,7 @@ The following generators are available:
* [php-symfony](php-symfony.md)
* [python-aiohttp](python-aiohttp.md)
* [python-blueplanet](python-blueplanet.md)
+* [python-fastapi](python-fastapi.md)
* [python-flask](python-flask.md)
* [ruby-on-rails](ruby-on-rails.md)
* [ruby-sinatra](ruby-sinatra.md)
diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md
index 9a028ed2977f..5d0ca08085dc 100644
--- a/docs/generators/aspnetcore.md
+++ b/docs/generators/aspnetcore.md
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|aspnetCoreVersion|ASP.NET Core version: 6.0, 5.0, 3.1, 3.0, 2.2, 2.1, 2.0 (deprecated)|+ * If the model's discriminator is defined, this method identifies the discriminator properties among the model's + * variables and assigns the default value to reflect the corresponding enum value for the model type. + *
+ *+ * Example: If the discriminator is for type `Animal`, and the model is `Cat`, the default value + * will be set to `Animal.Cat` for the properties that have the same name as the discriminator. + *
+ * + * @param model the {@link CodegenModel} whose discriminator property default value is to be set + */ + protected static void setEnumDiscriminatorDefaultValue(CodegenModel model) { + if (model.discriminator == null) { + return; + } + String discPropName = model.discriminator.getPropertyBaseName(); + Stream.of(model.requiredVars, model.vars, model.allVars, model.readWriteVars) + .flatMap(List::stream) + .filter(v -> discPropName.equals(v.baseName)) + .forEach(v -> v.defaultValue = getEnumValueForProperty(model.schemaName, model.discriminator, v)); + } + + /** + * Retrieves the appropriate default value for an enum discriminator property based on the model name. + *+ * If the discriminator has a mapping defined, it attempts to find a mapping for the model name. + * Otherwise, it defaults to one of the allowable enum value associated with the property. + * If no suitable value is found, the original default value of the property is returned. + *
+ * + * @param modelName the name of the model to determine the default value for + * @param discriminator the {@link CodegenDiscriminator} containing the mapping and enum details + * @param var the {@link CodegenProperty} representing the discriminator property + * @return the default value for the enum discriminator property, or its original default value if none is found + */ + protected static String getEnumValueForProperty( + String modelName, CodegenDiscriminator discriminator, CodegenProperty var) { + if (!discriminator.getIsEnum() && !var.isEnum) { + return var.defaultValue; + } + Map* Return true if a model should be generated e.g. object with properties, * enum, oneOf, allOf, anyOf, etc. @@ -220,7 +220,7 @@ private boolean isModelNeeded(Schema schema) { /** * Return false if model can be represented by primitives e.g. string, object - * without properties, array or map of other model (model contanier), etc. + * without properties, array or map of other model (model container), etc. *
* Return true if a model should be generated e.g. object with properties,
* enum, oneOf, allOf, anyOf, etc.
@@ -629,7 +629,7 @@ private void flattenComponentResponses() {
* breed:
* type: string
*
- * @param key a unique name ofr the composed schema.
+ * @param key a unique name for the composed schema.
* @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf).
* @param skipAllOfInlineSchemas true if allOf inline schemas need to be skipped.
*/
@@ -1043,7 +1043,7 @@ private void copyVendorExtensions(Schema source, Schema target) {
* Add the schemas to the components
*
* @param name name of the inline schema
- * @param schema inilne schema
+ * @param schema inline schema
* @return the actual model name (based on inlineSchemaNameMapping if provided)
*/
private String addSchemas(String name, Schema schema) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java
index 44fa54695702..25265ef0f548 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java
@@ -836,7 +836,7 @@ private Schema normalizeComplexComposedSchema(Schema schema, Set
@@ -716,9 +757,9 @@ static class VersionUtil {
private static final String DEFAULT_VERSIONS = "\n" +
"
- * This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data varients.
+ * This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data variants.
*
* e.g. consider this example:
* ```
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java
index 59dc936667d3..44711d8e1c37 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java
@@ -383,7 +383,7 @@ public Map
+ *
+ *
+ * @param dataType the data type string
+ * @return the data type string without annotations
+ */
+ public String removeAnnotations(String dataType) {
+ if (dataType != null && dataType.contains("@")) {
+ return dataType.replaceAll("(?:(?i)@[a-z0-9]*+([(].*[)]|\\s*))*+", "");
+ }
+ return dataType;
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java
index 81cee1d2786c..faed1d91c8ef 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJuliaCodegen.java
@@ -173,7 +173,7 @@ protected static String dropDots(String str) {
/**
* Escapes a reserved word as defined in the `reservedWords` array. Handle escaping
- * those terms here. This logic is only called if a variable matches the reseved words
+ * those terms here. This logic is only called if a variable matches the reserved words
*
* @return the escaped term
*/
@@ -437,6 +437,18 @@ public String toDefaultValue(Schema schema) {
return "nothing";
}
+ @Override
+ public String toEnumDefaultValue(String value, String datatype) {
+ // we do not generate any separate enum structure in Julia
+ return value;
+ }
+
+ @Override
+ public String toEnumVarName(String value, String datatype) {
+ // we do not generate any separate enum structure in Julia
+ return value;
+ }
+
@Override
public String escapeUnsafeCharacters(String input) {
return input.replace("#=", "#_=").replace("=#", "=_#");
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
index b850b6bffc80..d0d2d94bcc23 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
@@ -435,7 +435,7 @@ public String toVarName(String name) {
}
// translate @ for properties (like @type) to at_.
- // Otherwise an additional "type" property will leed to duplcates
+ // Otherwise an additional "type" property will lead to duplicates
name = name.replaceAll("^@", "at_");
// sanitize name
@@ -501,6 +501,11 @@ private String toGenericName(String name) {
@Override
public String toModelName(String name) {
+
+ if (modelNameMapping.containsKey(name)) {
+ return modelNameMapping.get(name);
+ }
+
// memoization
String origName = name;
if (schemaKeyToModelNameCache.containsKey(origName)) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java
index 6c49ce78fd74..9fa261694f61 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java
@@ -1185,7 +1185,7 @@ private String getModelNameFromDataType(CodegenProperty cp) {
}
/**
- * Update set of imports from codegen model recursivly
+ * Update set of imports from codegen model recursively
*
* @param modelName model name
* @param cm codegen model
@@ -1362,7 +1362,7 @@ public void postProcessPattern(String pattern, Map
{{code}}{{#message}} - {{.}}{{/message}}
+ {{/responses}} * @param requestParameters The {{operationId}} request parameters as object
+ {{#returnType}} * @return {{.}}
+ {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ {{#externalDocs}}
+ * {{description}}
+ * @see {{summary}} Documentation
+ {{/externalDocs}}
+ */
+ public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono {{code}}{{#message}} - {{.}}{{/message}}
+ {{/responses}} * @param requestParameters The {{operationId}} request parameters as object
+ {{#returnType}} * @return ResponseEntity<{{.}}>
+ {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ {{#externalDocs}}
+ * {{description}}
+ * @see {{summary}} Documentation
+ {{/externalDocs}}
+ */
+ public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity {{code}}{{#message}} - {{.}}{{/message}}
+ {{/responses}} * @param requestParameters The {{operationId}} request parameters as object
+ * @return ResponseSpec
+ * @throws WebClientResponseException if an error occurs while attempting to invoke the API
+ {{#externalDocs}}
+ * {{description}}
+ * @see {{summary}} Documentation
+ {{/externalDocs}}
+ */
+ public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException {
+ return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}});
+ }
+
+ {{/hasSingleParam}}{{/hasParams}}{{/useSingleRequestParameter}}
/**
* {{summary}}
* {{notes}}
diff --git a/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache
index f875240996b3..48b49ecff542 100644
--- a/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache
@@ -23,7 +23,7 @@
{{#withXml}}
@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})
{{/withXml}}
- {{{name}}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}},
+ {{{name}}}({{^isUri}}{{^isNumeric}}{{dataType}}.valueOf({{/isNumeric}}{{/isUri}}{{{value}}}{{^isUri}}{{^isNumeric}}){{/isNumeric}}{{/isUri}}){{^-last}},
{{/-last}}{{#-last}};{{/-last}}
{{/enumVars}}
{{/allowableValues}}
diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache
index 3e5ed936625f..67af2ce5e31a 100644
--- a/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaInflector/pom.mustache
@@ -162,7 +162,7 @@
- * Test query parameter(s)
- *
- * @throws ApiException if the Api call fails
- */
- [Fact]
- public void TestQueryStyleFormExplodeTrueObjectTest()
- {
- Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity
(&self, serializer: S) -> Result(_: &String, s: S) -> Result