Compare commits

..

1 Commits

Author SHA1 Message Date
William Cheng
587d4b0679 set disallowAdditionalPropertiesIfNotPresent to false as default 2023-09-13 11:24:31 +08:00
8056 changed files with 120354 additions and 386152 deletions

View File

@@ -57,43 +57,54 @@ commands: # a reusable command with parameters
- run: docker ps -a - run: docker ps -a
- run: sleep 30 - run: sleep 30
- run: cat /etc/hosts - run: cat /etc/hosts
- run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # Test
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: - run:
name: "Setup custom environment variables" name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh - run: ./CI/circle_parallel.sh
# Save dependency cache # Save dependency cache
#- save_cache: - save_cache:
# key: source-v2-{{ .Branch }}-{{ .Revision }} key: source-v2-{{ .Branch }}-{{ .Revision }}
# paths: paths:
# # This is a broad list of cache paths to include many possible development environments # This is a broad list of cache paths to include many possible development environments
# # You can probably delete some of these entries # You can probably delete some of these entries
# - ~/.m2 - vendor/bundle
# - ~/.ivy2 - ~/.nvm
# - ~/.sbt - ~/.pyenv
# - ~/.bundle - ~/virtualenvs
# - ~/.go_workspace - ~/.m2
# - ~/.gradle - ~/.ivy2
# - ".git" - ~/.sbt
# - ~/.stack - ~/.bundle
# - ~/R - ~/.go_workspace
## save "default" cache using the key "source-v2-" - ~/.gradle
#- save_cache: - ~/.cache/bower
# key: source-v2- - ".git"
# paths: - ~/.stack
# # This is a broad list of cache paths to include many possible development environments - /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
# # You can probably delete some of these entries - ~/R
# - vendor/bundle # save "default" cache using the key "source-v2-"
# - ~/.m2 - save_cache:
# - ~/.ivy2 key: source-v2-
# - ~/.sbt paths:
# - ~/.bundle # This is a broad list of cache paths to include many possible development environments
# - ~/.go_workspace # You can probably delete some of these entries
# - ~/.gradle - vendor/bundle
# - ~/.cache/bower - ~/.nvm
# - ".git" - ~/.pyenv
# - ~/.stack - ~/virtualenvs
# - ~/R - ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# Teardown # Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results # Save test results

View File

@@ -9,12 +9,7 @@
"ghcr.io/devcontainers/features/node:1": { "ghcr.io/devcontainers/features/node:1": {
"version": "lts" "version": "lts"
}, },
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {}, "ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {}
"docker-in-docker": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion": "v1"
}
}, },
// Configure tool-specific properties. // Configure tool-specific properties.
"customizations": { "customizations": {
@@ -49,4 +44,4 @@
// "postCreateCommand": "mvn clean package -DskipTests", // "postCreateCommand": "mvn clean package -DskipTests",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode" "remoteUser": "vscode"
} }

2
.envrc
View File

@@ -1 +1 @@
has nix && use flake use flake

View File

@@ -319,6 +319,12 @@
"Client: Java" "Client: Java"
] ]
}, },
{
"input": "java-petstore-jersey1.sh",
"matches": [
"Client: Java"
]
},
{ {
"input": "java-petstore-jersey2-java6.sh", "input": "java-petstore-jersey2-java6.sh",
"matches": [ "matches": [
@@ -578,6 +584,18 @@
"Server: Java" "Server: Java"
] ]
}, },
{
"input": "jaxrs-jersey1-petstore-server.sh",
"matches": [
"Server: Java"
]
},
{
"input": "jaxrs-jersey1-usetags-petstore-server.sh",
"matches": [
"Server: Java"
]
},
{ {
"input": "jaxrs-petstore-server-datelib-j8.sh", "input": "jaxrs-petstore-server-datelib-j8.sh",
"matches": [ "matches": [

6
.github/CODEOWNERS vendored
View File

@@ -29,5 +29,7 @@ modules/openapi-generator-gradle-plugin/**/* @jimschubert
modules/openapi-generator-maven-plugin/**/* @jimschubert modules/openapi-generator-maven-plugin/**/* @jimschubert
# Martin Delille # Martin Delille
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille /Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtClientCodegen.java @martindelille
samples/client/petstore/cpp-qt/**/* @martindelille /Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtAbstractCodegen.java @martindelille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/resources/cpp-qt-client @martindelille
/Users/martin/dev/clone/openapi-generator/samples/client/petstore/cpp-qt @martindelille

View File

@@ -8,14 +8,18 @@
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples: - [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
``` ```
./mvnw clean package ./mvnw clean package
./bin/generate-samples.sh ./bin/configs/*.yaml ./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh ./bin/utils/export_docs_generators.sh
``` ```
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
Commit all changed files. Commit all changed files.
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution. These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.1.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks) - [ ] In case you are adding a new generator, run the following additional script :
```
./bin/utils/ensure-up-to-date
```
Commit all changed files.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (7.0.1 - patch release), `7.1.x` (minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request. - [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.

View File

@@ -1,7 +1,6 @@
name: Docker tests name: Docker tests
on: on:
workflow_dispatch:
push: push:
paths: paths:
- Dockerfile - Dockerfile
@@ -9,8 +8,6 @@ on:
- pom.xml - pom.xml
- modules/openapi-generator-online/pom.xml - modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile - modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
pull_request: pull_request:
paths: paths:
- Dockerfile - Dockerfile
@@ -18,8 +15,6 @@ on:
- pom.xml - pom.xml
- modules/openapi-generator-online/pom.xml - modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile - modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
jobs: jobs:
build: build:
name: 'Build: Docker' name: 'Build: Docker'
@@ -32,7 +27,7 @@ jobs:
shell: bash shell: bash
run: | run: |
sed -i 's/ -it / /g' run-in-docker.sh sed -i 's/ -it / /g' run-in-docker.sh
./run-in-docker.sh mvn -B clean install ./run-in-docker.sh mvn clean install
- name: Build Dockerfile - name: Build Dockerfile
shell: bash shell: bash
@@ -42,12 +37,3 @@ jobs:
shell: bash shell: bash
run: | run: |
docker build modules/openapi-generator-online/ -t test docker build modules/openapi-generator-online/ -t test
- name: Build and test modules/openapi-generator-cli
shell: bash
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker build modules/openapi-generator-cli/ -t cli-test
docker run --rm -v "${PWD}:/local" cli-test generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g go \
-o /local/out/go

View File

@@ -15,7 +15,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'

View File

@@ -31,7 +31,7 @@ jobs:
- samples/client/petstore/java/webclient-swagger2 - samples/client/petstore/java/webclient-swagger2
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11

View File

@@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }} - name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
@@ -45,7 +45,7 @@ jobs:
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Setup Maven - name: Setup Maven
uses: s4u/setup-maven-action@v1.11.0 uses: s4u/setup-maven-action@v1.9.0
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
maven-version: 3.8.8 maven-version: 3.8.8
@@ -57,7 +57,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Upload Maven build artifact - name: Upload Maven build artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
if: matrix.java == '11' && matrix.os == 'ubuntu-latest' if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with: with:
name: artifact name: artifact
@@ -87,12 +87,12 @@ jobs:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Maven - name: Setup Maven
uses: s4u/setup-maven-action@v1.11.0 uses: s4u/setup-maven-action@v1.9.0
with: with:
java-version: 11 java-version: 11
maven-version: 3.8.8 maven-version: 3.8.8
- name: Download build artifact - name: Download build artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: artifact name: artifact
- name: Run Ensures Script - name: Run Ensures Script

View File

@@ -15,7 +15,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'

View File

@@ -17,7 +17,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
@@ -41,7 +41,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: ls -la modules/openapi-generator-cli/target - run: ls -la modules/openapi-generator-cli/target
- name: Upload openapi-generator-cli.jar artifact - name: Upload openapi-generator-cli.jar artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
with: with:
name: openapi-generator-cli.jar name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
@@ -55,7 +55,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
@@ -79,7 +79,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish unit test reports - name: Publish unit test reports
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
with: with:
name: surefire-test-results name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml' path: '**/surefire-reports/TEST-*.xml'
@@ -92,12 +92,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact - name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: openapi-generator-cli.jar name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target path: modules/openapi-generator-cli/target
@@ -131,12 +131,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact - name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: openapi-generator-cli.jar name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target path: modules/openapi-generator-cli/target

View File

@@ -18,16 +18,18 @@ jobs:
matrix: matrix:
qt-version: qt-version:
- '5.15.2' - '5.15.2'
- '6.5.3' - '6.4.2'
os: os:
- ubuntu-latest - ubuntu-latest
- macOS-latest - macOS-latest
- windows-latest - windows-latest
include:
- os: windows-latest
tools: 'tools_openssl_x64'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Qt - uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v3
with: with:
version: ${{ matrix.qt-version }} version: ${{ matrix.qt-version }}
tools: ${{ matrix.tools }} tools: ${{ matrix.tools }}

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11

View File

@@ -19,7 +19,7 @@ jobs:
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0 - samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.0 - uses: actions/setup-dotnet@v3.2.0
with: with:
dotnet-version: 3.1.* dotnet-version: 3.1.*
- name: Build - name: Build

View File

@@ -43,9 +43,9 @@ jobs:
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes - samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.0 - uses: actions/setup-dotnet@v3.2.0
with: with:
dotnet-version: '8.0.x' dotnet-version: '7.0.x'
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln run: dotnet build Org.OpenAPITools.sln

View File

@@ -19,7 +19,7 @@ jobs:
- samples/client/echo_api/csharp-restsharp/ - samples/client/echo_api/csharp-restsharp/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.0 - uses: actions/setup-dotnet@v3.2.0
with: with:
dotnet-version: '6.0.x' dotnet-version: '6.0.x'
- name: Run echo server - name: Run echo server
@@ -28,6 +28,4 @@ jobs:
(cd http-echo-server && npm install && npm start &) (cd http-echo-server && npm install && npm start &)
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: | run: dotnet build Org.OpenAPITools.sln
dotnet build Org.OpenAPITools.sln
dotnet test Org.OpenAPITools.sln

View File

@@ -73,7 +73,7 @@ jobs:
- samples/client/petstore/csharp-restsharp-name-parameter-mappings - samples/client/petstore/csharp-restsharp-name-parameter-mappings
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.0 - uses: actions/setup-dotnet@v3.2.0
with: with:
dotnet-version: '6.0.x' dotnet-version: '6.0.x'
- name: Build - name: Build

View File

@@ -30,7 +30,7 @@ jobs:
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes - samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.0 - uses: actions/setup-dotnet@v3.2.0
with: with:
dotnet-version: '6.0.x' dotnet-version: '6.0.x'
- name: Build - name: Build

View File

@@ -1,32 +0,0 @@
name: Go Client (Echo API)
on:
pull_request:
paths:
- samples/client/echo_api/go/**
- .github/workflows/samples-go-client-echo-api.yaml
jobs:
build:
name: Test Go client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Setup node.js
uses: actions/setup-node@v4
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- run: go version
- name: Run test
working-directory: ${{ matrix.sample }}
run: go test -mod=mod -v

View File

@@ -25,7 +25,7 @@ jobs:
- samples/server/petstore/go-chi-server/ - samples/server/petstore/go-chi-server/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-go@v5 - uses: actions/setup-go@v4
with: with:
go-version: "stable" go-version: "stable"
- run: go version - run: go version

View File

@@ -22,7 +22,7 @@ jobs:
- samples/client/petstore/groovy - samples/client/petstore/groovy
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8

View File

@@ -19,10 +19,9 @@ jobs:
- samples/client/echo_api/java/apache-httpclient - samples/client/echo_api/java/apache-httpclient
- samples/client/echo_api/java/native - samples/client/echo_api/java/native
- samples/client/echo_api/java/feign-gson - samples/client/echo_api/java/feign-gson
- samples/client/echo_api/java/resttemplate
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
@@ -35,7 +34,7 @@ jobs:
~/.m2 ~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v3
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -6,13 +6,11 @@ on:
- samples/client/echo_api/java/apache-httpclient/** - samples/client/echo_api/java/apache-httpclient/**
- samples/client/echo_api/java/feign-gson/** - samples/client/echo_api/java/feign-gson/**
- samples/client/echo_api/java/okhttp-gson/** - samples/client/echo_api/java/okhttp-gson/**
- samples/client/echo_api/java/resttemplate/**
pull_request: pull_request:
paths: paths:
- samples/client/echo_api/java/apache-httpclient/** - samples/client/echo_api/java/apache-httpclient/**
- samples/client/echo_api/java/feign-gson/** - samples/client/echo_api/java/feign-gson/**
- samples/client/echo_api/java/okhttp-gson/** - samples/client/echo_api/java/okhttp-gson/**
- samples/client/echo_api/java/resttemplate/**
jobs: jobs:
build: build:
name: Build Java Client JDK8 name: Build Java Client JDK8
@@ -25,10 +23,9 @@ jobs:
- samples/client/echo_api/java/apache-httpclient - samples/client/echo_api/java/apache-httpclient
- samples/client/echo_api/java/feign-gson - samples/client/echo_api/java/feign-gson
- samples/client/echo_api/java/okhttp-gson - samples/client/echo_api/java/okhttp-gson
- samples/client/echo_api/java/resttemplate
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
@@ -41,7 +38,7 @@ jobs:
~/.m2 ~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v3
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -10,9 +10,6 @@ on:
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
- samples/openapi3/client/petstore/java/native** - samples/openapi3/client/petstore/java/native**
- samples/client/others/java/okhttp-gson-oneOf/**
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
- samples/client/others/java/webclient-useAbstractionForFiles/**
pull_request: pull_request:
paths: paths:
- 'samples/client/petstore/java/**' - 'samples/client/petstore/java/**'
@@ -22,9 +19,6 @@ on:
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
- samples/openapi3/client/petstore/java/native** - samples/openapi3/client/petstore/java/native**
- samples/client/others/java/okhttp-gson-oneOf/**
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
- samples/client/others/java/webclient-useAbstractionForFiles/**
jobs: jobs:
build: build:
name: Build Java Client JDK11 name: Build Java Client JDK11
@@ -56,10 +50,9 @@ jobs:
- samples/client/petstore/java/microprofile-rest-client-3.0 - samples/client/petstore/java/microprofile-rest-client-3.0
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson - samples/client/petstore/java/microprofile-rest-client-3.0-jackson
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml - samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
- samples/client/petstore/java/apache-httpclient - samples/client/petstore/java/apache-httpclient
- samples/client/petstore/java/feign - samples/client/petstore/java/feign
- samples/client/petstore/java/okhttp-gson-awsv4signature - samples/client/petstore/java/jersey1
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters - samples/openapi3/client/petstore/java/jersey2-java8-special-characters
- samples/openapi3/client/petstore/java/native - samples/openapi3/client/petstore/java/native
- samples/client/petstore/java/okhttp-gson-swagger1/ - samples/client/petstore/java/okhttp-gson-swagger1/
@@ -68,12 +61,9 @@ jobs:
- samples/client/petstore/java/okhttp-gson-swagger2/ - samples/client/petstore/java/okhttp-gson-swagger2/
- samples/client/petstore/java/resttemplate-swagger2/ - samples/client/petstore/java/resttemplate-swagger2/
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/ - samples/openapi3/client/petstore/java/jersey2-java8-swagger2/
- samples/client/others/java/okhttp-gson-oneOf/
- samples/client/others/java/resttemplate-useAbstractionForFiles/
- samples/client/others/java/webclient-useAbstractionForFiles/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11

View File

@@ -22,7 +22,7 @@ jobs:
- samples/client/petstore/java/webclient-jakarta - samples/client/petstore/java/webclient-jakarta
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17

View File

@@ -24,7 +24,7 @@ jobs:
version: [17] version: [17]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: ${{ matrix.version }} java-version: ${{ matrix.version }}

View File

@@ -30,7 +30,7 @@ jobs:
- samples/server/petstore/java-play-framework-no-wrap-calls - samples/server/petstore/java-play-framework-no-wrap-calls
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11

View File

@@ -8,7 +8,6 @@ on:
- 'samples/server/petstore/java-vertx-web/**' - 'samples/server/petstore/java-vertx-web/**'
- 'samples/server/petstore/java-inflector/**' - 'samples/server/petstore/java-inflector/**'
- 'samples/server/petstore/java-pkmst/**' - 'samples/server/petstore/java-pkmst/**'
# test in circleci instead
- 'samples/server/petstore/java-undertow/**' - 'samples/server/petstore/java-undertow/**'
pull_request: pull_request:
paths: paths:
@@ -16,7 +15,7 @@ on:
- 'samples/server/petstore/java-vertx-web/**' - 'samples/server/petstore/java-vertx-web/**'
- 'samples/server/petstore/java-inflector/**' - 'samples/server/petstore/java-inflector/**'
- 'samples/server/petstore/java-pkmst/**' - 'samples/server/petstore/java-pkmst/**'
#- 'samples/server/petstore/java-undertow/**' - 'samples/server/petstore/java-undertow/**'
jobs: jobs:
build: build:
name: Build Java Server name: Build Java Server
@@ -30,10 +29,10 @@ jobs:
- samples/server/petstore/java-vertx-web/ - samples/server/petstore/java-vertx-web/
- samples/server/petstore/java-inflector/ - samples/server/petstore/java-inflector/
- samples/server/petstore/java-pkmst/ - samples/server/petstore/java-pkmst/
#- samples/server/petstore/java-undertow/ - samples/server/petstore/java-undertow/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8

View File

@@ -1,36 +0,0 @@
name: Samples JAX-RS (JDK11)
on:
push:
paths:
- samples/server/petstore/jaxrs/jersey3/**
pull_request:
paths:
- samples/server/petstore/jaxrs/jersey3/**
jobs:
build:
name: Build JAX-RS
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/jaxrs/jersey3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- name: Cache maven dependencies
uses: actions/cache@v3
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package

View File

@@ -26,6 +26,8 @@ jobs:
- samples/server/petstore/jaxrs-spec - samples/server/petstore/jaxrs-spec
- samples/server/petstore/jaxrs-spec-interface - samples/server/petstore/jaxrs-spec-interface
- samples/server/petstore/jaxrs-spec-interface-response - samples/server/petstore/jaxrs-spec-interface-response
- samples/server/petstore/jaxrs/jersey1
- samples/server/petstore/jaxrs/jersey1-useTags
- samples/server/petstore/jaxrs-datelib-j8 - samples/server/petstore/jaxrs-datelib-j8
- samples/server/petstore/jaxrs-resteasy/default - samples/server/petstore/jaxrs-resteasy/default
- samples/server/petstore/jaxrs-resteasy/eap - samples/server/petstore/jaxrs-resteasy/eap
@@ -39,7 +41,7 @@ jobs:
- samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations - samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8

View File

@@ -8,7 +8,6 @@ on:
- samples/client/petstore/java-helidon-client/se/** - samples/client/petstore/java-helidon-client/se/**
- samples/client/petstore/spring-http-interface-reactive/** - samples/client/petstore/spring-http-interface-reactive/**
- samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface/**
- samples/client/petstore/java/webclient-jakarta/**
# servers # servers
- samples/openapi3/server/petstore/springboot-3/** - samples/openapi3/server/petstore/springboot-3/**
- samples/server/petstore/java-helidon-server/mp/** - samples/server/petstore/java-helidon-server/mp/**
@@ -21,7 +20,6 @@ on:
- samples/client/petstore/java-helidon-client/se/** - samples/client/petstore/java-helidon-client/se/**
- samples/client/petstore/spring-http-interface-reactive/** - samples/client/petstore/spring-http-interface-reactive/**
- samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface/**
- samples/client/petstore/java/webclient-jakarta/**
# servers # servers
- samples/openapi3/server/petstore/springboot-3/** - samples/openapi3/server/petstore/springboot-3/**
- samples/server/petstore/java-helidon-server/mp/** - samples/server/petstore/java-helidon-server/mp/**
@@ -40,7 +38,6 @@ jobs:
- samples/client/petstore/java-helidon-client/se - samples/client/petstore/java-helidon-client/se
- samples/client/petstore/spring-http-interface-reactive - samples/client/petstore/spring-http-interface-reactive
- samples/client/petstore/spring-http-interface - samples/client/petstore/spring-http-interface
- samples/client/petstore/java/webclient-jakarta
# servers # servers
- samples/openapi3/server/petstore/springboot-3 - samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/java-helidon-server/mp - samples/server/petstore/java-helidon-server/mp
@@ -49,7 +46,7 @@ jobs:
- samples/client/petstore/spring-http-interface - samples/client/petstore/spring-http-interface
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17

View File

@@ -31,7 +31,6 @@ jobs:
- samples/client/petstore/kotlin-jvm-volley - samples/client/petstore/kotlin-jvm-volley
- samples/client/petstore/kotlin-moshi-codegen - samples/client/petstore/kotlin-moshi-codegen
- samples/client/petstore/kotlin-multiplatform - samples/client/petstore/kotlin-multiplatform
- samples/client/petstore/kotlin-multiplatform-kotlinx-datetime
- samples/client/petstore/kotlin-nonpublic - samples/client/petstore/kotlin-nonpublic
- samples/client/petstore/kotlin-nullable - samples/client/petstore/kotlin-nullable
- samples/client/petstore/kotlin-okhttp3 - samples/client/petstore/kotlin-okhttp3
@@ -40,7 +39,6 @@ jobs:
- samples/client/petstore/kotlin-retrofit2-rx3 - samples/client/petstore/kotlin-retrofit2-rx3
- samples/client/petstore/kotlin-string - samples/client/petstore/kotlin-string
- samples/client/petstore/kotlin-threetenbp - samples/client/petstore/kotlin-threetenbp
- samples/client/petstore/kotlin-kotlinx-datetime
- samples/client/petstore/kotlin-uppercase-enum - samples/client/petstore/kotlin-uppercase-enum
- samples/client/petstore/kotlin-default-values-jvm-okhttp3 - samples/client/petstore/kotlin-default-values-jvm-okhttp3
- samples/client/petstore/kotlin-default-values-jvm-okhttp4 - samples/client/petstore/kotlin-default-values-jvm-okhttp4
@@ -63,13 +61,12 @@ jobs:
- samples/client/petstore/kotlin-jvm-vertx-moshi - samples/client/petstore/kotlin-jvm-vertx-moshi
- samples/client/petstore/kotlin-jvm-spring-2-webclient - samples/client/petstore/kotlin-jvm-spring-2-webclient
- samples/client/petstore/kotlin-jvm-spring-3-webclient - samples/client/petstore/kotlin-jvm-spring-3-webclient
- samples/client/petstore/kotlin-jvm-spring-3-restclient
- samples/client/petstore/kotlin-spring-cloud - samples/client/petstore/kotlin-spring-cloud
- samples/client/petstore/kotlin-name-parameter-mappings - samples/client/petstore/kotlin-name-parameter-mappings
- samples/client/others/kotlin-jvm-okhttp-parameter-tests - samples/client/others/kotlin-jvm-okhttp-parameter-tests
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8

View File

@@ -29,7 +29,7 @@ jobs:
# - samples/server/petstore/kotlin-spring-default/ # - samples/server/petstore/kotlin-spring-default/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17

View File

@@ -44,7 +44,7 @@ jobs:
#- samples/server/petstore/kotlin-vertx-modelMutable #- samples/server/petstore/kotlin-vertx-modelMutable
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8

View File

@@ -1,44 +0,0 @@
name: Python Client (Echo API)
on:
pull_request:
paths:
- samples/client/echo_api/python/**
- .github/workflows/samples-python-client-echo-api.yaml
jobs:
build:
name: Test Python client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/python
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup node.js
uses: actions/setup-node@v4
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test
working-directory: ${{ matrix.sample }}
run: python -m pytest

View File

@@ -0,0 +1,38 @@
name: Python Client (Echo API)
on:
push:
paths:
- samples/client/echo_api/python/**
pull_request:
paths:
- samples/client/echo_api/python/**
jobs:
build:
name: Test Python client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/python
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Setup node.js
uses: actions/setup-node@v3
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test
working-directory: ${{ matrix.sample }}
run: python -m pytest

View File

@@ -1,59 +0,0 @@
name: "Python Client: Petstore"
on:
pull_request:
paths:
- samples/openapi3/client/petstore/python-aiohttp/**
- samples/openapi3/client/petstore/python/**
- .github/workflows/samples-python-petstore.yaml
jobs:
build:
name: Test Python client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
sample:
- samples/openapi3/client/petstore/python-aiohttp
- samples/openapi3/client/petstore/python
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: py
with:
python-version: ${{ matrix.python-version }}
- name: Cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
path: |
~/.cache/pypoetry/virtualenvs/
~/.local/pipx/venvs/poetry/
.mypy_cache/
- name: Install poetry
run: pipx install --python '${{ steps.py.outputs.python-path }}' poetry
- name: Install
working-directory: ${{ matrix.sample }}
run: poetry install
- name: Test
working-directory: ${{ matrix.sample }}
run: poetry run pytest -v

View File

@@ -1,44 +0,0 @@
name: Python Client pydantic v1 (Echo API)
on:
pull_request:
paths:
- samples/client/echo_api/python-pydantic-v1/**
- .github/workflows/samples-python-pydantic-v1-client-echo-api.yaml
jobs:
build:
name: Test Python client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/python-pydantic-v1/
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup node.js
uses: actions/setup-node@v4
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test
working-directory: ${{ matrix.sample }}
run: python -m pytest

View File

@@ -1,59 +0,0 @@
name: "Python Client pydantic v1: Petstore"
on:
pull_request:
paths:
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/**
- samples/openapi3/client/petstore/python-pydantic-v1/**
- .github/workflows/samples-python-pydantic-v1-petstore.yaml
jobs:
build:
name: Test Python client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
sample:
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
- samples/openapi3/client/petstore/python-pydantic-v1
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: py
with:
python-version: ${{ matrix.python-version }}
- name: Cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
path: |
~/.cache/pypoetry/virtualenvs/
~/.local/pipx/venvs/poetry/
.mypy_cache/
- name: Install poetry
run: pipx install --python '${{ steps.py.outputs.python-path }}' poetry
- name: Install
working-directory: ${{ matrix.sample }}
run: poetry install
- name: Test
working-directory: ${{ matrix.sample }}
run: poetry run pytest -v

View File

@@ -3,10 +3,10 @@ name: Python Server
on: on:
push: push:
paths: paths:
- samples/server/petstore/python-aiohttp-srclayout/** - samples/server/petstore/python-aiohttp/**
pull_request: pull_request:
paths: paths:
- samples/server/petstore/python-aiohttp-srclayout/** - samples/server/petstore/python-aiohttp/**
jobs: jobs:
build: build:
name: Test Python server name: Test Python server
@@ -16,10 +16,10 @@ jobs:
matrix: matrix:
sample: sample:
# servers # servers
- samples/server/petstore/python-aiohttp-srclayout/ - samples/server/petstore/python-aiohttp/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v4
with: with:
python-version: '3.7' python-version: '3.7'
- name: Test - name: Test

View File

@@ -1,43 +0,0 @@
name: Samples Ruby
on:
push:
paths:
- 'samples/client/echo_api/ruby-httpx/**'
- 'samples/client/echo_api/ruby-faraday/**'
- 'samples/client/echo_api/ruby-typhoeus/**'
pull_request:
paths:
- 'samples/client/echo_api/ruby-httpx/**'
- 'samples/client/echo_api/ruby-faraday/**'
- 'samples/client/echo_api/ruby-typhoeus/**'
jobs:
build:
name: Build Ruby
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/client/echo_api/ruby-httpx/'
- 'samples/client/echo_api/ruby-faraday/'
- 'samples/client/echo_api/ruby-typhoeus/'
steps:
- uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- uses: actions/setup-ruby@v1
with:
ruby-version: 3.0
bundler-cache: true
- name: Install bundle
working-directory: ${{ matrix.sample }}
run: bundle install
- name: Run rspec
working-directory: ${{ matrix.sample }}
run: rspec

View File

@@ -32,7 +32,7 @@ jobs:
- samples/server/petstore/scala-finch # cannot be tested with jdk11 - samples/server/petstore/scala-finch # cannot be tested with jdk11
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8

View File

@@ -19,7 +19,7 @@ jobs:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional - samples/openapi3/client/petstore/spring-cloud-3-with-optional
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17

View File

@@ -28,7 +28,6 @@ jobs:
- samples/openapi3/client/petstore/spring-cloud - samples/openapi3/client/petstore/spring-cloud
- samples/client/petstore/spring-cloud-date-time - samples/client/petstore/spring-cloud-date-time
- samples/openapi3/client/petstore/spring-cloud-date-time - samples/openapi3/client/petstore/spring-cloud-date-time
- samples/openapi3/client/petstore/spring-cloud-http-basic
- samples/openapi3/client/petstore/spring-stubs - samples/openapi3/client/petstore/spring-stubs
- samples/openapi3/client/petstore/spring-stubs-skip-default-interface - samples/openapi3/client/petstore/spring-stubs-skip-default-interface
- samples/openapi3/client/petstore/spring-cloud-async - samples/openapi3/client/petstore/spring-cloud-async
@@ -56,10 +55,9 @@ jobs:
- samples/server/petstore/springboot-spring-pageable-delegatePattern - samples/server/petstore/springboot-spring-pageable-delegatePattern
- samples/server/petstore/springboot-spring-pageable-without-j8 - samples/server/petstore/springboot-spring-pageable-without-j8
- samples/server/petstore/springboot-spring-pageable - samples/server/petstore/springboot-spring-pageable
- samples/server/petstore/springboot-spring-provide-args
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8

View File

@@ -1,42 +0,0 @@
name: TypeScript Axios Client (Echo API)
on:
pull_request:
paths:
- samples/client/echo_api/typescript-axios/**
- .github/workflows/samples-typescript-axios-echo-api.yaml
jobs:
build:
name: Test TypeScript Axios client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/typescript-axios/test
node-version:
- 16
- 18
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Install
working-directory: ${{ matrix.sample }}
run: |
npm run preinstall
npm i
- name: Test
working-directory: ${{ matrix.sample }}
run: npm test

View File

@@ -20,7 +20,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v3
- name: Install dependencies - name: Install dependencies
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: | run: |

View File

@@ -14,7 +14,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11

View File

@@ -20,7 +20,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }} - name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
distribution: 'temurin' distribution: 'temurin'
@@ -39,7 +39,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- ${{ runner.os }}-build-
- name: Setup Maven - name: Setup Maven
uses: s4u/setup-maven-action@v1.11.0 uses: s4u/setup-maven-action@v1.9.0
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
maven-version: 3.8.8 maven-version: 3.8.8

2
.gitignore vendored
View File

@@ -90,6 +90,7 @@ samples/client/petstore/cpp-restsdk/cmake_install.cmake
samples/client/petstore/java/hello.txt samples/client/petstore/java/hello.txt
samples/client/petstore/java/okhttp-gson/hello.txt samples/client/petstore/java/okhttp-gson/hello.txt
samples/client/petstore/java/okhttp-gson-3.1/hello.txt samples/client/petstore/java/okhttp-gson-3.1/hello.txt
samples/client/petstore/java/jersey1/hello.txt
samples/client/petstore/java/jersey2-java8/hello.txt samples/client/petstore/java/jersey2-java8/hello.txt
samples/client/petstore/java/jersey2/hello.txt samples/client/petstore/java/jersey2/hello.txt
samples/client/petstore/android/default/hello.txt samples/client/petstore/android/default/hello.txt
@@ -271,7 +272,6 @@ samples/client/petstore/c/*.so
# Ruby # Ruby
samples/openapi3/client/petstore/ruby/Gemfile.lock samples/openapi3/client/petstore/ruby/Gemfile.lock
samples/openapi3/client/petstore/ruby-faraday/Gemfile.lock samples/openapi3/client/petstore/ruby-faraday/Gemfile.lock
samples/openapi3/client/petstore/ruby-httpx/Gemfile.lock
# Crystal # Crystal
samples/client/petstore/crystal/lib samples/client/petstore/crystal/lib

View File

@@ -3,19 +3,19 @@
## ##
## You can build _just_ this part with: ## You can build _just_ this part with:
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile . ## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
FROM maven:3-eclipse-temurin-17 as builder FROM maven:3.6.3-jdk-11-openj9 as builder
ENV GEN_DIR /opt/openapi-generator ENV GEN_DIR /opt/openapi-generator
WORKDIR ${GEN_DIR} WORKDIR ${GEN_DIR}
COPY . ${GEN_DIR} COPY . ${GEN_DIR}
# Pre-compile openapi-generator-cli # Pre-compile openapi-generator-cli
RUN mvn -B -am -pl "modules/openapi-generator-cli" package RUN mvn -am -pl "modules/openapi-generator-cli" package
## The final (release) image ## The final (release) image
## The resulting container here only needs the target jar ## The resulting container here only needs the target jar
## and ca-certificates (to be able to query HTTPS hosted specs) ## and ca-certificates (to be able to query HTTPS hosted specs)
FROM eclipse-temurin:17-jre FROM openjdk:11.0.8-jre-slim-buster
ENV GEN_DIR /opt/openapi-generator ENV GEN_DIR /opt/openapi-generator

View File

@@ -3,18 +3,18 @@
## ##
## You can build _just_ this part with: ## You can build _just_ this part with:
## docker --target builder -t container-name:builder -f .hub.online.dockerfile . ## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
FROM maven:3-eclipse-temurin-17 as builder FROM maven:3.6.3-jdk-11-openj9 as builder
ENV GEN_DIR /opt/openapi-generator ENV GEN_DIR /opt/openapi-generator
WORKDIR ${GEN_DIR} WORKDIR ${GEN_DIR}
COPY . ${GEN_DIR} COPY . ${GEN_DIR}
# Pre-compile openapi-generator-online # Pre-compile openapi-generator-online
RUN mvn -B -am -pl "modules/openapi-generator-online" package RUN mvn -am -pl "modules/openapi-generator-online" package
## The final (release) image ## The final (release) image
## The resulting container here only needs the target jar ## The resulting container here only needs the target jar
FROM eclipse-temurin:17-jre FROM openjdk:11.0.8-jre-slim-buster
ENV GEN_DIR /opt/openapi-generator ENV GEN_DIR /opt/openapi-generator
ENV TARGET_DIR /generator ENV TARGET_DIR /generator

View File

@@ -1 +1 @@
11 1.8

98
CI/.drone.yml Normal file
View File

@@ -0,0 +1,98 @@
kind: pipeline
type: docker
name: java11-test
steps:
# test Java 11 HTTP client
- name: java11-test
image: openjdk:11.0
commands:
- ./mvnw --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- ./mvnw --quiet verify -Psamples.droneio -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test java native client
- ./mvnw clean test -f samples/client/petstore/java/native/pom.xml
- ./mvnw clean test -f samples/client/petstore/java/native-async/pom.xml
- ./mvnw clean test -f samples/openapi3/client/petstore/java/native/pom.xml
# test all generators with fake petstore spec (2.0, 3.0)
- /bin/bash bin/utils/test-fake-petstore-for-all.sh
# generate test scripts
- /bin/bash bin/tests/run-all-test
---
kind: pipeline
type: docker
name: nim-client-test
steps:
# test nim client
- name: nim-client-test
image: nimlang/nim
commands:
- (cd samples/client/petstore/nim/ && nim c sample_client.nim)
---
kind: pipeline
type: docker
name: protobuf-schema-test
steps:
# test protobuf schema generator
- name: protobuf-schema-test
image: nanoservice/protobuf-go
commands:
- protoc --version
- mkdir /var/tmp/go/
- cd samples/config/petstore/protobuf-schema
- protoc --go_out=/var/tmp/go/ services/*
- protoc --go_out=/var/tmp/go/ models/*
---
kind: pipeline
type: docker
name: aspnetcore-test
steps:
# test aspnetcore 3.x
- name: aspnetcore-test
image: mcr.microsoft.com/dotnet/core/sdk:3.1
commands:
- (cd samples/server/petstore/aspnetcore-3.1/ && /bin/sh build.sh)
- (cd samples/server/petstore/aspnetcore-3.0/ && /bin/sh build.sh)
---
kind: pipeline
type: docker
name: ocaml-test
steps:
# test ocaml petstore client
- name: ocaml-test
image: ocaml/opam2:4.07
commands:
- sudo apt-get -y install m4
- cd samples/client/petstore/ocaml
- opam install ppx_deriving_yojson cohttp ppx_deriving cohttp-lwt-unix
- opam pin add ocaml-migrate-parsetree 1.3.1
- eval $(opam env)
- sudo chmod -R 777 .
- dune build --build-dir=./_build
---
kind: pipeline
type: docker
name: haskell-client-test
steps:
# test haskell client
- name: haskell-client-test
image: haskell:8.10.4
commands:
- (cd samples/client/petstore/haskell-http-client/ && stack --allow-different-user --install-ghc --no-haddock-deps haddock --fast && stack --allow-different-user test --fast)
---
kind: pipeline
type: docker
name: erlang
steps:
# test erlang client and server
- name: erlang
image: erlang:alpine
commands:
- (cd samples/client/petstore/erlang-client && rebar3 compile)
- (cd samples/client/petstore/erlang-proper && rebar3 compile)
# comment out as the tests pass locally but not in the CI
#- (cd samples/server/petstore/erlang-server && rebar3 compile)

37
CI/.travis.yml.ios Normal file
View File

@@ -0,0 +1,37 @@
sudo: required
language: objective-c
osx_image: xcode10.3
before_install:
- export SW=`pwd`
- rvm list
#- rvm use 2.3.3
- gem environment
- gem install bundler -N
- gem install cocoapods -v 1.2.1 -N
- gem install xcpretty -N
- pod --version
# comment out below to avoid errors
#- pod repo update
#- pod setup --silent > /dev/null
#- mkdir -p ~/.local/bin
#- export PATH=$HOME/.local/bin:$PATH
## start local petstore server
#- git clone -b docker --single-branch https://github.com/wing328/swagger-samples
#- cd swagger-samples/java/java-jersey-jaxrs
#- sudo mvn jetty:run &
#- cd $SW
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
# show java version
- java -version
# show brew version
- brew --version
# show xcpretty version
- xcpretty -v
# show go version
- go version
script:
# run integration tests defined in maven pom.xml
- mvn --no-snapshot-updates -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true

29
CI/.travis.yml.jdk6 Normal file
View File

@@ -0,0 +1,29 @@
dist: trusty
sudo: required
language: java
addons:
apt:
packages:
- openjdk-6-jdk
jdk: openjdk6
cache:
directories:
- $HOME/.m2
- $HOME/.ivy2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
install:
- jdk_switcher use openjdk6
- java -version
- curl -s "https://get.sdkman.io" | bash
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk version
- sdk install gradle 2.9
- sdk list gradle
- sdk version
- gradle --version
script:
- cd samples/client/petstore/java/jersey2-java6 && gradle test

View File

@@ -10,13 +10,10 @@ set -e
export NODE_ENV=test export NODE_ENV=test
if [ "$NODE_INDEX" = "1" ]; then if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX ..." echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
java -version java -version
(cd samples/client/petstore/ruby && mvn integration-test) ./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(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)
elif [ "$NODE_INDEX" = "2" ]; then elif [ "$NODE_INDEX" = "2" ]; then
echo "Running node $NODE_INDEX to test Go" echo "Running node $NODE_INDEX to test Go"
@@ -36,14 +33,20 @@ elif [ "$NODE_INDEX" = "2" ]; then
export PATH="/usr/local/go1.18/go/bin:$PATH" export PATH="/usr/local/go1.18/go/bin:$PATH"
go version go version
# run go integration tests # run integration tests
(cd samples/client/petstore/go && mvn integration-test) ./mvnw --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/openapi3/client/petstore/go && mvn integration-test)
(cd samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false && mvn integration-test)
elif [ "$NODE_INDEX" = "3" ]; then elif [ "$NODE_INDEX" = "3" ]; then
echo "Running node $NODE_INDEX ... " echo "Running node $NODE_INDEX to test 'samples.circleci.node3' defined in pom.xml ..."
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
#tar -xf Python-3.8.9.tgz
#cd Python-3.8.9
#./configure --enable-optimizations
#sudo make altinstall
pyenv install --list
pyenv install 3.7.12
#pyenv install 2.7.14 #python2 no longer supported
pyenv global 3.7.12
# Install node@stable (for angular 6) # Install node@stable (for angular 6)
set +e set +e
@@ -60,71 +63,23 @@ elif [ "$NODE_INDEX" = "3" ]; then
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
(cd samples/client/others/typescript-angular && mvn integration-test) ./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.node3 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(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/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/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/javascript-flowtyped && mvn integration-test)
(cd samples/client/petstore/javascript-es6 && mvn integration-test)
(cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)
elif [ "$NODE_INDEX" = "4" ]; then elif [ "$NODE_INDEX" = "4" ]; then
echo "Running node $NODE_INDEX ..." echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..."
#wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz #mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
#tar -xf Python-3.8.9.tgz #(cd samples/openapi3/client/petstore/python && make test)
#cd Python-3.8.9 # comment out due to ModuleNotFoundError: No module named 'urllib3.request'
#./configure --enable-optimizations #(cd samples/openapi3/client/petstore/python-prior && make test)
#sudo make altinstall #(cd samples/openapi3/client/3_0_3_unit_test/python && make test)
pyenv install --list
pyenv install 3.7.12
#pyenv install 2.7.14 #python2 no longer supported
pyenv global 3.7.12
(cd samples/openapi3/client/petstore/python && mvn integration-test)
(cd samples/openapi3/client/petstore/python-pydantic-v1 && mvn integration-test)
(cd samples/openapi3/client/petstore/python-aiohttp && mvn integration-test)
(cd samples/openapi3/client/petstore/python-pydantic-v1-aiohttp && mvn integration-test)
else else
echo "Running node $NODE_INDEX ..." echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..."
java -version java -version
(cd samples/client/petstore/scala-akka && mvn integration-test) ./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci.others -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/client/petstore/scala-sttp && mvn integration-test) ./mvnw --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(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/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/resteasy && mvn integration-test)
(cd samples/client/petstore/java-micronaut-client && mvn integration-test)
(cd samples/client/petstore/java/apache-httpclient && mvn integration-test)
fi fi

View File

@@ -1,4 +1,4 @@
FROM maven:3-eclipse-temurin-17 FROM maven:3.6.3-jdk-11-openj9
ENV GEN_DIR /opt/openapi-generator ENV GEN_DIR /opt/openapi-generator
WORKDIR ${GEN_DIR} WORKDIR ${GEN_DIR}
@@ -20,7 +20,7 @@ COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
COPY ./pom.xml ${GEN_DIR} COPY ./pom.xml ${GEN_DIR}
# Pre-compile openapi-generator-cli # Pre-compile openapi-generator-cli
RUN mvn -B -am -pl "modules/openapi-generator-cli" package RUN mvn -am -pl "modules/openapi-generator-cli" package
# This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh. # This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh.
COPY docker-entrypoint.sh /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/

View File

@@ -9,13 +9,13 @@
[![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g)
[![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator) [![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator)
[![Conan Center](https://shields.io/conan/v/openapi-generator)](https://conan.io/center/recipes/openapi-generator) [![Conan Center](https://shields.io/conan/v/openapi-generator)](https://conan.io/center/openapi-generator)
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.openapi-generator.tech/scans) [![Revved up by Gradle Enterprise](https://img.shields.io/badge/Revved%20up%20by-Gradle%20Enterprise-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.openapi-generator.tech/scans)
</div> </div>
<div align="center"> <div align="center">
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.2.0`): [Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.0.1`):
[![Build Status](https://api.travis-ci.com/OpenAPITools/openapi-generator.svg?branch=master&status=passed)](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds) [![Build Status](https://api.travis-ci.com/OpenAPITools/openapi-generator.svg?branch=master&status=passed)](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
@@ -60,29 +60,24 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
[<img src="https://openapi-generator.tech/img/companies/finbourne.png" width="128" height="128">](https://www.finbourne.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [<img src="https://openapi-generator.tech/img/companies/finbourne.png" width="128" height="128">](https://www.finbourne.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://openapi-generator.tech/img/companies/bumpsh.png" width="128" height="128">](https://bump.sh/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [<img src="https://openapi-generator.tech/img/companies/bumpsh.png" width="128" height="128">](https://bump.sh/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://openapi-generator.tech/img/companies/bileto.png" width="128" height="128">](https://www.bileto.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [<img src="https://openapi-generator.tech/img/companies/bileto.png" width="128" height="128">](https://www.bileto.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://openapi-generator.tech/img/companies/bairesdev.png" width="128" height="128">](https://www.bairesdev.com/sponsoring-open-source-projects/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://openapi-generator.tech/img/companies/dmtech.jpeg" width="128" height="128">](https://www.dm-jobs.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://openapi-generator.tech/img/companies/adyen.png" width="128" height="128">](https://adyen.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://openapi-generator.tech/img/companies/fornex.png" width="128" height="128">](https://fornex.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity #### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS and Checkly for sponsoring the API monitoring
[<img src="https://openapi-generator.tech/img/companies/godaddy.png" width="150">](https://www.godaddy.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [<img src="https://openapi-generator.tech/img/companies/godaddy.png" width="150">](https://www.godaddy.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[![Linode](https://www.linode.com/media/images/logos/standard/light/linode-logo_standard_light_small.png)](https://www.linode.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [![Linode](https://www.linode.com/media/images/logos/standard/light/linode-logo_standard_light_small.png)](https://www.linode.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRAhEYadUyZYzGUotZiSdXkVMqqLGuohyixLl4eUpUV6pAbUULL" width="150">](https://checklyhq.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRAhEYadUyZYzGUotZiSdXkVMqqLGuohyixLl4eUpUV6pAbUULL" width="150">](https://checklyhq.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
[<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Gradle_logo.png/320px-Gradle_logo.png" width="150">](https://gradle.org?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor)
## Overview ## Overview
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported: OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
| | Languages/Frameworks | | | Languages/Frameworks |
| -------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | -------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 16.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** | | **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 16.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) | | **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** | | **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) | | **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** | | **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
## Table of contents ## Table of contents
@@ -120,13 +115,13 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes | | OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 7.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.2.0-SNAPSHOT/) | 15.12.2023 | Minor release with breaking changes (with fallback) | | 7.0.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.1-SNAPSHOT/) | 08.09.2023 | Patch release (enhancements, bug fixes, etc) |
| [7.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.1.0) (latest stable release) | 13.11.2023 | Minor release with breaking changes (with fallback) | | [7.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.0.0) (latest stable release) | 25.08.2023 | Major release with breaking changes (no 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) | | [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) | | [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) | | [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0, 3.1 (beta support) OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
(We do not publish daily/nightly build. Please use SNAPSHOT instead) (We do not publish daily/nightly build. Please use SNAPSHOT instead)
@@ -184,16 +179,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
<!-- RELEASE_VERSION --> <!-- RELEASE_VERSION -->
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum): 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.1.0/openapi-generator-cli-7.1.0.jar` JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar`
For **Mac/Linux** users: For **Mac/Linux** users:
```sh ```sh
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.1.0/openapi-generator-cli-7.1.0.jar -O openapi-generator-cli.jar wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.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. 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.1.0/openapi-generator-cli-7.1.0.jar Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar
``` ```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -256,7 +251,7 @@ To build from source, you need the following installed and available in your `$P
* [Apache Maven 3.3.4 or greater](https://maven.apache.org/) (optional) * [Apache Maven 3.3.4 or greater](https://maven.apache.org/) (optional)
After cloning the project, you can build it from source using [maven wrapper](https://maven.apache.org/wrapper/): After cloning the project, you can build it from source using [maven wrapper](https://github.com/takari/maven-wrapper):
- Linux: `./mvnw clean install` - Linux: `./mvnw clean install`
- Windows: `mvnw.cmd clean install` - Windows: `mvnw.cmd clean install`
@@ -428,7 +423,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli" To use a specific version of "openapi-generator-cli"
```sh ```sh
openapi-generator-cli version-manager set 7.0.1 openapi-generator-cli version-manager set 7.0.0
``` ```
Or install it as dev-dependency: Or install it as dev-dependency:
@@ -452,7 +447,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`) (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`)
<!-- RELEASE_VERSION --> <!-- RELEASE_VERSION -->
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar) You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar)
<!-- /RELEASE_VERSION --> <!-- /RELEASE_VERSION -->
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -694,7 +689,6 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [RedHat](https://www.redhat.com) - [RedHat](https://www.redhat.com)
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development) - [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
- [REST United](https://restunited.com) - [REST United](https://restunited.com)
- [Robocorp](https://www.robocorp.com)
- [Robotinfra](https://www.robotinfra.com) - [Robotinfra](https://www.robotinfra.com)
- [SmartHR](https://smarthr.co.jp/) - [SmartHR](https://smarthr.co.jp/)
- [Sony Interactive Entertainment](https://www.sie.com/en/index.html) - [Sony Interactive Entertainment](https://www.sie.com/en/index.html)
@@ -934,9 +928,12 @@ OpenAPI Generator core team members are contributors who have been making signif
* [@cbornet](https://github.com/cbornet) (2016/05) * [@cbornet](https://github.com/cbornet) (2016/05)
* [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini) * [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini)
* [@etherealjoy](https://github.com/etherealjoy) (2019/06) * [@etherealjoy](https://github.com/etherealjoy) (2019/06)
* [@spacether](https://github.com/spacether) (2020/05) [:heart:][spacether sponsorship]
:heart: = Link to support the contributor directly :heart: = Link to support the contributor directly
[spacether sponsorship]: https://github.com/sponsors/spacether/
#### Template Creator #### Template Creator
**NOTE**: Embedded templates are only supported in _Mustache_ format. Support for all other formats is experimental and subject to change at any time. **NOTE**: Embedded templates are only supported in _Mustache_ format. Support for all other formats is experimental and subject to change at any time.
@@ -996,7 +993,6 @@ Here is a list of template creators:
* Kotlin (MultiPlatform): @andrewemery * Kotlin (MultiPlatform): @andrewemery
* Kotlin (Volley): @alisters * Kotlin (Volley): @alisters
* Kotlin (jvm-spring-webclient): @stefankoppier * Kotlin (jvm-spring-webclient): @stefankoppier
* Kotlin (jvm-spring-restclient): @stefankoppier
* Lua: @daurnimator * Lua: @daurnimator
* N4JS: @mmews-n4 * N4JS: @mmews-n4
* Nim: @hokamoto * Nim: @hokamoto
@@ -1008,10 +1004,8 @@ Here is a list of template creators:
* PowerShell (refactored in 5.0.0): @wing328 * PowerShell (refactored in 5.0.0): @wing328
* Python: @spacether [:heart:][spacether sponsorship] * Python: @spacether [:heart:][spacether sponsorship]
* Python-Experimental: @spacether [:heart:][spacether sponsorship] * Python-Experimental: @spacether [:heart:][spacether sponsorship]
* Python (refactored in 7.0.0): @wing328
* R: @ramnov * R: @ramnov
* Ruby (Faraday): @meganemura @dkliban * Ruby (Faraday): @meganemura @dkliban
* Ruby (HTTPX): @honeyryderchuck
* Rust: @farcaller * Rust: @farcaller
* Rust (rust-server): @metaswitch * Rust (rust-server): @metaswitch
* Scala (scalaz & http4s): @tbrown1979 * Scala (scalaz & http4s): @tbrown1979
@@ -1174,7 +1168,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) | | Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) | | PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) |
| PowerShell | @wing328 (2020/05) | | PowerShell | @wing328 (2020/05) |
| Python | @cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10) @multani (2023/10) | | Python | @krjakbrjak (2023/02) |
| R | @Ramanth (2019/07) @saigiridhar21 (2019/07) | | R | @Ramanth (2019/07) @saigiridhar21 (2019/07) |
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) | | Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) | | Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) |
@@ -1267,3 +1261,4 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--- ---

View File

@@ -13,7 +13,7 @@ install:
- cmd: docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 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: Start-Sleep -s 120
- ps: $PSVersionTable.PSVersion - ps: $PSVersionTable.PSVersion
- ps: Install-Module -Name Pester -Force -Scope CurrentUser -SkipPublisherCheck - ps: Install-Module -Name Pester -Force -Scope CurrentUser
build_script: build_script:
- dotnet --info - dotnet --info
# build C# aspnetcore 5.0 server # build C# aspnetcore 5.0 server

View File

@@ -13,5 +13,3 @@ parameterNameMappings:
additionalProperties: additionalProperties:
modelPackage: Samples.Petstore modelPackage: Samples.Petstore
projectName: Petstore projectName: Petstore
enumNameMappings:
sold: UNAVAILABLE

View File

@@ -9,4 +9,3 @@ additionalProperties:
useCompareNetObjects: true useCompareNetObjects: true
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
nullableReferenceTypes: true nullableReferenceTypes: true
equatable: true

View File

@@ -9,4 +9,3 @@ additionalProperties:
useCompareNetObjects: true useCompareNetObjects: true
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
nullableReferenceTypes: true nullableReferenceTypes: true
equatable: true

View File

@@ -10,4 +10,3 @@ additionalProperties:
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
useSourceGeneration: true useSourceGeneration: true
packageName: UseSourceGeneration packageName: UseSourceGeneration
equatable: true

View File

@@ -9,4 +9,3 @@ additionalProperties:
useCompareNetObjects: true useCompareNetObjects: true
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
nullableReferenceTypes: true nullableReferenceTypes: true
equatable: true

View File

@@ -9,4 +9,3 @@ additionalProperties:
useCompareNetObjects: true useCompareNetObjects: true
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
nullableReferenceTypes: true nullableReferenceTypes: true
equatable: true

View File

@@ -9,4 +9,3 @@ additionalProperties:
useCompareNetObjects: true useCompareNetObjects: true
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
nullableReferenceTypes: false nullableReferenceTypes: false
equatable: true

View File

@@ -9,4 +9,3 @@ additionalProperties:
useCompareNetObjects: true useCompareNetObjects: true
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
targetFramework: netstandard2.0 targetFramework: netstandard2.0
equatable: true

View File

@@ -10,4 +10,3 @@ additionalProperties:
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
useOneOfDiscriminatorLookup: true useOneOfDiscriminatorLookup: true
targetFramework: netstandard2.0 targetFramework: netstandard2.0
equatable: true

View File

@@ -7,4 +7,3 @@ additionalProperties:
targetFramework: net6.0 targetFramework: net6.0
setCompareNetObjects: "true" setCompareNetObjects: "true"
hideGenerationTimestamp: "true" hideGenerationTimestamp: "true"
equatable: true

View File

@@ -6,4 +6,3 @@ additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
targetFramework: netstandard2.1;net47 targetFramework: netstandard2.1;net47
useCompareNetObjects: "true" useCompareNetObjects: "true"
equatable: true

View File

@@ -10,4 +10,3 @@ additionalProperties:
useOneOfDiscriminatorLookup: true useOneOfDiscriminatorLookup: true
targetFramework: net47 targetFramework: net47
skipOneOfAnyOfGetter: true skipOneOfAnyOfGetter: true
equatable: true

View File

@@ -9,4 +9,3 @@ additionalProperties:
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
useOneOfDiscriminatorLookup: true useOneOfDiscriminatorLookup: true
targetFramework: net48 targetFramework: net48
equatable: true

View File

@@ -16,4 +16,3 @@ additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
hideGenerationTimestamp: "true" hideGenerationTimestamp: "true"
targetFramework: net6.0 targetFramework: net6.0
equatable: true

View File

@@ -6,4 +6,3 @@ additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
targetFramework: net7.0 targetFramework: net7.0
useCompareNetObjects: "true" useCompareNetObjects: "true"
equatable: true

View File

@@ -9,6 +9,3 @@ additionalProperties:
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
useOneOfDiscriminatorLookup: true useOneOfDiscriminatorLookup: true
targetFramework: net7.0 targetFramework: net7.0
equatable: true
enumNameMappings:
delivered: Shipped

View File

@@ -6,6 +6,5 @@ additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
targetFramework: netstandard2.0 targetFramework: netstandard2.0
useCompareNetObjects: "true" useCompareNetObjects: "true"
equatable: true
globalProperties: globalProperties:
skipFormModel: "false" skipFormModel: "false"

View File

@@ -10,4 +10,3 @@ additionalProperties:
useOneOfDiscriminatorLookup: true useOneOfDiscriminatorLookup: true
targetFramework: netstandard2.0 targetFramework: netstandard2.0
conditionalSerialization: true conditionalSerialization: true
equatable: true

View File

@@ -9,4 +9,3 @@ additionalProperties:
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
useOneOfDiscriminatorLookup: true useOneOfDiscriminatorLookup: true
targetFramework: netstandard2.0 targetFramework: netstandard2.0
equatable: true

View File

@@ -6,4 +6,3 @@ templateDir: modules/openapi-generator/src/main/resources/csharp
library: unityWebRequest library: unityWebRequest
additionalProperties: additionalProperties:
targetFramework: netstandard2.0 targetFramework: netstandard2.0
equatable: true

View File

@@ -4,5 +4,3 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/dart2 templateDir: modules/openapi-generator/src/main/resources/dart2
additionalProperties: additionalProperties:
hideGenerationTimestamp: "true" hideGenerationTimestamp: "true"
enumNameMappings:
delivered: shipped

View File

@@ -1,9 +0,0 @@
generatorName: go
outputDir: samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-addpet-only.yaml
templateDir: modules/openapi-generator/src/main/resources/go
additionalProperties:
enumClassPrefix: "true"
packageName: petstore
disallowAdditionalPropertiesIfNotPresent: false
generateMarshalJSON: false

View File

@@ -15,6 +15,4 @@ additionalProperties:
packageName: petstore packageName: petstore
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
generateInterfaces: true generateInterfaces: true
enumNameMappings:
delivered: SHIPPED

View File

@@ -0,0 +1,8 @@
generatorName: java
outputDir: samples/client/petstore/java/jersey1
library: jersey1
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
hideGenerationTimestamp: "true"
artifactId: petstore-java-client-jersey1

View File

@@ -1,10 +0,0 @@
generatorName: java
outputDir: samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
library: microprofile
inputSpec: modules/openapi-generator/src/test/resources/3_1/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: microprofile-rest-client
configKey: petstore
useSingleRequestParameter: true
microprofileRestClientVersion: "3.0"

View File

@@ -1,7 +0,0 @@
generatorName: java
outputDir: samples/client/others/java/okhttp-gson-oneOf
library: okhttp-gson
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf_twoPrimitives.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
hideGenerationTimestamp: "true"

View File

@@ -14,6 +14,3 @@ additionalProperties:
hideGenerationTimestamp: "true" hideGenerationTimestamp: "true"
useOneOfDiscriminatorLookup: "true" useOneOfDiscriminatorLookup: "true"
disallowAdditionalPropertiesIfNotPresent: false disallowAdditionalPropertiesIfNotPresent: false
enumNameMappings:
s: LOWER_CASE_S
S: UPPER_CASE_S

View File

@@ -1,10 +0,0 @@
generatorName: java
outputDir: samples/client/echo_api/java/resttemplate
library: resttemplate
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: echo-api-resttemplate
hideGenerationTimestamp: "true"
java8: true
containerDefaultToNull: true

View File

@@ -1,9 +0,0 @@
generatorName: java
outputDir: samples/client/others/java/resttemplate-useAbstractionForFiles
library: resttemplate
inputSpec: modules/openapi-generator/src/test/resources/3_0/issue13146_file_abstraction_response.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: file-resttemplate
hideGenerationTimestamp: "true"
useAbstractionForFiles: true

View File

@@ -0,0 +1,6 @@
generatorName: java-undertow-server
outputDir: samples/server/petstore/java-undertow
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/java-undertow-server
additionalProperties:
hideGenerationTimestamp: "true"

View File

@@ -1,6 +0,0 @@
generatorName: java-undertow-server
outputDir: samples/server/petstore/java-undertow
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/java-undertow-server
additionalProperties:
hideGenerationTimestamp: "true"

View File

@@ -1,9 +0,0 @@
generatorName: java
outputDir: samples/client/others/java/webclient-useAbstractionForFiles
library: webclient
inputSpec: modules/openapi-generator/src/test/resources/3_0/issue13146_file_abstraction_response.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: file-webclient
hideGenerationTimestamp: "true"
useAbstractionForFiles: true

View File

@@ -0,0 +1,10 @@
generatorName: jaxrs-jersey
outputDir: samples/server/petstore/jaxrs/jersey1-useTags
library: jersey1
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS
additionalProperties:
artifactId: jaxrs-jersey1-useTags
hideGenerationTimestamp: "true"
serverPort: "8082"
useTags: "true"

View File

@@ -0,0 +1,9 @@
generatorName: jaxrs-jersey
outputDir: samples/server/petstore/jaxrs/jersey1
library: jersey1
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS
additionalProperties:
artifactId: jaxrs-jersey1-server
hideGenerationTimestamp: "true"
serverPort: "8082"

View File

@@ -1,9 +0,0 @@
generatorName: jaxrs-jersey
outputDir: samples/server/petstore/jaxrs/jersey3
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS
library: jersey3
additionalProperties:
artifactId: jaxrs-jersey3-petstore-server
hideGenerationTimestamp: "true"
serverPort: "8082"

View File

@@ -1,4 +0,0 @@
generatorName: jmeter
outputDir: samples/client/petstore/jmeter
inputSpec: modules/openapi-generator/src/test/resources/3_0/jmeter/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/jmeter-client

View File

@@ -5,4 +5,3 @@ templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties: additionalProperties:
artifactId: kotlin-array-simple-string-multiplatform artifactId: kotlin-array-simple-string-multiplatform
library: multiplatform library: multiplatform
dateLibrary: kotlinx-datetime

View File

@@ -5,4 +5,3 @@ templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties: additionalProperties:
artifactId: kotlin-bigdecimal-default-multiplatform artifactId: kotlin-bigdecimal-default-multiplatform
library: multiplatform library: multiplatform
dateLibrary: kotlinx-datetime

View File

@@ -5,5 +5,4 @@ templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties: additionalProperties:
artifactId: kotlin-default-values-multiplatform artifactId: kotlin-default-values-multiplatform
library: multiplatform library: multiplatform
dateLibrary: kotlinx-datetime
sortParamsByRequiredFlag: false sortParamsByRequiredFlag: false

View File

@@ -7,5 +7,3 @@ additionalProperties:
serializableModel: "true" serializableModel: "true"
dateLibrary: java8 dateLibrary: java8
enumUnknownDefaultCase: true enumUnknownDefaultCase: true
enumNameMappings:
CHRISTMAS_DAY: XMAS_DAY

Some files were not shown because too many files have changed in this diff Show More