diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 5c7bdfdce011..bfafaa6c322c 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,6 +1,6 @@
##### Description
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 00df8ea00017..1fa115667f0b 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -18,7 +18,7 @@ assignees: ''
##### Description
diff --git a/.github/workflows/gradle-plugin-tests.yaml b/.github/workflows/gradle-plugin-tests.yaml
index f1d4457cfe1c..6701169a2a51 100644
--- a/.github/workflows/gradle-plugin-tests.yaml
+++ b/.github/workflows/gradle-plugin-tests.yaml
@@ -19,6 +19,7 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/.github/workflows/gradle-test.yaml b/.github/workflows/gradle-test.yaml
index b4bf1a1dea33..32c4d5f95c7c 100644
--- a/.github/workflows/gradle-test.yaml
+++ b/.github/workflows/gradle-test.yaml
@@ -37,6 +37,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
+ cache: gradle
# Cache Gradle Dependencies
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v4
diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml
index 6697084a90f0..35a5916c45a4 100644
--- a/.github/workflows/linux.yaml
+++ b/.github/workflows/linux.yaml
@@ -27,6 +27,7 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
+ cache: gradle
- uses: actions/cache@v4
with:
@@ -44,12 +45,12 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- - uses: gradle/actions/setup-gradle@v4
+ - uses: gradle/actions/setup-gradle@v5
with:
gradle-version: '8.14.3'
- name: Setup Maven
- uses: s4u/setup-maven-action@v1.18.0
+ uses: s4u/setup-maven-action@v1.19.0
with:
java-version: ${{ matrix.java }}
maven-version: 3.8.8
@@ -61,7 +62,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Upload Maven build artifact
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with:
name: artifact
@@ -91,12 +92,13 @@ jobs:
- name: Check out code
uses: actions/checkout@v5
- name: Setup Maven
- uses: s4u/setup-maven-action@v1.18.0
+ uses: s4u/setup-maven-action@v1.19.0
with:
java-version: 11
maven-version: 3.8.8
+ cache: gradle
- name: Download build artifact
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
with:
name: artifact
- name: Run Ensures Script
diff --git a/.github/workflows/openapi-generator.yaml b/.github/workflows/openapi-generator.yaml
index 3549bdbb6cdf..2bae848da07e 100644
--- a/.github/workflows/openapi-generator.yaml
+++ b/.github/workflows/openapi-generator.yaml
@@ -21,6 +21,7 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -41,7 +42,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: ls -la modules/openapi-generator-cli/target
- name: Upload openapi-generator-cli.jar artifact
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
@@ -59,6 +60,7 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -79,7 +81,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish unit test reports
if: ${{ always() }}
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
with:
name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml'
@@ -97,7 +99,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
@@ -136,7 +138,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
diff --git a/.github/workflows/samples-clojure.yaml b/.github/workflows/samples-clojure.yaml
new file mode 100644
index 000000000000..ae493e77d6ec
--- /dev/null
+++ b/.github/workflows/samples-clojure.yaml
@@ -0,0 +1,51 @@
+name: Samples Clojure Client
+
+on:
+ push:
+ paths:
+ - samples/client/petstore/clojure/**
+ pull_request:
+ paths:
+ - samples/client/petstore/clojure/**
+jobs:
+ build:
+ name: Build Clojure Client (JDK11)
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ - samples/client/petstore/clojure/
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ steps:
+ - uses: actions/checkout@v5
+ - name: Add hosts to /etc/hosts
+ run: |
+ sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
+ - uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: 11
+ - name: Cache maven dependencies
+ uses: actions/cache@v4
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.m2
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ - name: Install Leiningen (if using Leiningen)
+ run: |
+ curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > lein
+ chmod +x lein
+ sudo mv lein /usr/local/bin/
+ - name: Run tests (Leiningen)
+ working-directory: ${{ matrix.sample }}
+ run: lein test
diff --git a/.github/workflows/samples-cpp-httplib-server.yaml b/.github/workflows/samples-cpp-httplib-server.yaml
new file mode 100644
index 000000000000..4b92487963f4
--- /dev/null
+++ b/.github/workflows/samples-cpp-httplib-server.yaml
@@ -0,0 +1,59 @@
+name: Samples cpp httplib server
+
+on:
+ push:
+ branches:
+ - "samples/server/petstore/cpp-httplib-server/**"
+ pull_request:
+ paths:
+ - "samples/server/petstore/cpp-httplib-server/**"
+
+env:
+ GRADLE_VERSION: 6.9
+
+jobs:
+ build:
+ name: Build cpp httplib server
+ strategy:
+ matrix:
+ sample:
+ - samples/server/petstore/cpp-httplib-server
+ os:
+ - ubuntu-latest
+ - macOS-latest
+ - windows-latest
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Install dependencies (Linux)
+ if: matrix.os == 'ubuntu-latest'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y nlohmann-json3-dev libssl-dev zlib1g-dev
+ # Install httplib from source since it's not in Ubuntu repos
+ git clone https://github.com/yhirose/cpp-httplib.git
+ cd cpp-httplib
+ mkdir build && cd build
+ cmake .. -DCMAKE_BUILD_TYPE=Release
+ make -j$(nproc)
+ sudo make install
+ - name: Install dependencies (macOS)
+ if: matrix.os == 'macOS-latest'
+ run: |
+ brew install nlohmann-json openssl zlib
+ # Install httplib via Homebrew
+ brew install cpp-httplib
+ - name: Install vcpkg (Windows)
+ if: matrix.os == 'windows-latest'
+ run: |
+ git clone https://github.com/microsoft/vcpkg.git
+ .\vcpkg\bootstrap-vcpkg.bat
+ shell: cmd
+ - name: Install dependencies (Windows)
+ if: matrix.os == 'windows-latest'
+ run: |
+ .\vcpkg\vcpkg.exe install nlohmann-json:x64-windows openssl:x64-windows cpp-httplib:x64-windows zlib:x64-windows
+ shell: cmd
+ - name: Build
+ working-directory: ${{ matrix.sample }}
+ run: cmake -B build && cmake --build build --verbose
diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml
index 9e618ae90eae..8aa8a3f4cf3b 100644
--- a/.github/workflows/samples-dart-build-test.yaml
+++ b/.github/workflows/samples-dart-build-test.yaml
@@ -4,20 +4,24 @@ on:
push:
branches:
paths:
- #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
+ #- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
- #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
+ #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
+ - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
+ - samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
pull_request:
paths:
- #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
+ #- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
- #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
+ #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
+ - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
+ - samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
jobs:
test:
@@ -27,12 +31,14 @@ jobs:
os: [ubuntu-latest, windows-latest]
sdk: ["3.9.0"]
sample:
- #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/
+ #- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/
- #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/
+ #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/
+ - samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/
- samples/openapi3/client/petstore/dart-dio/oneof/
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/
- samples/openapi3/client/petstore/dart-dio/binary_response/
+ - samples/openapi3/client/petstore/dart-dio/petstore-timemachine/
steps:
- uses: actions/checkout@v5
diff --git a/.github/workflows/samples-dotnet-petstore.yml b/.github/workflows/samples-dotnet-petstore.yml
new file mode 100644
index 000000000000..6a97c8f11925
--- /dev/null
+++ b/.github/workflows/samples-dotnet-petstore.yml
@@ -0,0 +1,37 @@
+name: Samples C# .Net Client (Petstore)
+
+on:
+ push:
+ paths:
+ - samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
+ pull_request:
+ paths:
+ - samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
+jobs:
+ build:
+ name: Build clients
+ runs-on: ubuntu-latest
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ - samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
+ steps:
+ - uses: actions/checkout@v5
+ - uses: actions/setup-dotnet@v5.0.0
+ with:
+ dotnet-version: '7.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-dotnet7-client.yml b/.github/workflows/samples-dotnet7-client.yml
new file mode 100644
index 000000000000..f4cbfb61c088
--- /dev/null
+++ b/.github/workflows/samples-dotnet7-client.yml
@@ -0,0 +1,54 @@
+name: Samples C# .Net 7 Client
+
+on:
+ push:
+ paths:
+ # the .NET Core 3.0 runtime is no longer supported as it reached its end-of-life on March 3, 2020
+ #- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
+ - samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
+ - samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
+ - samples/client/petstore/csharp/restsharp/net8/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
+ - samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
+ pull_request:
+ paths:
+ #- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
+ - samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
+ - samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
+ - samples/client/petstore/csharp/restsharp/net8/Petstore/**
+ - samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
+ - samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
+jobs:
+ build:
+ name: Build clients
+ runs-on: windows-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ #- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/
+ - samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/
+ - samples/client/petstore/csharp/restsharp/net4.7/Petstore/
+ - samples/client/petstore/csharp/restsharp/net4.8/Petstore/
+ - samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
+ - samples/client/petstore/csharp/restsharp/net8/EnumMappings/
+ - samples/client/petstore/csharp/restsharp/net8/Petstore/
+ - samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/
+ - samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
+ steps:
+ - uses: actions/checkout@v5
+ - uses: actions/setup-dotnet@v5.0.0
+ with:
+ dotnet-version: '7.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
index 08cf881b0314..fe500ec82855 100644
--- a/.github/workflows/samples-dotnet9.yaml
+++ b/.github/workflows/samples-dotnet9.yaml
@@ -43,6 +43,7 @@ jobs:
- samples/client/petstore/csharp/restsharp/net9/EnumMappings
# httpclient
- samples/client/petstore/csharp/httpclient/net9/Petstore
+ - samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi
# unity
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
steps:
diff --git a/.github/workflows/samples-go-client-petstore.yaml b/.github/workflows/samples-go-client-petstore.yaml
new file mode 100644
index 000000000000..581a7a5bd28d
--- /dev/null
+++ b/.github/workflows/samples-go-client-petstore.yaml
@@ -0,0 +1,45 @@
+name: Samples Go Clients (Petstore)
+
+on:
+ push:
+ paths:
+ - samples/client/petstore/go/**
+ - samples/openapi3/client/petstore/go/**
+ pull_request:
+ paths:
+ - samples/client/petstore/go/**
+ - samples/openapi3/client/petstore/go/**
+
+jobs:
+ build:
+ name: Build Go
+ runs-on: ubuntu-latest
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ - samples/client/petstore/go/
+ - samples/openapi3/client/petstore/go/
+ steps:
+ - uses: actions/checkout@v5
+ - name: Add hosts to /etc/hosts
+ run: |
+ sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
+ - uses: actions/setup-go@v6
+ - run: go version
+ - name: Install Dependencies
+ working-directory: ${{ matrix.sample }}
+ run: |
+ go mod tidy
+ - name: Run test
+ working-directory: ${{ matrix.sample }}
+ run: go test -mod=mod -v
+
diff --git a/.github/workflows/samples-go-client.yaml b/.github/workflows/samples-go-client.yaml
index 5fcbf08d63ff..198c9597c8dd 100644
--- a/.github/workflows/samples-go-client.yaml
+++ b/.github/workflows/samples-go-client.yaml
@@ -6,12 +6,17 @@ on:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/**'
- 'samples/openapi3/client/petstore/go-petstore-withXml/**'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/**
+ - samples/client/others/go/allof_multiple_ref_and_discriminator/**
+ - samples/client/others/go/oneof-anyof-required/**
+ - samples/client/others/go/oneof-discriminator-lookup/**
pull_request:
paths:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/**'
- 'samples/openapi3/client/petstore/go-petstore-withXml/**'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/**
-
+ - samples/client/others/go/allof_multiple_ref_and_discriminator/**
+ - samples/client/others/go/oneof-anyof-required/**
+ - samples/client/others/go/oneof-discriminator-lookup/**
jobs:
build:
name: Build Go
@@ -23,6 +28,9 @@ jobs:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/'
- 'samples/openapi3/client/petstore/go-petstore-withXml/'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/
+ - samples/client/others/go/allof_multiple_ref_and_discriminator/
+ - samples/client/others/go/oneof-anyof-required/
+ - samples/client/others/go/oneof-discriminator-lookup/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml
index 4c0fdaf1d8f3..3d3418767e5f 100644
--- a/.github/workflows/samples-go.yaml
+++ b/.github/workflows/samples-go.yaml
@@ -6,13 +6,13 @@ on:
- 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**'
- - 'samples/server/others/go-server/no-body-path-params/**'
+ - 'samples/server/others/go-server/**'
pull_request:
paths:
- 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**'
- - 'samples/server/others/go-server/no-body-path-params/**'
+ - 'samples/server/others/go-server/**'
jobs:
build:
@@ -26,6 +26,7 @@ jobs:
- samples/server/petstore/go-api-server/
- samples/server/petstore/go-chi-server/
- samples/server/others/go-server/no-body-path-params/
+ - samples/server/others/go-server/optional-body/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
@@ -58,4 +59,4 @@ jobs:
go mod tidy
- name: Run tests
working-directory: ${{ matrix.sample }}
- run: go test ./samples_tests -v
\ No newline at end of file
+ run: go test ./samples_tests -v
diff --git a/.github/workflows/samples-groovy.yaml b/.github/workflows/samples-groovy.yaml
index c5d66f1037dc..819477160158 100644
--- a/.github/workflows/samples-groovy.yaml
+++ b/.github/workflows/samples-groovy.yaml
@@ -26,6 +26,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/.github/workflows/samples-java-client-jdk11.yaml b/.github/workflows/samples-java-client-jdk11.yaml
index b4342f9f2dfd..6b58670f36e3 100644
--- a/.github/workflows/samples-java-client-jdk11.yaml
+++ b/.github/workflows/samples-java-client-jdk11.yaml
@@ -5,6 +5,7 @@ on:
paths:
- 'samples/client/petstore/java/**'
- samples/client/petstore/jaxrs-cxf-client/**
+ - samples/client/petstore/jaxrs-cxf-client-swagger2/**
- samples/client/petstore/java-micronaut-client/**
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
@@ -17,12 +18,17 @@ on:
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
+ - samples/client/petstore/java/jersey3-oneOf/**
+ - samples/client/others/java/okhttp-gson-streaming/**
+ - samples/client/others/java/resteasy/**
+ - samples/client/others/java/apache-httpclient/**
- samples/client/others/java/resttemplate-list-schema-validation/**
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
pull_request:
paths:
- 'samples/client/petstore/java/**'
- samples/client/petstore/jaxrs-cxf-client/**
+ - samples/client/petstore/jaxrs-cxf-client-swagger2/**
- samples/client/petstore/java-micronaut-client/**
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
@@ -35,6 +41,10 @@ on:
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
+ - samples/client/petstore/java/jersey3-oneOf/**
+ - samples/client/others/java/okhttp-gson-streaming/**
+ - samples/client/others/java/resteasy/**
+ - samples/client/others/java/apache-httpclient/**
- samples/client/others/java/resttemplate-list-schema-validation/**
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
jobs:
@@ -46,6 +56,7 @@ jobs:
matrix:
sample:
# clients
+ - samples/client/petstore/jaxrs-cxf-client-swagger2
- samples/client/petstore/jaxrs-cxf-client
- samples/client/petstore/java/native
- samples/client/petstore/java/native-async
@@ -97,12 +108,17 @@ jobs:
- samples/client/others/java/jersey2-oneOf-Mixed/
- samples/client/others/java/resttemplate-list-schema-validation/
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/
+ - samples/client/petstore/java/jersey3-oneOf/
+ - samples/client/others/java/okhttp-gson-streaming/
+ - samples/client/petstore/java/resteasy/
+ - samples/client/petstore/java/apache-httpclient/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/.github/workflows/samples-java-client-jdk17.yaml b/.github/workflows/samples-java-client-jdk17.yaml
index 608fe968d2a8..6923970f0260 100644
--- a/.github/workflows/samples-java-client-jdk17.yaml
+++ b/.github/workflows/samples-java-client-jdk17.yaml
@@ -42,6 +42,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/.github/workflows/samples-java-dubbo.yaml b/.github/workflows/samples-java-dubbo.yaml
new file mode 100644
index 000000000000..16842d995fc8
--- /dev/null
+++ b/.github/workflows/samples-java-dubbo.yaml
@@ -0,0 +1,39 @@
+name: Samples Java Dubbo
+
+on:
+ push:
+ paths:
+ - 'samples/server/petstore/java-dubbo/**'
+ pull_request:
+ paths:
+ - 'samples/server/petstore/java-dubbo/**'
+
+jobs:
+ build:
+ name: Build Java Dubbo
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ # servers
+ - samples/server/petstore/java-dubbo
+ steps:
+ - uses: actions/checkout@v5
+ - uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: 17
+ - name: Cache maven dependencies
+ uses: actions/cache@v4
+ 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 --no-transfer-progress -DskipTests
+ # add -DskipTests as the app compiles but fails to start
+ #run: mvn clean package --no-transfer-progress
diff --git a/.github/workflows/samples-java-petsore-client-jdk11.yaml b/.github/workflows/samples-java-petsore-client-jdk11.yaml
new file mode 100644
index 000000000000..71fe8d7a42f9
--- /dev/null
+++ b/.github/workflows/samples-java-petsore-client-jdk11.yaml
@@ -0,0 +1,65 @@
+# run java client tests with petstore server
+name: Samples Java Petsore Client JDK11
+
+on:
+ push:
+ paths:
+ - samples/client/petstore/java/jersey2-java8/**
+ - samples/openapi3/client/petstore/java/jersey2-java8/**
+ - samples/client/petstore/java/jersey3/**
+ - samples/client/petstore/java/okhttp-gson/**
+ - samples/client/petstore/java/okhttp-gson-3.1/**
+ - samples/client/petstore/java/okhttp-gson-dynamicOperations/**
+ - samples/client/petstore/java-micronaut-client/**
+ pull_request:
+ paths:
+ - samples/client/petstore/java/jersey2-java8/**
+ - samples/openapi3/client/petstore/java/jersey2-java8/**
+ - samples/client/petstore/java/jersey3/**
+ - samples/client/petstore/java/okhttp-gson/**
+ - samples/client/petstore/java/okhttp-gson-3.1/**
+ - samples/client/petstore/java/okhttp-gson-dynamicOperations/**
+ - samples/client/petstore/java-micronaut-client/**
+jobs:
+ build:
+ name: Build Java Client JDK11
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ - samples/client/petstore/java/jersey2-java8
+ - samples/openapi3/client/petstore/java/jersey2-java8
+ - samples/client/petstore/java/jersey3
+ - samples/client/petstore/java/okhttp-gson
+ - samples/client/petstore/java/okhttp-gson-3.1
+ - samples/client/petstore/java/okhttp-gson-dynamicOperations
+ - samples/client/petstore/java-micronaut-client
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ steps:
+ - uses: actions/checkout@v5
+ - name: Add hosts to /etc/hosts
+ run: |
+ sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
+ - uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: 11
+ - name: Cache maven dependencies
+ uses: actions/cache@v4
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.m2
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+ - name: Build with Maven
+ working-directory: ${{ matrix.sample }}
+ run: mvn clean package --no-transfer-progress
diff --git a/.github/workflows/samples-java-sbt.yaml b/.github/workflows/samples-java-sbt.yaml
new file mode 100644
index 000000000000..3c4dd3620d3a
--- /dev/null
+++ b/.github/workflows/samples-java-sbt.yaml
@@ -0,0 +1,38 @@
+name: Samples Java (sbt)
+
+on:
+ push:
+ paths:
+ - 'samples/client/petstore/java/okhttp-gson/**'
+ pull_request:
+ paths:
+ - 'samples/client/petstore/java/okhttp-gson/**'
+jobs:
+ build:
+ name: Build sbt/Java client, servers
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ # clients
+ - samples/client/petstore/java/okhttp-gson
+ steps:
+ - uses: actions/checkout@v5
+ - uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: 11
+ - name: Setup sbt launcher
+ uses: sbt/setup-sbt@v1
+ - name: Cache maven dependencies
+ uses: actions/cache@v4
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.ivy2
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
+ - name: Build and test
+ working-directory: ${{ matrix.sample }}
+ run: sbt -v +test
diff --git a/.github/workflows/samples-javascript.yaml b/.github/workflows/samples-javascript.yaml
new file mode 100644
index 000000000000..c22bafba2e1d
--- /dev/null
+++ b/.github/workflows/samples-javascript.yaml
@@ -0,0 +1,51 @@
+name: Samples JS clients
+
+on:
+ push:
+ paths:
+ #- samples/client/petstore/javascript-flowtyped/**
+ - samples/client/petstore/javascript-es6/**
+ - samples/client/petstore/javascript-promise-es6/**
+ pull_request:
+ paths:
+ #- samples/client/petstore/javascript-flowtyped/**
+ - samples/client/petstore/javascript-es6/**
+ - samples/client/petstore/javascript-promise-es6/**
+jobs:
+ build:
+ name: Build projects
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ node:
+ - "18.x"
+ - "20.x"
+ sample:
+ # clients
+ - samples/client/petstore/javascript-es6/
+ - samples/client/petstore/javascript-promise-es6/
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ steps:
+ - uses: actions/checkout@v5
+ - name: Add hosts to /etc/hosts
+ run: |
+ sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
+ - name: Use Node.js 20.x
+ uses: actions/setup-node@v5
+ with:
+ node-version: ${{ matrix.node }}
+ cache: 'npm' # Or 'yarn'
+ - name: npm install
+ working-directory: ${{ matrix.sample }}
+ run: npm install
+ - name: npm test
+ working-directory: ${{ matrix.sample }}
+ run: npm test
diff --git a/.github/workflows/samples-jaxrs.yaml b/.github/workflows/samples-jaxrs.yaml
index 82712ec3ebcb..2a555843f284 100644
--- a/.github/workflows/samples-jaxrs.yaml
+++ b/.github/workflows/samples-jaxrs.yaml
@@ -20,10 +20,7 @@ jobs:
- samples/server/petstore/jaxrs/jersey2-useTags
- samples/server/petstore/jaxrs-jersey
- samples/server/petstore/jaxrs-spec
- - samples/server/petstore/jaxrs-spec-interface
- - samples/server/petstore/jaxrs-spec-interface-response
- - samples/server/petstore/jaxrs-jersey
- - samples/server/petstore/jaxrs-spec
+ - samples/server/petstore/jaxrs-spec-withxml
- samples/server/petstore/jaxrs-spec-interface
- samples/server/petstore/jaxrs-spec-interface-response
- samples/server/petstore/jaxrs-datelib-j8
@@ -37,6 +34,9 @@ jobs:
- samples/server/petstore/jaxrs-cxf-cdi
- samples/server/petstore/jaxrs-cxf-non-spring-app
- samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations
+ - samples/server/petstore/jaxrs-spec-swagger-annotations
+ - samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta
+ - samples/server/petstore/jaxrs-spec-swagger-v3-annotations
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
diff --git a/.github/workflows/samples-kotlin-client.yaml b/.github/workflows/samples-kotlin-client.yaml
index 7a3fb62e8ddc..2a714bad3771 100644
--- a/.github/workflows/samples-kotlin-client.yaml
+++ b/.github/workflows/samples-kotlin-client.yaml
@@ -44,6 +44,7 @@ jobs:
- samples/client/petstore/kotlin-threetenbp
- samples/client/petstore/kotlin-kotlinx-datetime
- samples/client/petstore/kotlin-uppercase-enum
+ - samples/client/petstore/kotlin-array-integer-enum
- samples/client/petstore/kotlin-default-values-jvm-okhttp4
- samples/client/petstore/kotlin-default-values-jvm-retrofit2
- samples/client/petstore/kotlin-default-values-jvm-volley
@@ -77,6 +78,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/.github/workflows/samples-kotlin-echo-api.yaml b/.github/workflows/samples-kotlin-echo-api.yaml
index 275fc9ff3196..a662964ed66c 100644
--- a/.github/workflows/samples-kotlin-echo-api.yaml
+++ b/.github/workflows/samples-kotlin-echo-api.yaml
@@ -26,6 +26,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/.github/workflows/samples-kotlin-server-jdk17.yaml b/.github/workflows/samples-kotlin-server-jdk17.yaml
index c232b1e08779..11b9f872b531 100644
--- a/.github/workflows/samples-kotlin-server-jdk17.yaml
+++ b/.github/workflows/samples-kotlin-server-jdk17.yaml
@@ -34,6 +34,7 @@ jobs:
# server
- samples/server/petstore/kotlin-server-required-and-nullable-properties
- samples/server/petstore/kotlin-springboot-3
+ - samples/server/petstore/kotlin-springboot-additionalproperties
- samples/server/petstore/kotlin-springboot-delegate-nodefaults
- samples/server/petstore/kotlin-springboot-request-cookie
- samples/server/petstore/kotlin-server/jaxrs-spec
@@ -51,6 +52,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -67,4 +69,4 @@ jobs:
arguments: wrapper
- name: Build
working-directory: ${{ matrix.sample }}
- run: ./gradlew build -x test
\ No newline at end of file
+ run: ./gradlew build -x test
diff --git a/.github/workflows/samples-kotlin-server-jdk21.yaml b/.github/workflows/samples-kotlin-server-jdk21.yaml
index 3ef852b61bbf..5c013d4fc9ee 100644
--- a/.github/workflows/samples-kotlin-server-jdk21.yaml
+++ b/.github/workflows/samples-kotlin-server-jdk21.yaml
@@ -32,6 +32,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
diff --git a/.github/workflows/samples-kotlin-server.yaml b/.github/workflows/samples-kotlin-server.yaml
index 6dbb7d6ed9a4..8550a29ac419 100644
--- a/.github/workflows/samples-kotlin-server.yaml
+++ b/.github/workflows/samples-kotlin-server.yaml
@@ -38,6 +38,7 @@ jobs:
- samples/server/petstore/kotlin-springboot-source-swagger1
- samples/server/petstore/kotlin-springboot-source-swagger2
- samples/server/petstore/kotlin-springboot-springfox
+ - samples/server/petstore/kotlin-springboot-x-kotlin-implements
- samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-server/jaxrs-spec
@@ -58,7 +59,8 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
- java-version: 8
+ java-version: 11
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -75,4 +77,4 @@ jobs:
arguments: wrapper
- name: Build
working-directory: ${{ matrix.sample }}
- run: ./gradlew build -x test
\ No newline at end of file
+ run: ./gradlew build -x test
diff --git a/.github/workflows/samples-powershell.yaml b/.github/workflows/samples-powershell.yaml
new file mode 100644
index 000000000000..208cf69332f0
--- /dev/null
+++ b/.github/workflows/samples-powershell.yaml
@@ -0,0 +1,40 @@
+name: Samples PowerShell
+
+on:
+ push:
+ paths:
+ - samples/client/petstore/powershell/**
+ pull_request:
+ paths:
+ - samples/client/petstore/powershell/**
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: Test Powershell Clients
+ strategy:
+ matrix:
+ sample:
+ - samples/client/petstore/powershell/
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ steps:
+ - uses: actions/checkout@v5
+ - name: Build the client
+ working-directory: ${{ matrix.sample }}
+ shell: pwsh
+ run: |
+ ./Build.ps1
+ - name: Test
+ working-directory: ${{ matrix.sample }}
+ shell: pwsh
+ run: |
+ Import-Module -Name './src/PSPetstore'
+ Invoke-Pester -PassThru
+
+
diff --git a/.github/workflows/samples-python-petstore.yaml b/.github/workflows/samples-python-petstore.yaml
index 658b506ff0e6..f5a0254f03ea 100644
--- a/.github/workflows/samples-python-petstore.yaml
+++ b/.github/workflows/samples-python-petstore.yaml
@@ -34,7 +34,9 @@ jobs:
- "3.13"
sample:
- samples/openapi3/client/petstore/python-aiohttp
+ - samples/openapi3/client/petstore/python-httpx
- samples/openapi3/client/petstore/python
+ - samples/openapi3/client/petstore/python-lazyImports
services:
petstore-api:
image: swaggerapi/petstore
diff --git a/.github/workflows/samples-scala-client.yaml b/.github/workflows/samples-scala-client.yaml
new file mode 100644
index 000000000000..b7638ef82828
--- /dev/null
+++ b/.github/workflows/samples-scala-client.yaml
@@ -0,0 +1,70 @@
+name: Samples Scala/sbt client
+
+on:
+ push:
+ paths:
+ - samples/client/petstore/scalaz/**
+ - samples/client/petstore/scala-pekko/**
+ - samples/client/petstore/scala-http4s/**
+ - samples/client/petstore/scala-sttp4-jsoniter/**
+ - samples/client/petstore/scala-akka/**
+ - samples/client/petstore/scala-sttp/**
+ - samples/client/petstore/scala-sttp-circe/**
+ - samples/client/petstore/scala-sttp4/**
+ pull_request:
+ paths:
+ - samples/client/petstore/scalaz/**
+ - samples/client/petstore/scala-pekko/**
+ - samples/client/petstore/scala-http4s/**
+ - samples/client/petstore/scala-sttp4-jsoniter/**
+ - samples/client/petstore/scala-akka/**
+ - samples/client/petstore/scala-sttp/**
+ - samples/client/petstore/scala-sttp-circe/**
+ - samples/client/petstore/scala-sttp4/**
+jobs:
+ build:
+ name: Build sbt/Scala
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ # clients
+ - samples/client/petstore/scalaz
+ - samples/client/petstore/scala-pekko
+ - samples/client/petstore/scala-http4s
+ - samples/client/petstore/scala-sttp4-jsoniter
+ - samples/client/petstore/scala-akka
+ - samples/client/petstore/scala-sttp
+ - samples/client/petstore/scala-sttp-circe
+ - samples/client/petstore/scala-sttp4
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ steps:
+ - uses: actions/checkout@v5
+ - name: Add hosts to /etc/hosts
+ run: |
+ sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
+ - uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: 11
+ - name: Setup sbt launcher
+ uses: sbt/setup-sbt@v1
+ - name: Cache maven dependencies
+ uses: actions/cache@v4
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.ivy2
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
+ - name: Build and test
+ working-directory: ${{ matrix.sample }}
+ run: sbt -v test
diff --git a/.github/workflows/samples-scala-server.yaml b/.github/workflows/samples-scala-server.yaml
new file mode 100644
index 000000000000..86544babdca4
--- /dev/null
+++ b/.github/workflows/samples-scala-server.yaml
@@ -0,0 +1,43 @@
+name: Samples Scala/sbt server
+
+on:
+ push:
+ paths:
+ - 'samples/server/petstore/scala**'
+ pull_request:
+ paths:
+ - 'samples/server/petstore/scala**'
+jobs:
+ build:
+ name: Build sbt/Scala
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ # servers
+ - samples/server/petstore/scala-play-server
+ - samples/server/petstore/scala-akka-http-server
+ - samples/server/petstore/scala-pekko-http-server
+ - samples/server/petstore/scalatra
+ - samples/server/petstore/scala-http4s-server
+ - samples/server/petstore/scala-cask
+ steps:
+ - uses: actions/checkout@v5
+ - uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: 11
+ - name: Setup sbt launcher
+ uses: sbt/setup-sbt@v1
+ - name: Cache maven dependencies
+ uses: actions/cache@v4
+ env:
+ cache-name: maven-repository
+ with:
+ path: |
+ ~/.ivy2
+ key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
+ - name: Build and test
+ working-directory: ${{ matrix.sample }}
+ run: sbt -v +test
diff --git a/.github/workflows/samples-scala.yaml b/.github/workflows/samples-scala.yaml
deleted file mode 100644
index 7b955b12e9ec..000000000000
--- a/.github/workflows/samples-scala.yaml
+++ /dev/null
@@ -1,56 +0,0 @@
-name: Samples Scala/sbt
-
-on:
- push:
- paths:
- - 'samples/client/petstore/scala**'
- - 'samples/server/petstore/scala**'
- - 'samples/client/petstore/java/okhttp-gson/**'
- pull_request:
- paths:
- - 'samples/client/petstore/scala**'
- - 'samples/server/petstore/scala**'
- - 'samples/client/petstore/java/okhttp-gson/**'
-jobs:
- build:
- name: Build sbt/Scala client, servers
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- sample:
- # clients
- - samples/client/petstore/java/okhttp-gson
- - samples/client/petstore/scalaz
- - samples/client/petstore/scala-pekko
- - samples/client/petstore/scala-http4s
- - samples/client/petstore/scala-sttp4-jsoniter
- #- samples/client/petstore/scala-sttp
- #- samples/client/petstore/scala-sttp-circe
- # servers
- - samples/server/petstore/scala-lagom-server
- - samples/server/petstore/scala-play-server
- - samples/server/petstore/scala-akka-http-server
- - samples/server/petstore/scala-pekko-http-server
- - samples/server/petstore/scalatra
- - samples/server/petstore/scala-http4s-server
- - samples/server/petstore/scala-cask
- steps:
- - uses: actions/checkout@v5
- - uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: 11
- - name: Setup sbt launcher
- uses: sbt/setup-sbt@v1
- - name: Cache maven dependencies
- uses: actions/cache@v4
- env:
- cache-name: maven-repository
- with:
- path: |
- ~/.ivy2
- key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
- - name: Build and test
- working-directory: ${{ matrix.sample }}
- run: sbt -v +test
diff --git a/.github/workflows/samples-spring-jdk17.yaml b/.github/workflows/samples-spring-jdk17.yaml
index cd465fceaac2..154a47db7fbf 100644
--- a/.github/workflows/samples-spring-jdk17.yaml
+++ b/.github/workflows/samples-spring-jdk17.yaml
@@ -11,6 +11,7 @@ on:
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
+ - samples/openapi3/server/petstore/spring-boot-oneof-interface
pull_request:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
@@ -21,6 +22,7 @@ on:
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
+ - samples/openapi3/server/petstore/spring-boot-oneof-interface
jobs:
build:
name: Build Java Spring (JDK17)
@@ -39,6 +41,7 @@ jobs:
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
+ - samples/openapi3/server/petstore/spring-boot-oneof-interface
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
diff --git a/.github/workflows/samples-spring.yaml b/.github/workflows/samples-spring.yaml
index 9352cf7dd9b9..4e0ad17a885b 100644
--- a/.github/workflows/samples-spring.yaml
+++ b/.github/workflows/samples-spring.yaml
@@ -60,6 +60,7 @@ jobs:
- samples/server/petstore/springboot-spring-provide-args
- samples/server/petstore/springboot-useoptional
- samples/server/petstore/springboot-virtualan
+ - samples/openapi3/server/petstore/spring-boot-oneof-interface
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
diff --git a/.github/workflows/samples-typescript-client.yaml b/.github/workflows/samples-typescript-client.yaml
new file mode 100644
index 000000000000..0e0f0e835ed0
--- /dev/null
+++ b/.github/workflows/samples-typescript-client.yaml
@@ -0,0 +1,142 @@
+name: Samples TS clients
+
+on:
+ push:
+ paths:
+ - samples/client/others/typescript-angular/**
+ # comment out angular released before Nov 2023
+ #- samples/client/petstore/typescript-angular-v12-provided-in-root/**
+ #- samples/client/petstore/typescript-angular-v13-provided-in-root/**
+ #- samples/client/petstore/typescript-angular-v14-provided-in-root/**
+ #- samples/client/petstore/typescript-angular-v15-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v16-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v17-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v18-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v19-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v20-provided-in-root/**
+ - samples/openapi3/client/petstore/typescript/builds/default/**
+ # comment out due to build failure
+ #- samples/openapi3/client/petstore/typescript/tests/default/**
+ - samples/openapi3/client/petstore/typescript/builds/jquery/**
+ # comment out due to build failure
+ #- samples/openapi3/client/petstore/typescript/tests/jquery/**
+ - samples/openapi3/client/petstore/typescript/builds/object_params/**
+ # comment out due to build failure
+ #- samples/openapi3/client/petstore/typescript/tests/object_params/**
+ #- samples/openapi3/client/petstore/typescript/builds/inversify/**
+ #- samples/openapi3/client/petstore/typescript/tests/inversify/**
+ #- samples/openapi3/client/petstore/typescript/tests/deno/**
+ - samples/openapi3/client/petstore/typescript/builds/browser/**
+ # comment out due to build failure
+ #- samples/openapi3/client/petstore/typescript/tests/browser/**
+ #- samples/openapi3/client/petstore/typescript/builds/nullable-enum/**
+ - samples/client/petstore/typescript-fetch/builds/default/**
+ - samples/client/petstore/typescript-fetch/builds/es6-target/**
+ - samples/client/petstore/typescript-fetch/builds/with-npm-version/**
+ - samples/client/petstore/typescript-fetch/tests/default/**
+ # comment out due to build failure
+ #- samples/client/petstore/typescript-node/npm/**
+ - samples/client/petstore/typescript-rxjs/builds/with-npm-version/**
+ - samples/client/petstore/typescript-axios/builds/with-npm-version/**
+ # comment out due to build failure
+ #- samples/client/petstore/typescript-axios/tests/default/**
+ pull_request:
+ paths:
+ - samples/client/others/typescript-angular/**
+ #- samples/client/petstore/typescript-angular-v12-provided-in-root/**
+ #- samples/client/petstore/typescript-angular-v13-provided-in-root/**
+ #- samples/client/petstore/typescript-angular-v14-provided-in-root/**
+ #- samples/client/petstore/typescript-angular-v15-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v16-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v17-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v18-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v19-provided-in-root/**
+ - samples/client/petstore/typescript-angular-v20-provided-in-root/**
+ - samples/openapi3/client/petstore/typescript/builds/default/**
+ #- samples/openapi3/client/petstore/typescript/tests/default/**
+ - samples/openapi3/client/petstore/typescript/builds/jquery/**
+ #- samples/openapi3/client/petstore/typescript/tests/jquery/**
+ - samples/openapi3/client/petstore/typescript/builds/object_params/**
+ #- samples/openapi3/client/petstore/typescript/tests/object_params/**
+ #- samples/openapi3/client/petstore/typescript/builds/inversify/**
+ #- samples/openapi3/client/petstore/typescript/tests/inversify/**
+ #- samples/openapi3/client/petstore/typescript/tests/deno/**
+ - samples/openapi3/client/petstore/typescript/builds/browser/**
+ #- samples/openapi3/client/petstore/typescript/tests/browser/**
+ #- samples/openapi3/client/petstore/typescript/builds/nullable-enum/**
+ - samples/client/petstore/typescript-fetch/builds/default/**
+ - samples/client/petstore/typescript-fetch/builds/es6-target/**
+ - samples/client/petstore/typescript-fetch/builds/with-npm-version/**
+ - samples/client/petstore/typescript-fetch/tests/default/**
+ #- samples/client/petstore/typescript-node/npm/**
+ - samples/client/petstore/typescript-rxjs/builds/with-npm-version/**
+ - samples/client/petstore/typescript-axios/builds/with-npm-version/**
+ #- samples/client/petstore/typescript-axios/tests/default/**
+jobs:
+ build:
+ name: Build projects
+ runs-on: ubuntu-latest
+ services:
+ petstore-api:
+ image: swaggerapi/petstore
+ ports:
+ - 80:8080
+ env:
+ SWAGGER_HOST: http://petstore.swagger.io
+ SWAGGER_BASE_PATH: /v2
+ strategy:
+ fail-fast: false
+ matrix:
+ node:
+ #- "18.x"
+ - "20.x"
+ sample:
+ - samples/client/others/typescript-angular/
+ #- samples/client/petstore/typescript-angular-v12-provided-in-root/
+ #- samples/client/petstore/typescript-angular-v13-provided-in-root/
+ #- samples/client/petstore/typescript-angular-v14-provided-in-root/
+ #- samples/client/petstore/typescript-angular-v15-provided-in-root/
+ - samples/client/petstore/typescript-angular-v16-provided-in-root/
+ - samples/client/petstore/typescript-angular-v17-provided-in-root/
+ - samples/client/petstore/typescript-angular-v18-provided-in-root/
+ - samples/client/petstore/typescript-angular-v19-provided-in-root/
+ - samples/client/petstore/typescript-angular-v20-provided-in-root/
+ - samples/openapi3/client/petstore/typescript/builds/default/
+ #- samples/openapi3/client/petstore/typescript/tests/default/
+ - samples/openapi3/client/petstore/typescript/builds/jquery/
+ #- samples/openapi3/client/petstore/typescript/tests/jquery/
+ - samples/openapi3/client/petstore/typescript/builds/object_params/
+ #- samples/openapi3/client/petstore/typescript/tests/object_params/
+ #- samples/openapi3/client/petstore/typescript/builds/inversify/
+ #- samples/openapi3/client/petstore/typescript/tests/inversify/
+ #- samples/openapi3/client/petstore/typescript/tests/deno/
+ - samples/openapi3/client/petstore/typescript/builds/browser/
+ #- samples/openapi3/client/petstore/typescript/tests/browser/
+ #- samples/openapi3/client/petstore/typescript/builds/nullable-enum/
+ - samples/client/petstore/typescript-fetch/builds/default/
+ - samples/client/petstore/typescript-fetch/builds/es6-target/
+ - samples/client/petstore/typescript-fetch/builds/with-npm-version/
+ - samples/client/petstore/typescript-fetch/tests/default/
+ #- samples/client/petstore/typescript-node/npm/
+ - samples/client/petstore/typescript-rxjs/builds/with-npm-version/
+ - samples/client/petstore/typescript-axios/builds/with-npm-version/
+ #- samples/client/petstore/typescript-axios/tests/default/
+ steps:
+ - uses: actions/checkout@v5
+ - name: Add hosts to /etc/hosts
+ run: |
+ sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ java-version: '17' # Specify your desired Java version
+ distribution: 'temurin' # Or 'adopt', 'oracle', etc.
+ cache: maven # Cache Maven dependencies for faster builds
+ - name: Use Node.js
+ uses: actions/setup-node@v5
+ with:
+ node-version: ${{ matrix.node }}
+ cache: 'npm' # Or 'yarn'
+ - name: mvn integration-test
+ working-directory: ${{ matrix.sample }}
+ run: mvn integration-test
diff --git a/.github/workflows/samples-typescript-server.yaml b/.github/workflows/samples-typescript-server.yaml
new file mode 100644
index 000000000000..002819f77d75
--- /dev/null
+++ b/.github/workflows/samples-typescript-server.yaml
@@ -0,0 +1,34 @@
+name: Samples TS servers
+
+on:
+ push:
+ paths:
+ - samples/server/petstore/typescript-nestjs-server/**
+ pull_request:
+ paths:
+ - samples/server/petstore/typescript-nestjs-server/**
+jobs:
+ build:
+ name: Build projects
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ node:
+ - "18.x"
+ - "20.x"
+ sample:
+ - samples/server/petstore/typescript-nestjs-server/
+ steps:
+ - uses: actions/checkout@v5
+ - name: Use Node.js 20.x
+ uses: actions/setup-node@v5
+ with:
+ node-version: ${{ matrix.node }}
+ cache: 'npm' # Or 'yarn'
+ - name: npm install
+ working-directory: ${{ matrix.sample }}
+ run: npm install
+ - name: npm test
+ working-directory: ${{ matrix.sample }}
+ run: npm test
diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml
index c4bb9f0ddd9e..d66b278d28db 100644
--- a/.github/workflows/windows.yaml
+++ b/.github/workflows/windows.yaml
@@ -24,6 +24,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
+ cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -39,7 +40,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Setup Maven
- uses: s4u/setup-maven-action@v1.18.0
+ uses: s4u/setup-maven-action@v1.19.0
with:
java-version: ${{ matrix.java }}
maven-version: 3.8.8
diff --git a/.gitignore b/.gitignore
index f2947eafd4a3..203a85a3de8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,7 @@ modules/openapi-generator-gradle-plugin/bin/
.classpath
lib/*
build/*
+.kotlin
generated-files/*
generated-sources/*
generated-code/*
@@ -48,6 +49,8 @@ nb-configuration.xml
*.xml~
*.t~
+**/.angular
+
/target
/generated-files
test-output/
diff --git a/CI/.travis.yml.bash b/CI/.travis.yml.bash
deleted file mode 100644
index a618399ff85f..000000000000
--- a/CI/.travis.yml.bash
+++ /dev/null
@@ -1,37 +0,0 @@
-sudo: required
-language: java
-jdk:
- - openjdk8
-
-cache:
- directories:
- - $HOME/.m2
- - $HOME/.ivy2
-
-services:
- - docker
-
-addons:
- hosts:
- - petstore.swagger.io
-
-before_install:
- # to run petstore server locally via docker
- - 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
- # Add bats test framework and cURL for Bash script integration tests
- - sudo add-apt-repository ppa:duggan/bats --yes
- - sudo apt-get update -qq
- - sudo apt-get install -qq bats
- - sudo apt-get install -qq curl
-
- # show host table to confirm petstore.swagger.io is mapped to localhost
- - cat /etc/hosts
-
-script:
- # fail fast
- - set -e
- # run integration tests defined in maven pom.xml
- - cp pom.xml.bash pom.xml
- - mvn --no-snapshot-updates --batch-mode verify -Psamples
diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh
index 6ab5ed3927c0..19ba36cee69f 100755
--- a/CI/circle_parallel.sh
+++ b/CI/circle_parallel.sh
@@ -11,43 +11,15 @@ export NODE_ENV=test
if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX ..."
- java -version
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
- #curl -sSLk https://get.haskellstack.org/ | sh
- #stack upgrade
- #stack --version
-
- # install curl
- #sudo apt-get -y build-dep libcurl4-gnutls-dev
- #sudo apt-get -y install libcurl4-gnutls-dev
-
- # Install golang version 1.18
- go version
- 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
+ echo "Running node $NODE_INDEX to test cpp-restsdk"
# install cpprestsdk
sudo apt-get install libcpprest-dev
@@ -56,87 +28,21 @@ elif [ "$NODE_INDEX" = "2" ]; then
sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true
source ~/.cpprc # activate cpp environment variables
- # run go integration tests
- (cd samples/client/petstore/go && mvn integration-test)
- (cd samples/openapi3/client/petstore/go && mvn integration-test)
- (cd samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false && mvn integration-test)
- (cd samples/client/others/go/allof_multiple_ref_and_discriminator && mvn integration-test)
(cd samples/client/petstore/cpp-restsdk/client && mvn integration-test)
elif [ "$NODE_INDEX" = "3" ]; then
echo "Running node $NODE_INDEX ... "
- # Install node@stable (for angular 6)
- set +e
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- export NVM_DIR="/opt/circleci/.nvm"
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
- #nvm install stable
- # install v16 instead of the latest stable version
- nvm install 18
- nvm alias default 18
- node --version
-
- # Each step uses the same `$BASH_ENV`, so need to modify it
- echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
- echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
-
- (cd samples/client/others/typescript-angular && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v17-provided-in-root && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v18-provided-in-root && mvn integration-test)
- (cd samples/client/petstore/typescript-angular-v19-provided-in-root && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/tests/jquery && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/builds/object_params && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/tests/object_params && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/builds/inversify && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/tests/inversify && mvn integration-test)
- #(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test)
- (cd samples/openapi3/client/petstore/typescript/builds/nullable-enum && mvn integration-test)
- (cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test)
- (cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test)
- (cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test)
- (cd samples/client/petstore/typescript-fetch/tests/default && mvn integration-test)
- (cd samples/client/petstore/typescript-node/npm && mvn integration-test)
- (cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test)
- (cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
- (cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
- (cd samples/client/petstore/typescript-axios/tests/with-complex-headers && mvn integration-test)
- (cd samples/client/petstore/javascript-flowtyped && mvn integration-test)
- (cd samples/client/petstore/javascript-es6 && mvn integration-test)
- (cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)
- (cd samples/server/petstore/typescript-nestjs-server && mvn integration-test)
+ 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)
else
echo "Running node $NODE_INDEX ..."
java -version
-
- (cd samples/client/petstore/scala-akka && mvn integration-test)
- (cd samples/client/petstore/scala-sttp && mvn integration-test)
- (cd samples/client/petstore/scala-sttp-circe && mvn integration-test)
- (cd samples/client/petstore/scala-sttp4 && mvn integration-test)
- (cd samples/client/petstore/clojure && mvn integration-test)
- (cd samples/client/petstore/java/jersey2-java8 && mvn integration-test)
- (cd samples/openapi3/client/petstore/java/jersey2-java8 && mvn integration-test)
- (cd samples/client/petstore/java/jersey3 && mvn integration-test)
- (cd samples/client/petstore/java/jersey3-oneOf && mvn integration-test)
- (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)
- (cd samples/client/petstore/java/resttemplate-jakarta && mvn integration-test)
+ ./mvnw clean install
fi
diff --git a/README.md b/README.md
index a624a9b3c34a..cec91889ca82 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,8 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.16.0`):
-[](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.18.0`):
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
[](https://app.bitrise.io/app/4a2b10a819d12b67)
@@ -150,8 +148,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
-| 7.16.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.16.0-SNAPSHOT/) | 22.09.2025 | Minor release with breaking changes (with fallback) |
-| [7.15.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.15.0) (latest stable release) | 22.08.2025 | Minor release with breaking changes (with fallback) |
+| 7.18.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 10.12.2025 | Minor release with breaking changes (with fallback) |
+| [7.17.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.17.0) (latest stable release) | 29.10.2025 | 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) |
@@ -214,16 +212,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.15.0/openapi-generator-cli-7.15.0.jar`
+JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
For **Mac/Linux** users:
```sh
-wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.15.0/openapi-generator-cli-7.15.0.jar -O openapi-generator-cli.jar
+wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.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.15.0/openapi-generator-cli-7.15.0.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -458,7 +456,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
-openapi-generator-cli version-manager set 7.15.0
+openapi-generator-cli version-manager set 7.17.0
```
Or install it as dev-dependency:
@@ -482,7 +480,7 @@ pip install openapi-generator-cli
To install a specific version
```
-pip install openapi-generator-cli==7.15.0
+pip install openapi-generator-cli==7.17.0
```
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
@@ -508,7 +506,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.15.0/openapi-generator-cli-7.15.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.17.0/openapi-generator-cli-7.17.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`
@@ -1143,6 +1141,7 @@ Here is a list of template creators:
* Haskell Servant: @algas
* Haskell Yesod: @yotsuya
* Java Camel: @carnevalegiacomo
+ * Java Dubbo: @redoom
* Java MSF4J: @sanjeewa-malalgoda
* Java Spring Boot: @diyfr
* Java Undertow: @stevehu
@@ -1183,6 +1182,7 @@ Here is a list of template creators:
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Scala Lagom: @gmkumar2005
* Scala Play: @adigerber
+ * TypeScript NestJS: @aryobenholzner
* Documentation
* AsciiDoc: @man-at-home
* HTML Doc 2: @jhitchcock
@@ -1259,7 +1259,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| JMeter | @kannkyo (2021/01) |
| Jetbrains HTTP Client | @jlengrand (2023/01) |
| Julia | @tanmaykm (2023/01) |
-| Kotlin | @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) |
+| Kotlin | @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) |
| Lua | @daurnimator (2017/08) |
| N4JS | @mmews-n4 (2023/03) |
| Nim | |
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 3c6471ae7a77..000000000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,119 +0,0 @@
-version: '{branch}-{build}'
-image: Visual Studio 2022
-hosts:
- petstore.swagger.io: 127.0.0.1
-install:
- - 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
- - cmd: java -version
- - cmd: dir/w
- - cmd: docker pull swaggerapi/petstore
- - cmd: docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- - ps: Start-Sleep -s 120
- - ps: $PSVersionTable.PSVersion
- - ps: Install-Module -Name Pester -Force -Scope CurrentUser -SkipPublisherCheck
-build_script:
- - dotnet --info
- # build C# aspnetcore 5.0 server
- #- dotnet build samples\server\petstore\aspnetcore-5.0\Org.OpenAPITools.sln
- ## build C# aspnetcore 3.1 server
- #- dotnet build samples\server\petstore\aspnetcore-3.1\Org.OpenAPITools.sln
- ## build C# aspnetcore 3.0 server
- #- dotnet build samples\server\petstore\aspnetcore-3.0\Org.OpenAPITools.sln
- ## build C# aspnetcore 2.2 server
- #- dotnet build samples\server\petstore\aspnetcore\Org.OpenAPITools.sln
- ## build C# API client (multiple frameworks)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClientCoreAndNet47\Org.OpenAPITools.sln
- ## build C# API client (httpclient)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClient-httpclient\Org.OpenAPITools.sln
- ## build C# API client (generichost)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClient-generichost-netstandard2.0\Org.OpenAPITools.sln
- ## build C# API client (netcore)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln
- #- dotnet build samples\client\petstore\csharp\OpenAPIClientCore\Org.OpenAPITools.sln
- ## build C# API client (.net framework 4.7)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClient-net47\Org.OpenAPITools.sln
- ## build C# API client (.net framework 4.8)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClient-net48\Org.OpenAPITools.sln
- ## build C# API client (.net 5.0)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClient-net5.0\Org.OpenAPITools.sln
- ## build C# API client (.net 5.0 with ConditionalSerialization)
- #- dotnet build samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln
-
-test_script:
- - dotnet test samples\client\petstore\csharp\generichost\latest\ComposedEnum\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\latest\InlineEnumAnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\latest\Tags\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\latest\HelloWorld\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\latest\OneOfList\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
-
- - 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
- - dotnet test samples\client\petstore\csharp\generichost\net8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net8\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net8\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net8\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net8\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
-
- - dotnet test samples\client\petstore\csharp\generichost\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
-
- - dotnet test samples\client\petstore\csharp\generichost\net4.8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
-
- - dotnet test samples\client\petstore\csharp\generichost\net4.7\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.7\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.7\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- - dotnet test samples\client\petstore\csharp\generichost\net4.7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
-
- - dotnet test samples\client\petstore\csharp\httpclient\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
-
- - 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\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
-
-### TODO: Execute all generators via powershell or other
- # generate all petstore clients
- # - .\bin\windows\run-all-petstore.cmd
- # generate all petstore clients (openapi3)
- # - .\bin\openapi3\windows\run-all-petstore.cmd
-
- # test ps petstore
- - ps: |
- cd samples\client\petstore\powershell\
- .\CIRunTest.ps1
-cache:
- - C:\maven\
- - C:\gradle\
- - C:\Users\appveyor\.m2
diff --git a/bin/configs/cpp-httplib-petstore.yaml b/bin/configs/cpp-httplib-petstore.yaml
new file mode 100644
index 000000000000..000c8967d7ed
--- /dev/null
+++ b/bin/configs/cpp-httplib-petstore.yaml
@@ -0,0 +1,9 @@
+generatorName: cpp-httplib-server
+outputDir: samples/server/petstore/cpp-httplib-server
+inputSpec: modules/openapi-generator/src/test/resources/3_0/cpp-httplib-server/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/cpp-httplib-server
+additionalProperties:
+ apiNamespace: "petstore::openapi::api"
+ modelNamespace: "petstore::openapi::model"
+ projectName: "petStoreProject"
+ addApiImplStubs: true
diff --git a/bin/configs/csharp-httpclient-net9-nonPublicApi.yaml b/bin/configs/csharp-httpclient-net9-nonPublicApi.yaml
new file mode 100644
index 000000000000..8f561dd0026e
--- /dev/null
+++ b/bin/configs/csharp-httpclient-net9-nonPublicApi.yaml
@@ -0,0 +1,14 @@
+# for .net standard httpclient
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-addpet-only.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
+ nonPublicApi: true
diff --git a/bin/configs/csharp-restsharp-netstandard2.0.yaml b/bin/configs/csharp-restsharp-netstandard2.0.yaml
index c4a6d05757d3..f4b8e5502353 100644
--- a/bin/configs/csharp-restsharp-netstandard2.0.yaml
+++ b/bin/configs/csharp-restsharp-netstandard2.0.yaml
@@ -2,7 +2,7 @@
generatorName: csharp
library: restsharp
outputDir: samples/client/petstore/csharp/restsharp/standard2.0/Petstore
-inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types-localhost.yaml
templateDir: modules/openapi-generator/src/main/resources/csharp
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
diff --git a/bin/configs/dart-dio-petstore-timemachine.yaml b/bin/configs/dart-dio-petstore-timemachine.yaml
new file mode 100644
index 000000000000..d3243a135312
--- /dev/null
+++ b/bin/configs/dart-dio-petstore-timemachine.yaml
@@ -0,0 +1,14 @@
+generatorName: dart-dio
+outputDir: samples/openapi3/client/petstore/dart-dio/petstore-timemachine
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/dart/libraries/dio
+typeMappings:
+ Client: "ModelClient"
+ File: "ModelFile"
+ EnumClass: "ModelEnumClass"
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ enumUnknownDefaultCase: "true"
+ dateLibrary: "timemachine"
+reservedWordsMappings:
+ class: "classField"
diff --git a/bin/configs/go-petstore-oas2.yaml b/bin/configs/go-petstore-oas2.yaml
index 18cb77a9c250..31f3436cf270 100644
--- a/bin/configs/go-petstore-oas2.yaml
+++ b/bin/configs/go-petstore-oas2.yaml
@@ -1,6 +1,6 @@
generatorName: go
outputDir: samples/client/petstore/go/go-petstore
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-localhost.yaml
templateDir: modules/openapi-generator/src/main/resources/go
additionalProperties:
packageName: petstore
diff --git a/bin/configs/go-server-optional-body.yaml b/bin/configs/go-server-optional-body.yaml
new file mode 100644
index 000000000000..4dc5cea0aa22
--- /dev/null
+++ b/bin/configs/go-server-optional-body.yaml
@@ -0,0 +1,8 @@
+generatorName: go-server
+outputDir: samples/server/others/go-server/optional-body
+inputSpec: modules/openapi-generator/src/test/resources/3_0/optional_body.yaml
+templateDir: modules/openapi-generator/src/main/resources/go-server
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ packageName: petstoreserver
+ addResponseHeaders: true
diff --git a/bin/configs/java-dubbo-server.yaml b/bin/configs/java-dubbo-server.yaml
new file mode 100644
index 000000000000..1b285d67f702
--- /dev/null
+++ b/bin/configs/java-dubbo-server.yaml
@@ -0,0 +1,15 @@
+generatorName: java-dubbo
+outputDir: samples/server/petstore/java-dubbo
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/java-dubbo
+additionalProperties:
+ hideGenerationTimestamp: "true"
+ artifactId: openapi-dubbo-server-petstore
+ basePackage: "org.openapitools.example"
+ title: "OpenAPI Petstore"
+ serviceInterface: true
+ serviceImplementation: true
+ useTags: true
+ dubboVersion: "3.2.18"
+ javaVersion: "17"
+ registryAddress: "zookeeper://127.0.0.1:2181"
diff --git a/bin/configs/jaxrs-cxf-client-swagger2.yaml b/bin/configs/jaxrs-cxf-client-swagger2.yaml
new file mode 100644
index 000000000000..7efef0f734a9
--- /dev/null
+++ b/bin/configs/jaxrs-cxf-client-swagger2.yaml
@@ -0,0 +1,8 @@
+generatorName: jaxrs-cxf-client
+outputDir: samples/client/petstore/jaxrs-cxf-client-swagger2
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf
+additionalProperties:
+ artifactId: jaxrs-cxf-petstore-swagger2
+ documentationProvider: swagger2
+ annotationLibrary: swagger2
diff --git a/bin/configs/jaxrs-spec-swagger-annotations.yaml b/bin/configs/jaxrs-spec-swagger-annotations.yaml
new file mode 100644
index 000000000000..32b94175c667
--- /dev/null
+++ b/bin/configs/jaxrs-spec-swagger-annotations.yaml
@@ -0,0 +1,11 @@
+generatorName: jaxrs-spec
+outputDir: samples/server/petstore/jaxrs-spec-swagger-annotations
+inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
+additionalProperties:
+ artifactId: jaxrs-spec-petstore-server
+ serializableModel: "true"
+ hideGenerationTimestamp: "true"
+ implicitHeadersRegex: (api_key|enum_header_string)
+ generateBuilders: "true"
+ useSwaggerAnnotations: "true"
diff --git a/bin/configs/jaxrs-spec-swagger-v3-annotations-jakarta.yaml b/bin/configs/jaxrs-spec-swagger-v3-annotations-jakarta.yaml
new file mode 100644
index 000000000000..45176fa3384f
--- /dev/null
+++ b/bin/configs/jaxrs-spec-swagger-v3-annotations-jakarta.yaml
@@ -0,0 +1,12 @@
+generatorName: jaxrs-spec
+outputDir: samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta
+inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
+additionalProperties:
+ artifactId: jaxrs-spec-petstore-server-jakarta-swagger-v3
+ serializableModel: "true"
+ hideGenerationTimestamp: "true"
+ implicitHeadersRegex: (api_key|enum_header_string)
+ generateBuilders: "true"
+ useSwaggerV3Annotations: "true"
+ useJakartaEe: "true"
diff --git a/bin/configs/jaxrs-spec-swagger-v3-annotations.yaml b/bin/configs/jaxrs-spec-swagger-v3-annotations.yaml
new file mode 100644
index 000000000000..903753fa5e2f
--- /dev/null
+++ b/bin/configs/jaxrs-spec-swagger-v3-annotations.yaml
@@ -0,0 +1,11 @@
+generatorName: jaxrs-spec
+outputDir: samples/server/petstore/jaxrs-spec-swagger-v3-annotations
+inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
+additionalProperties:
+ artifactId: jaxrs-spec-petstore-server
+ serializableModel: "true"
+ hideGenerationTimestamp: "true"
+ implicitHeadersRegex: (api_key|enum_header_string)
+ generateBuilders: "true"
+ useSwaggerV3Annotations: "true"
diff --git a/bin/configs/jaxrs-spec-withxml.yaml b/bin/configs/jaxrs-spec-withxml.yaml
new file mode 100644
index 000000000000..f893491fc9fb
--- /dev/null
+++ b/bin/configs/jaxrs-spec-withxml.yaml
@@ -0,0 +1,10 @@
+generatorName: jaxrs-spec
+outputDir: samples/server/petstore/jaxrs-spec-withxml/
+inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
+additionalProperties:
+ artifactId: jaxrs-spec-withxml-petstore-server
+ serializableModel: "true"
+ hideGenerationTimestamp: "true"
+ generateBuilders: "true"
+ withXml: true
diff --git a/bin/configs/kotlin-array-integer-enum.yaml b/bin/configs/kotlin-array-integer-enum.yaml
new file mode 100644
index 000000000000..8b802b8d8298
--- /dev/null
+++ b/bin/configs/kotlin-array-integer-enum.yaml
@@ -0,0 +1,8 @@
+generatorName: kotlin
+outputDir: samples/client/petstore/kotlin-array-integer-enum
+inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/issue15204-int-array-enum.yaml
+templateDir: modules/openapi-generator/src/main/resources/kotlin-client
+additionalProperties:
+ artifactId: kotlin-array-integer-enum
+ serializableModel: "true"
+ dateLibrary: java8
diff --git a/bin/configs/kotlin-jvm-ktor-gson.yaml b/bin/configs/kotlin-jvm-ktor-gson.yaml
index 6b8bd62f644c..4a122905f6c4 100644
--- a/bin/configs/kotlin-jvm-ktor-gson.yaml
+++ b/bin/configs/kotlin-jvm-ktor-gson.yaml
@@ -1,7 +1,7 @@
generatorName: kotlin
outputDir: samples/client/petstore/kotlin-jvm-ktor-gson
library: jvm-ktor
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties:
artifactId: kotlin-petstore-jvm-ktor-gson
diff --git a/bin/configs/kotlin-spring-boot-additionalproperties.yaml b/bin/configs/kotlin-spring-boot-additionalproperties.yaml
new file mode 100644
index 000000000000..3c3275fce2fa
--- /dev/null
+++ b/bin/configs/kotlin-spring-boot-additionalproperties.yaml
@@ -0,0 +1,14 @@
+generatorName: kotlin-spring
+outputDir: samples/server/petstore/kotlin-springboot-additionalproperties
+library: spring-boot
+inputSpec: samples/server/petstore/kotlin-springboot-additionalproperties/src/main/resources/openapi.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"
+ requestMappingMode: api_interface
diff --git a/bin/configs/kotlin-spring-boot-x-kotlin-implements.yaml b/bin/configs/kotlin-spring-boot-x-kotlin-implements.yaml
new file mode 100644
index 000000000000..c4068770d55d
--- /dev/null
+++ b/bin/configs/kotlin-spring-boot-x-kotlin-implements.yaml
@@ -0,0 +1,14 @@
+generatorName: kotlin-spring
+outputDir: samples/server/petstore/kotlin-springboot-x-kotlin-implements
+library: spring-boot
+inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/petstore-with-x-kotlin-implements.yaml
+templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
+additionalProperties:
+ documentationProvider: none
+ annotationLibrary: none
+ useSwaggerUI: "false"
+ serviceImplementation: "false"
+ skipDefaultInterface: "true"
+ interfaceOnly: "true"
+ serializableModel: "true"
+ beanValidations: "true"
diff --git a/bin/configs/python-httpx.yaml b/bin/configs/python-httpx.yaml
new file mode 100644
index 000000000000..afc0b04ee9c0
--- /dev/null
+++ b/bin/configs/python-httpx.yaml
@@ -0,0 +1,15 @@
+generatorName: python
+outputDir: samples/openapi3/client/petstore/python-httpx
+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
+library: httpx
+additionalProperties:
+ packageName: petstore_api
+ mapNumberTo: float
+ poetry1: false
+nameMappings:
+ _type: underscore_type
+ type_: type_with_underscore
+modelNameMappings:
+ # The OpenAPI spec ApiResponse conflicts with the internal ApiResponse
+ ApiResponse: ModelApiResponse
diff --git a/bin/configs/python-lazyImports.yaml b/bin/configs/python-lazyImports.yaml
new file mode 100644
index 000000000000..88c0b631cafe
--- /dev/null
+++ b/bin/configs/python-lazyImports.yaml
@@ -0,0 +1,18 @@
+generatorName: python
+outputDir: samples/openapi3/client/petstore/python-lazyImports
+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
+additionalProperties:
+ packageName: petstore_api
+ useOneOfDiscriminatorLookup: "true"
+ disallowAdditionalPropertiesIfNotPresent: false
+ mapNumberTo: StrictFloat
+ lazyImports: 'true'
+nameMappings:
+ _type: underscore_type
+ type_: type_with_underscore
+modelNameMappings:
+ # The OpenAPI spec ApiResponse conflicts with the internal ApiResponse
+ ApiResponse: ModelApiResponse
+openapiNormalizer:
+ SIMPLIFY_ONEOF_ANYOF_ENUM: false
diff --git a/bin/configs/ruby-faraday.yaml b/bin/configs/ruby-faraday.yaml
index b289ae977f48..7e7731d61461 100644
--- a/bin/configs/ruby-faraday.yaml
+++ b/bin/configs/ruby-faraday.yaml
@@ -1,7 +1,7 @@
generatorName: ruby
outputDir: samples/client/petstore/ruby-faraday
library: faraday
-inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/ruby/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/ruby-client
additionalProperties:
gemVersion: 1.0.0
diff --git a/bin/configs/rust-reqwest-enum-query-params.yaml b/bin/configs/rust-reqwest-enum-query-params.yaml
new file mode 100644
index 000000000000..db7adb03233f
--- /dev/null
+++ b/bin/configs/rust-reqwest-enum-query-params.yaml
@@ -0,0 +1,8 @@
+generatorName: rust
+outputDir: samples/client/others/rust/reqwest/enum-query-params
+library: reqwest
+inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/enum-query-params.yaml
+templateDir: modules/openapi-generator/src/main/resources/rust
+additionalProperties:
+ supportAsync: true
+ packageName: enum-query-params-reqwest
diff --git a/bin/configs/spring-boot-oneof-interface.yaml b/bin/configs/spring-boot-oneof-interface.yaml
new file mode 100644
index 000000000000..a66a2c4bfc97
--- /dev/null
+++ b/bin/configs/spring-boot-oneof-interface.yaml
@@ -0,0 +1,12 @@
+generatorName: spring
+outputDir: samples/openapi3/server/petstore/spring-boot-oneof-interface
+inputSpec: modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ groupId: org.openapitools.openapi3
+ documentationProvider: springdoc
+ artifactId: springboot-oneof
+ snapshotVersion: "true"
+ hideGenerationTimestamp: "true"
+ useOneOfInterfaces: "true"
+ useDeductionForOneOfInterfaces: "true"
diff --git a/bin/configs/typescript-angular-v19-provided-in-root.yaml b/bin/configs/typescript-angular-v19-provided-in-root.yaml
new file mode 100644
index 000000000000..f4f2fb24489c
--- /dev/null
+++ b/bin/configs/typescript-angular-v19-provided-in-root.yaml
@@ -0,0 +1,9 @@
+generatorName: typescript-angular
+outputDir: samples/client/petstore/typescript-angular-v19-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: 19.0.0
+ supportsES6: true
+enumNameMappings:
+ delivered: SHIPPED
diff --git a/bin/configs/typescript-angular-v20-provided-in-root.yaml b/bin/configs/typescript-angular-v20-provided-in-root.yaml
new file mode 100644
index 000000000000..d19d5778f695
--- /dev/null
+++ b/bin/configs/typescript-angular-v20-provided-in-root.yaml
@@ -0,0 +1,9 @@
+generatorName: typescript-angular
+outputDir: samples/client/petstore/typescript-angular-v20-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: 20.0.0
+ supportsES6: true
+enumNameMappings:
+ delivered: SHIPPED
diff --git a/bin/configs/typescript-fetch-infinite-recursion-issue.yaml b/bin/configs/typescript-fetch-infinite-recursion-issue.yaml
new file mode 100644
index 000000000000..d8882b00031b
--- /dev/null
+++ b/bin/configs/typescript-fetch-infinite-recursion-issue.yaml
@@ -0,0 +1,7 @@
+generatorName: typescript-fetch
+outputDir: samples/client/others/typescript-fetch/infinite-recursion-issue
+inputSpec: modules/openapi-generator/src/test/resources/3_0/typescript-fetch/infinite-recursion-issue.yaml
+templateDir: modules/openapi-generator/src/main/resources/typescript-fetch
+additionalProperties:
+ enumPropertyNaming: "original"
+ enumUnknownDefaultCase: true
diff --git a/bin/configs/unmaintained/scala-lagom-server.yaml b/bin/configs/unmaintained/scala-lagom-server.yaml
deleted file mode 100644
index 8aabf4b0fd08..000000000000
--- a/bin/configs/unmaintained/scala-lagom-server.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-systemProperties:
- skipFormModel: "true"
-generatorName: scala-lagom-server
-outputDir: samples/server/petstore/scala-lagom-server
-inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/scala-lagom-server
diff --git a/bin/utils/dart-keywords/README.md b/bin/utils/dart-keywords/README.md
index 2d14a81b61d7..8b414c77f411 100644
--- a/bin/utils/dart-keywords/README.md
+++ b/bin/utils/dart-keywords/README.md
@@ -5,11 +5,11 @@ Running `./save_dart_keywords.sh` from this directory will generate `dart-keywor
## When should the keywords be generated?
-`save_dart_keywords.sh` should be run when a new version of Dart is release to update the keywords file.
+`save_dart_keywords.sh` should be run when a new version of Dart is released to update the keywords file.
The last Dart version that was used to generate the keywords can be found in `dart-version.txt`.
-## What does the shellscript do?
+## What does the shell script do?
1. run the dart app
- `dart run save-dart-keywords.dart`
diff --git a/bin/utils/test_file_list.yaml b/bin/utils/test_file_list.yaml
index 1d0fb391de09..fbabb57e270e 100644
--- a/bin/utils/test_file_list.yaml
+++ b/bin/utils/test_file_list.yaml
@@ -31,10 +31,10 @@
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/jersey3/src/test/java/org/openapitools/client/MammalTest.java"
+ sha256: a09c120b694788b12f8d73cc0dd307e509ee1744b2ff45c5711b1186c419f915
+- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/ZebraTest.java"
+ sha256: 15e509d8cb8e9b050c6418cfbf8a5dced9acc97cf29e5727da9f907c52d11f1e
- 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"
@@ -59,6 +59,6 @@
sha256: 45cdaba3d2adc212cd4f0184ad475419a95e2326254c2ef84175e210c922b2f3
# rust axum test files
- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
- sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
+ sha256: b2093528aac971193f2863a70f46eea45cf8bda79120b133a614599e80d8b46d
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
- sha256: e72fbf81a9849dc7abb7e2169f2fc355c8b1cf991c0e2ffc083126abd9e966e7
+ sha256: 1d3fb01f65e98290b1d3eece28014c7d3e3f2fdf18e7110249d3c591cc4642ab
diff --git a/docs/customization.md b/docs/customization.md
index acb45936fd21..ffff0188e96d 100644
--- a/docs/customization.md
+++ b/docs/customization.md
@@ -538,6 +538,7 @@ OpenAPI Normalizer transforms the input OpenAPI doc/spec (which may not perfectl
- SIMPLIFY_ONEOF_ANYOF
- SIMPLIFY_BOOLEAN_ENUM
+- REFACTOR_ALLOF_WITH_PROPERTIES_ONLY
(One can use `DISABLE_ALL=true` to disable all the rules)
@@ -643,9 +644,16 @@ Example:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/required-properties.yaml -o /tmp/java-okhttp/ --openapi-normalizer NORMALIZER_CLASS=org.openapitools.codegen.OpenAPINormalizerTest$RemoveRequiredNormalizer
```
+- `REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT`: When set to true, remove the "properties" of a schema with type other than "object".
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/required-properties.yaml -o /tmp/java-okhttp/ --openapi-normalizer REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT=true
+```
+
- `FILTER`
-The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated.
+The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated. Multiple filters can be separated by a semicolon.
### Available Filters
@@ -658,6 +666,9 @@ The `FILTER` parameter allows selective inclusion of API operations based on spe
- **`tag`**
When set to `tag:person|basic`, operations **not** tagged with `person` or `basic` will be marked as internal (`x-internal: true`), and will not be generated.
+- **`path`**
+ When set to `path:/v1|/v2`, operations on paths **not** starting with `/v1` or with `/v2` will be marked as internal (`x-internal: true`), and will not be generated.
+
### Example Usage
```sh
@@ -665,7 +676,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
-g java \
-i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-o /tmp/java-okhttp/ \
- --openapi-normalizer FILTER="operationId:addPet|getPetById"
+ --openapi-normalizer FILTER="operationId:addPet|getPetById ; tag:store"
```
- `SET_CONTAINER_TO_NULLABLE`: When set to `array|set|map` (or just `array`) for example, it will set `nullable` in array, set and map to true.
diff --git a/docs/debugging.md b/docs/debugging.md
index 76ad96de1867..da8904132daa 100644
--- a/docs/debugging.md
+++ b/docs/debugging.md
@@ -5,7 +5,7 @@ title: Debugging
## Generation
-As a user there may be times when generated outputs don't match your expectations it's unclear why. The CLI supports a `--dry-run` option which may be used to inspect the anticipated file operations without making changes to the file system.
+As a user there may be times when generated outputs don't match your expectations and it's unclear why. The CLI supports a `--dry-run` option which may be used to inspect the anticipated file operations without making changes to the file system.
Suppose you generate using the `--minimal-update` option, and you notice on subsequent generations of a client that no files have changed. This is by design.
diff --git a/docs/generators.md b/docs/generators.md
index da5ce3851550..436db03d94b2 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -3,6 +3,7 @@ id: generators
title: Generators List
---
+[main] INFO o.o.c.l.PythonFastAPIServerCodegen - Skipping sorting of path operations, order matters, let the developer decide via their specification file.
The following generators are available:
## CLIENT generators
@@ -12,7 +13,6 @@ The following generators are available:
* [bash](generators/bash.md)
* [c](generators/c.md)
* [clojure](generators/clojure.md)
-* [cpp-oatpp-client](generators/cpp-oatpp-client.md)
* [cpp-qt-client](generators/cpp-qt-client.md)
* [cpp-restsdk](generators/cpp-restsdk.md)
* [cpp-tiny (beta)](generators/cpp-tiny.md)
@@ -65,11 +65,10 @@ The following generators are available:
* [scala-pekko](generators/scala-pekko.md)
* [scala-sttp](generators/scala-sttp.md)
* [scala-sttp4 (beta)](generators/scala-sttp4.md)
-* [scala-sttp4-jsoniter (beta)](generators/scala-sttp4-jsoniter.md)
* [scalaz](generators/scalaz.md)
* [swift-combine](generators/swift-combine.md)
* [swift5](generators/swift5.md)
-* [swift6](generators/swift6.md)
+* [swift6 (beta)](generators/swift6.md)
* [typescript (experimental)](generators/typescript.md)
* [typescript-angular](generators/typescript-angular.md)
* [typescript-aurelia](generators/typescript-aurelia.md)
@@ -106,6 +105,7 @@ The following generators are available:
* [haskell](generators/haskell.md)
* [haskell-yesod (beta)](generators/haskell-yesod.md)
* [java-camel](generators/java-camel.md)
+* [java-dubbo (beta)](generators/java-dubbo.md)
* [java-helidon-server (beta)](generators/java-helidon-server.md)
* [java-inflector](generators/java-inflector.md)
* [java-micronaut-server (beta)](generators/java-micronaut-server.md)
@@ -150,11 +150,10 @@ The following generators are available:
* [scala-cask](generators/scala-cask.md)
* [scala-finch](generators/scala-finch.md)
* [scala-http4s-server](generators/scala-http4s-server.md)
-* [scala-lagom-server](generators/scala-lagom-server.md)
+* [scala-lagom-server-deprecated (deprecated)](generators/scala-lagom-server-deprecated.md)
* [scala-play-server](generators/scala-play-server.md)
* [scalatra](generators/scalatra.md)
* [spring](generators/spring.md)
-* [typescript-nestjs-server (beta)](generators/typescript-nestjs-server.md)
## DOCUMENTATION generators
diff --git a/docs/generators/cpp-httplib-server.md b/docs/generators/cpp-httplib-server.md
new file mode 100644
index 000000000000..7a7ccfbf9913
--- /dev/null
+++ b/docs/generators/cpp-httplib-server.md
@@ -0,0 +1,545 @@
+---
+title: Documentation for the cpp-httplib-server Generator
+---
+
+## METADATA
+
+| Property | Value | Notes |
+| -------- | ----- | ----- |
+| generator name | cpp-httplib-server | pass this to the generate command after -g |
+| generator stability | STABLE | |
+| generator type | SERVER | |
+| generator language | C++ | |
+| generator default templating engine | mustache | |
+| helpTxt | Generates a C++ server using the httplib library. | |
+
+## OVERVIEW
+
+The cpp-httplib-server generator creates a modern C++17/20 server implementation using the [httplib](https://github.com/yhirose/cpp-httplib) library. This generator produces:
+
+- **Type-safe API handlers** with std::variant-based response types
+- **Model classes** with JSON serialization/deserialization using nlohmann::json
+- **CMake build configuration** for easy compilation
+- **Automatic error handling** with proper HTTP status codes
+- **Namespace organization** for clean code structure
+
+### Key Features
+
+- **Modern C++ Standards**: Uses C++17+ features like std::variant, std::optional
+- **Type Safety**: Compile-time type checking for request/response handling
+- **JSON Integration**: Built-in JSON serialization with nlohmann::json
+- **Error Handling**: Automatic HTTP error response generation
+- **Lightweight**: Uses httplib for minimal dependencies
+- **Cross-platform**: Works on Windows, Linux, and macOS
+
+## GENERATED CODE STRUCTURE
+
+```
+generated/
+├── CMakeLists.txt # Build configuration
+├── README.md # Project documentation
+├── api/ # API handler classes
+│ ├── PetApi.h # API header with virtual methods
+│ └── PetApi.cpp # Route registration and request handling
+└── model/ # Data model classes
+ ├── Pet.h # Model header with JSON methods
+ └── Pet.cpp # Model implementation
+```
+
+### Generated API Handler Features
+- **Type aliases**: Only generated for operations with response schemas
+- **Virtual methods**: Return variants for schema-based operations, void for others
+- **Route registration**: Automatic HTTP method and path binding
+- **Exception handling**: Built-in JSON parsing and error response generation
+
+## CONFIG OPTIONS
+
+These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
+
+| Option | Description | Values | Default |
+| ------ | ----------- | ------ | ------- |
+| projectName | Name of the generated C++ project | string | cpp-httplib-server |
+| modelNamespace | Namespace for model classes | string | model |
+| apiNamespace | Namespace for API classes | string | api |
+| enumNamespace | Namespace for enum classes | string | enum |
+| licenseHeader | Custom license header for generated files | string | OpenAPI Generator default |
+| stripPathFromClassName | Enable path-based class name generation | boolean | false |
+
+## TYPE MAPPINGS
+
+The generator maps OpenAPI types to modern C++ types:
+
+| OpenAPI Type | C++ Type | Notes |
+| ------------ | -------- | ----- |
+| integer | int | 32-bit signed integer |
+| long | long | 64-bit signed integer |
+| float | float | 32-bit floating point |
+| double | double | 64-bit floating point |
+| number | double | Default numeric type |
+| boolean | bool | C++ boolean |
+| string | std::string | Standard string |
+| byte | unsigned char | Single byte |
+| binary | std::string | Binary data as string |
+| date | std::string | ISO 8601 date string |
+| date-time | std::string | ISO 8601 datetime string |
+| password | std::string | Password field |
+| object | nlohmann::json | Generic JSON object |
+| array | std::vector\ | Dynamic array |
+| file | std::string | File path or content |
+
+## ADVANCED TYPE FEATURES
+
+### Nullable Types
+Nullable properties are automatically wrapped in `std::optional`:
+```cpp
+std::optional optionalField;
+```
+
+### Response Types
+Each API endpoint generates a type-safe response based on the OpenAPI schema:
+
+**Operations with response schemas:**
+```cpp
+using PetResponse = std::variant<
+ model::Pet, // 200 success (custom model with schema)
+ std::string // 400 bad request (primitive type with schema)
+>;
+```
+
+**Operations without response schemas:**
+```cpp
+// No response type alias generated - handler returns void
+virtual void handleDeleteForPet(const model::DeletePetRequest& request) = 0;
+```
+
+### Container Types
+- **Arrays**: `std::vector`
+- **Maps**: `std::map`
+- **oneOf**: `std::variant`
+- **anyOf**: `std::any` (for flexible types)
+
+## NAMESPACE ORGANIZATION
+
+The generator creates a clean namespace hierarchy:
+
+```cpp
+namespace model {
+ class Pet { /* ... */ };
+ class User { /* ... */ };
+}
+
+namespace api {
+ class PetApi { /* ... */ };
+ class UserApi { /* ... */ };
+}
+```
+
+## ERROR HANDLING INNOVATIONS
+
+### Schema-Based Response Generation
+The generator only includes responses that have defined schemas in the OpenAPI specification:
+
+- **With custom schema**: Uses the specific model type (e.g., `model::ErrorResponse`)
+- **With primitive schema**: Uses the primitive C++ type (e.g., `std::string`, `int`)
+- **Without schema**: No response type generated - handler returns `void`
+
+This approach ensures:
+- **Type Safety**: Only meaningful data types are included in variants
+- **Simplicity**: No artificial wrapper types for schema-less responses
+- **Clarity**: Handlers only deal with actual response data structures defined in the API
+
+### Response Handler Generation
+- **Operations with schemas**: Generate `std::variant` return types and handler methods
+- **Operations without schemas**: Generate `void` handler methods with automatic status code handling
+- **Mixed operations**: Only schema-defined responses appear in the variant
+
+### Automatic Exception Handling
+Generated route handlers include comprehensive exception handling:
+- JSON parse errors → 400 Bad Request
+- General exceptions → 500 Internal Server Error
+- Custom error responses based on OpenAPI spec
+
+### Handler Method Patterns
+
+**Variant-based handlers** (operations with response schemas):
+```cpp
+PetResponse handleGetForPet(const model::GetPetRequest& request) override {
+ // Return success type or error types from the variant
+ return model::Pet{}; // or return std::string{"error message"};
+}
+```
+
+**Void handlers** (operations without response schemas):
+```cpp
+void handleDeleteForPet(const model::DeletePetRequest& request) override {
+ // No response schemas defined - HTTP status handled automatically
+ // Delete operation logic here
+ deletePetFromDatabase(request.getPetId());
+}
+```
+
+## CUSTOM MODIFICATIONS
+
+### Path-Based Class Naming
+When `stripPathFromClassName=true`, the generator intelligently extracts class names from API paths:
+
+- `/api/v1/pets/{id}` → `PetsApi`, `handleGetForPets()`
+- `/users/profile` → `ProfileApi`, `handlePostForProfile()`
+
+### String Conversion Enhancements
+The generator includes robust string conversion utilities:
+- Handles camelCase, PascalCase, snake_case
+- Splits on multiple delimiters: `/`, `_`, `-`, spaces, camelCase boundaries
+- Sanitizes invalid characters for C++ identifiers
+
+### Model Preprocessing
+Automatic schema title generation for better class names:
+- Inline request schemas: `{operationId}Request`
+- Inline response schemas: `{operationId}Response{statusCode}`
+- Nested object properties: `{parentName}_{propertyName}`
+
+## IMPORT MAPPING
+
+Standard C++ library includes are automatically generated:
+
+| C++ Type | Include |
+| -------- | ------- |
+| std::string | #include \ |
+| std::vector | #include \ |
+| std::map | #include \