Compare commits

..

3 Commits

Author SHA1 Message Date
William Cheng
8ecf9e352d fix additional properties any type 2023-07-30 16:25:18 +08:00
William Cheng
07d4f7d534 update template and samples 2023-07-30 16:20:45 +08:00
William Cheng
659885f509 better additional properties support 2023-07-30 16:15:07 +08:00
32234 changed files with 684438 additions and 2743177 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
@@ -141,7 +152,7 @@ commands: # a reusable command with parameters
jobs: jobs:
node0: node0:
machine: machine:
image: ubuntu-2004:2024.01.1 image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-generator working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login shell: /bin/bash --login
environment: environment:
@@ -154,7 +165,7 @@ jobs:
nodeNo: "0" nodeNo: "0"
node1: node1:
machine: machine:
image: ubuntu-2004:2024.01.1 image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-generator working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login shell: /bin/bash --login
environment: environment:
@@ -167,7 +178,7 @@ jobs:
nodeNo: "1" nodeNo: "1"
node2: node2:
machine: machine:
image: ubuntu-2004:2024.01.1 image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-generator working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login shell: /bin/bash --login
environment: environment:
@@ -180,7 +191,7 @@ jobs:
nodeNo: "2" nodeNo: "2"
node3: node3:
machine: machine:
image: ubuntu-2004:2024.01.1 image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-generator working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login shell: /bin/bash --login
environment: environment:
@@ -192,6 +203,20 @@ jobs:
- checkout - checkout
- command_build_and_test: - command_build_and_test:
nodeNo: "3" nodeNo: "3"
node4:
docker:
- image: fkrull/multi-python
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
- checkout
- command_docker_build_and_test:
nodeNo: "4"
workflows: workflows:
version: 2 version: 2
build: build:
@@ -200,3 +225,4 @@ workflows:
- node1 - node1
- node2 - node2
- node3 - node3
- node4

View File

@@ -9,13 +9,7 @@
"ghcr.io/devcontainers/features/node:1": { "ghcr.io/devcontainers/features/node:1": {
"version": "lts" "version": "lts"
}, },
"ghcr.io/devcontainers/features/rust:1": {}, "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": {
@@ -26,8 +20,8 @@
"java.configuration.runtimes": [ "java.configuration.runtimes": [
{ {
"name": "JavaSE-11", "name": "JavaSE-11",
"path": "/usr/local/sdkman/candidates/java/current", "path": "/usr/local/sdkman/candidates/java/11.0.16.1-ms",
"sources": "/usr/local/sdkman/candidates/java/current/lib/src.zip", "sources": "/usr/local/sdkman/candidates/java/11.0.16.1-ms/lib/src.zip",
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api", "javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
"default": true "default": true
} }

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": [
@@ -782,6 +800,12 @@
"Client: Python" "Client: Python"
] ]
}, },
{
"input": "python-server-flask-petstore-python2.sh",
"matches": [
"Server: Python"
]
},
{ {
"input": "python-server-flask-petstore.sh", "input": "python-server-flask-petstore.sh",
"matches": [ "matches": [

27
.github/CODEOWNERS vendored
View File

@@ -12,19 +12,24 @@ modules/openapi-generator-core/**/* @OpenAPITools/generator-core-team
# No need for auto-generated subdirectories (reduces noise) # No need for auto-generated subdirectories (reduces noise)
docs/ @OpenAPITools/generator-core-team docs/ @OpenAPITools/generator-core-team
## Individual interests
.github/**/* @jimschubert
scripts/**/* @jimschubert
website/**/* @jimschubert
bin/ci/**/* @jimschubert
## Build related ## Build related
CI/**/* @OpenAPITools/build CI/**/* @OpenAPITools/build
.mvn/**/* @OpenAPITools/build .mvn/**/* @OpenAPITools/build
bin/utils/**/* @OpenAPITools/build bin/utils/**/* @OpenAPITools/build
# cpp-qt-client technical committee ## Module-specific
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @ravinikam modules/openapi-generator-cli/**/* @jimschubert
samples/client/petstore/cpp-qt/**/* @ravinikam modules/openapi-generator-gradle-plugin/**/* @jimschubert
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @stkrwork modules/openapi-generator-maven-plugin/**/* @jimschubert
samples/client/petstore/cpp-qt/**/* @stkrwork
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @etherealjoy # Martin Delille
samples/client/petstore/cpp-qt/**/* @etherealjoy /Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtClientCodegen.java @martindelille
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/CppQtAbstractCodegen.java @martindelille
samples/client/petstore/cpp-qt/**/* @martindelille /Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/resources/cpp-qt-client @martindelille
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd /Users/martin/dev/clone/openapi-generator/samples/client/petstore/cpp-qt @martindelille
samples/client/petstore/cpp-qt/**/* @muttleyxd

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.6.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` (6.3.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks)
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request. - [ ] 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,21 +15,19 @@ 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'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v3
- name: Test run-in-docker.sh - name: Test run-in-docker.sh
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

@@ -13,14 +13,14 @@ jobs:
name: Gradle plugin tests name: Gradle plugin tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:

View File

@@ -10,7 +10,7 @@ on:
- 'samples/client/petstore/java/**' - 'samples/client/petstore/java/**'
- 'samples/openapi3/client/petstore/java/**' - 'samples/openapi3/client/petstore/java/**'
env: env:
GRADLE_VERSION: 8.7 GRADLE_VERSION: 7.2
jobs: jobs:
build: build:
@@ -30,21 +30,21 @@ jobs:
- samples/client/petstore/java/okhttp-gson-group-parameter - samples/client/petstore/java/okhttp-gson-group-parameter
- samples/client/petstore/java/webclient-swagger2 - samples/client/petstore/java/webclient-swagger2
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
# Cache Gradle Dependencies # Cache Gradle Dependencies
- name: Setup Gradle Dependencies Cache - name: Setup Gradle Dependencies Cache
uses: actions/cache@v4 uses: actions/cache@v3
with: with:
path: ~/.gradle/caches path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
# Cache Gradle Wrapper # Cache Gradle Wrapper
- name: Setup Gradle Wrapper Cache - name: Setup Gradle Wrapper Cache
uses: actions/cache@v4 uses: actions/cache@v3
with: with:
path: ~/.gradle/wrapper path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

View File

@@ -20,22 +20,22 @@ jobs:
os: [ubuntu-latest] os: [ubuntu-latest]
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v3
- 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 }}
- uses: actions/cache@v4 - uses: actions/cache@v3
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }} key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
restore-keys: | restore-keys: |
${{ runner.os }}-maven- ${{ runner.os }}-maven-
- uses: actions/cache@v4 - uses: actions/cache@v3
with: with:
path: | path: |
~/.gradle/caches ~/.gradle/caches
@@ -45,7 +45,7 @@ jobs:
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Setup Maven - name: Setup Maven
uses: s4u/setup-maven-action@v1.14.0 uses: s4u/setup-maven-action@v1.8.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
@@ -85,14 +85,14 @@ jobs:
os: [ubuntu-latest] os: [ubuntu-latest]
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v3
- name: Setup Maven - name: Setup Maven
uses: s4u/setup-maven-action@v1.14.0 uses: s4u/setup-maven-action@v1.8.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

@@ -13,14 +13,14 @@ jobs:
name: Maven plugin tests name: Maven plugin tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:
@@ -39,7 +39,6 @@ jobs:
run: | run: |
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true ./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error ./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean install -f modules/openapi-generator-maven-plugin/examples/multi-module/sample-external-ref-schema/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error ./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error ./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error ./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error

View File

@@ -15,7 +15,7 @@ jobs:
name: Misc tests name: Misc tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
ruby-version: '2.6' ruby-version: '2.6'

View File

@@ -15,14 +15,14 @@ jobs:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:
@@ -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
@@ -53,14 +53,14 @@ jobs:
needs: needs:
- build - build
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:
@@ -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'
@@ -90,14 +90,14 @@ jobs:
needs: needs:
- build - build
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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
@@ -129,51 +129,19 @@ jobs:
- build - build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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
- name: Delete samples that are entirely generated
run: |
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
rm -rf samples/client/petstore/csharp/generichost/net4.8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net4.8/FormModels
rm -rf samples/client/petstore/csharp/generichost/net4.8/OneOf
rm -rf samples/client/petstore/csharp/generichost/net4.8/Petstore
rm -rf samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
rm -rf samples/client/petstore/csharp/generichost/net4.7/AllOf
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net4.7/FormModels
rm -rf samples/client/petstore/csharp/generichost/net4.7/OneOf
rm -rf samples/client/petstore/csharp/generichost/net4.7/Petstore
rm -rf samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
- name: Generate samples - name: Generate samples
run: | run: bash bin/generate-samples.sh
bash bin/generate-samples.sh
# when a sample is deleted, you have to generate it twice for all files to get created
bash bin/generate-samples.sh
- name: Verify git status - name: Verify git status
run: | run: |
if [[ "$(git status --porcelain)" != "" ]]; then if [[ "$(git status --porcelain)" != "" ]]; then

View File

@@ -4,31 +4,22 @@ on:
push: push:
paths: paths:
- 'samples/client/petstore/c/**' - 'samples/client/petstore/c/**'
- 'samples/client/petstore/c-useJsonUnformatted/**'
pull_request: pull_request:
paths: paths:
- 'samples/client/petstore/c/**' - 'samples/client/petstore/c/**'
- 'samples/client/petstore/c-useJsonUnformatted/**'
jobs: jobs:
build: build:
name: Build c libcurl client name: Build c libcurl client
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/client/petstore/c/'
- 'samples/client/petstore/c-useJsonUnformatted/'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- name: Prepare - name: Prepare
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libssl-dev libcurl4-openssl-dev sudo apt-get install -y libssl-dev libcurl4-openssl-dev
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: "samples/client/petstore/c"
run: | run: |
mkdir build mkdir build
cd build cd build

View File

@@ -3,10 +3,10 @@ name: Samples cpp qt client
on: on:
push: push:
branches: branches:
- "samples/client/petstore/cpp-qt*/**" - 'samples/client/petstore/cpp-qt/**'
pull_request: pull_request:
paths: paths:
- "samples/client/petstore/cpp-qt*/**" - 'samples/client/petstore/cpp-qt/**'
env: env:
GRADLE_VERSION: 6.9 GRADLE_VERSION: 6.9
@@ -16,21 +16,23 @@ jobs:
name: Build cpp qt client name: Build cpp qt client
strategy: strategy:
matrix: matrix:
sample: qt-version:
- samples/client/petstore/cpp-qt - '5.15.2'
- samples/client/petstore/cpp-qt-addDownloadProgress - '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@v3
- name: Install Qt - uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with: with:
version: "6.7.1" version: ${{ matrix.qt-version }}
target: "desktop" tools: ${{ matrix.tools }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: "samples/client/petstore/cpp-qt"
run: cmake . && cmake --build . --verbose run: cmake . && cmake --build .

View File

@@ -17,14 +17,14 @@ jobs:
name: Tests Dart name: Tests Dart
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
cache: maven cache: maven
- name: Cache test dependencies - name: Cache test dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: pub-cache cache-name: pub-cache
with: with:

View File

@@ -1,42 +0,0 @@
name: Samples C# .Net Framework Clients
on:
push:
paths:
- samples/client/petstore/csharp/generichost/net4.7/**
- samples/client/petstore/csharp/generichost/net4.8/**
pull_request:
paths:
- samples/client/petstore/csharp/generichost/net4.7/**
- samples/client/petstore/csharp/generichost/net4.8/**
jobs:
build:
name: Build .Net projects
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/generichost/net4.7/AllOf
- samples/client/petstore/csharp/generichost/net4.7/AnyOf
- samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
- samples/client/petstore/csharp/generichost/net4.7/FormModels
- samples/client/petstore/csharp/generichost/net4.7/OneOf
- samples/client/petstore/csharp/generichost/net4.7/Petstore
- samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
- samples/client/petstore/csharp/generichost/net4.8/AllOf
- samples/client/petstore/csharp/generichost/net4.8/AnyOf
- samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
- samples/client/petstore/csharp/generichost/net4.8/FormModels
- samples/client/petstore/csharp/generichost/net4.8/OneOf
- samples/client/petstore/csharp/generichost/net4.8/Petstore
- samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
steps:
- uses: actions/checkout@v4
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@@ -1,18 +1,12 @@
name: Samples C# .Net Standard Client name: Samples C# .Net Standard
on: on:
push: push:
paths: paths:
- samples/client/petstore/csharp/generichost/standard2.0/** - 'samples/client/petstore/csharp/**netstandard**/'
- samples/client/petstore/csharp/httpclient/standard2.0/**
- samples/client/petstore/csharp/restsharp/standard2.0/**
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
pull_request: pull_request:
paths: paths:
- samples/client/petstore/csharp/generichost/standard2.0/** - 'samples/client/petstore/csharp/**netstandard**/'
- samples/client/petstore/csharp/httpclient/standard2.0/**
- samples/client/petstore/csharp/restsharp/standard2.0/**
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
jobs: jobs:
build: build:
name: Build .Net projects name: Build .Net projects
@@ -21,21 +15,16 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
sample: sample:
- samples/client/petstore/csharp/generichost/standard2.0/Petstore/ # clients
- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/ - samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4.0.1 - uses: actions/setup-dotnet@v3.2.0
with: with:
dotnet-version: 3.1.* dotnet-version: 3.1.*
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln run: dotnet build Org.OpenAPITools.sln
# skip tests as petstore server it not running - name: Test
# these tests are run in appveyor instead working-directory: ${{ matrix.sample }}
#- name: Test run: dotnet test Org.OpenAPITools.sln
# working-directory: ${{ matrix.sample }}
# run: dotnet test Org.OpenAPITools.sln

View File

@@ -1,18 +1,25 @@
name: Samples C# .Net 8 Clients name: Samples C# .Net 7
on: on:
push: push:
paths: paths:
- samples/client/petstore/csharp/generichost/net8/** - 'samples/client/petstore/csharp/**net6.0**/'
- samples/client/petstore/csharp/httpclient/net8/** - 'samples/client/petstore/csharp/OpenAPIClient-generichost-netcore**/'
- samples/client/petstore/csharp/restsharp/net8/** - 'samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/**'
- samples/client/petstore/csharp/unityWebRequest/net8/** - 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
pull_request: pull_request:
paths: paths:
- samples/client/petstore/csharp/generichost/net8/** - 'samples/client/petstore/csharp/**net6.0**/'
- samples/client/petstore/csharp/httpclient/net8/** - 'samples/client/petstore/csharp/OpenAPIClient-generichost-netcore**/'
- samples/client/petstore/csharp/restsharp/net8/** - 'samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/**'
- samples/client/petstore/csharp/unityWebRequest/net8/** - 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-project4Models/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
- 'samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/**'
- 'samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/**'
jobs: jobs:
build: build:
name: Build .Net projects name: Build .Net projects
@@ -21,22 +28,24 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
sample: sample:
- samples/client/petstore/csharp/generichost/net8/AllOf # clients
- samples/client/petstore/csharp/generichost/net8/AnyOf - samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0
- samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare - samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt
- samples/client/petstore/csharp/generichost/net8/FormModels - samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf
- samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests - samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf
- samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests - samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf
- samples/client/petstore/csharp/generichost/net8/NullReferenceTypes - samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests
- samples/client/petstore/csharp/generichost/net8/OneOf - samples/server/petstore/aspnetcore-6.0
- samples/client/petstore/csharp/generichost/net8/Petstore - samples/server/petstore/aspnetcore-6.0-pocoModels
- samples/client/petstore/csharp/generichost/net8/SourceGeneration - samples/server/petstore/aspnetcore-6.0-project4Models
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate - samples/server/petstore/aspnetcore-6.0-useSwashBuckle
- samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4.0.1 - 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

@@ -1,4 +1,4 @@
name: Samples C# .Net 6 Client Echo API name: Samples C# .Net 6
on: on:
push: push:
@@ -18,8 +18,8 @@ jobs:
# clients # clients
- samples/client/echo_api/csharp-restsharp/ - samples/client/echo_api/csharp-restsharp/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4.0.1 - 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

@@ -1,12 +1,48 @@
name: Samples C# .Net 6 Client name: Samples C# .Net 6
on: on:
push: push:
paths: paths:
- samples/client/petstore/csharp/restsharp/net6/** # build C# API client (multiple frameworks)
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/**
# build C# API client (httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
# build C# API client (generichost)
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/**
# build C# API client (netcore)
- samples/client/petstore/csharp/OpenAPIClient/**
- samples/client/petstore/csharp/OpenAPIClientCore/**
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp/OpenAPIClient-net47/**
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp/OpenAPIClient-net48/**
# build C# API client (.net 5.0)
- samples/client/petstore/csharp/OpenAPIClient-net5.0/**
# build C# API client (.net 5.0 with ConditionalSerialization)
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/**
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp-restsharp-name-parameter-mappings/**
pull_request: pull_request:
paths: paths:
- samples/client/petstore/csharp/restsharp/net6/** # build C# API client (multiple frameworks)
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/**
# build C# API client (httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
# build C# API client (generichost)
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/**
# build C# API client (netcore)
- samples/client/petstore/csharp/OpenAPIClient/**
- samples/client/petstore/csharp/OpenAPIClientCore/**
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp/OpenAPIClient-net47/**
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp/OpenAPIClient-net48/**
# build C# API client (.net 5.0)
- samples/client/petstore/csharp/OpenAPIClient-net5.0/**
# build C# API client (.net 5.0 with ConditionalSerialization)
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/**
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp-restsharp-name-parameter-mappings/**
jobs: jobs:
build: build:
name: Build .Net clients name: Build .Net clients
@@ -15,10 +51,29 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
sample: sample:
- samples/client/petstore/csharp/restsharp/net6/ParameterMappings/ # clients
# build C# API client (multiple frameworks)
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/
# build C# API client (httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/
# build C# API client (generichost)
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/
# build C# API client (netcore)
- samples/client/petstore/csharp/OpenAPIClient/
- samples/client/petstore/csharp/OpenAPIClientCore/
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp/OpenAPIClient-net47/
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp/OpenAPIClient-net48/
# build C# API client (.net 5.0)
- samples/client/petstore/csharp/OpenAPIClient-net5.0/
# build C# API client (.net 5.0 with ConditionalSerialization)
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp-restsharp-name-parameter-mappings
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4.0.1 - 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,31 +1,36 @@
name: Samples C# .Net 6 Server name: Samples C# .Net 6
on: on:
push: push:
paths: paths:
- samples/server/petstore/aspnetcore-6.0/** - 'samples/server/petstore/aspnetcore-6.0/**'
- samples/server/petstore/aspnetcore-6.0-*/** - 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
pull_request: pull_request:
paths: paths:
- samples/server/petstore/aspnetcore-6.0/** - 'samples/server/petstore/aspnetcore-6.0/**'
- samples/server/petstore/aspnetcore-6.0-*/** - 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-project4Models/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
- 'samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/**'
- 'samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/**'
jobs: jobs:
build: build:
name: Build .Net 6 servers name: Build .Net servers
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
sample: sample:
- samples/server/petstore/aspnetcore-6.0 - samples/server/petstore/aspnetcore-6.0
- samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
- samples/server/petstore/aspnetcore-6.0-pocoModels - samples/server/petstore/aspnetcore-6.0-pocoModels
- samples/server/petstore/aspnetcore-6.0-project4Models - samples/server/petstore/aspnetcore-6.0-project4Models
- samples/server/petstore/aspnetcore-6.0-useSwashBuckle - samples/server/petstore/aspnetcore-6.0-useSwashBuckle
- samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4.0.1 - 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,36 +0,0 @@
name: Samples C# .Net 8 Server
on:
push:
paths:
- samples/server/petstore/aspnetcore-8.0/**
- samples/server/petstore/aspnetcore-8.0-*/**
pull_request:
paths:
- samples/server/petstore/aspnetcore-8.0/**
- samples/server/petstore/aspnetcore-8.0-*/**
jobs:
build:
name: Build .Net 8 servers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/aspnetcore-8.0
- samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse
- samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes
- samples/server/petstore/aspnetcore-8.0-pocoModels
- samples/server/petstore/aspnetcore-8.0-project4Models
- samples/server/petstore/aspnetcore-8.0-useSwashBuckle
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '8.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@@ -21,8 +21,8 @@ jobs:
- samples/client/petstore/elm - samples/client/petstore/elm
- samples/openapi3/client/elm - samples/openapi3/client/elm
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: jorelali/setup-elm@v6 - uses: jorelali/setup-elm@v5
with: with:
elm-version: 0.19.1 elm-version: 0.19.1
- name: Build - name: Build

View File

@@ -26,7 +26,7 @@ jobs:
- samples/client/petstore/erlang-client/ - samples/client/petstore/erlang-client/
- samples/client/petstore/erlang-proper/ - samples/client/petstore/erlang-proper/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: '22.2' otp-version: '22.2'

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

@@ -1,31 +0,0 @@
name: Samples Go
on:
push:
paths:
- 'samples/server/petstore/go-gin-api-server/**'
- 'samples/server/petstore/go-gin-api-server-interface-only/**'
pull_request:
paths:
- 'samples/server/petstore/go-gin-api-server/**'
- 'samples/server/petstore/go-gin-api-server-interface-only/**'
jobs:
build:
name: Build Go
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/go-gin-api-server/
- samples/server/petstore/go-gin-api-server-interface-only/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
- run: go version
- name: Run test
working-directory: ${{ matrix.sample }}
run: go test -mod=mod -v

View File

@@ -1,4 +1,4 @@
name: Samples Go name: Samples Go
on: on:
push: push:
@@ -6,17 +6,15 @@ on:
- 'samples/server/petstore/go-echo-server/**' - 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**' - 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**' - 'samples/server/petstore/go-chi-server/**'
- 'samples/server/others/go-server/no-body-path-params/**'
pull_request: pull_request:
paths: paths:
- 'samples/server/petstore/go-echo-server/**' - 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**' - 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**' - 'samples/server/petstore/go-chi-server/**'
- 'samples/server/others/go-server/no-body-path-params/**'
jobs: jobs:
build: build:
name: Build Go name: Build Go
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@@ -25,10 +23,9 @@ jobs:
- samples/server/petstore/go-echo-server/ - samples/server/petstore/go-echo-server/
- samples/server/petstore/go-api-server/ - samples/server/petstore/go-api-server/
- samples/server/petstore/go-chi-server/ - samples/server/petstore/go-chi-server/
- samples/server/others/go-server/no-body-path-params/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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

@@ -21,13 +21,13 @@ jobs:
sample: sample:
- samples/client/petstore/groovy - samples/client/petstore/groovy
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -35,7 +35,7 @@ jobs:
~/.gradle ~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Gradle wrapper - name: Install Gradle wrapper
uses: eskatos/gradle-command-action@v3 uses: eskatos/gradle-command-action@v2
with: with:
gradle-version: ${{ env.GRADLE_VERSION }} gradle-version: ${{ env.GRADLE_VERSION }}
build-root-directory: ${{ matrix.sample }} build-root-directory: ${{ matrix.sample }}

View File

@@ -1,39 +0,0 @@
name: Samples Haskell
on:
push:
paths:
- samples/server/petstore/haskell-yesod/**
- samples/server/petstore/haskell-servant/**
- samples/server/others/haskell-servant-ping/**
- samples/client/petstore/haskell-http-client/**
pull_request:
paths:
- samples/server/petstore/haskell-yesod/**
- samples/server/petstore/haskell-servant/**
- samples/server/others/haskell-servant-ping/**
- samples/client/petstore/haskell-http-client/**
jobs:
build:
name: Build stack projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/haskell-yesod/
- samples/server/petstore/haskell-servant/
- samples/server/others/haskell-servant-ping/
- samples/client/petstore/haskell-http-client/
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
with:
# ghc-version: '8.8.4' # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- name: stack test
working-directory: ${{ matrix.sample }}
run: stack test

View File

@@ -19,16 +19,14 @@ 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
- samples/client/echo_api/java/resteasy
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -36,11 +34,11 @@ 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
(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: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -1,47 +0,0 @@
name: Java Client (Echo API) JDK17
on:
push:
paths:
- samples/client/echo_api/java/**
pull_request:
paths:
- samples/client/echo_api/java/**
jobs:
build:
name: Build Java Client JDK17
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/java/apache-httpclient
- samples/client/echo_api/java/native
- samples/client/echo_api/java/feign-gson
- samples/client/echo_api/java/resttemplate
- samples/client/echo_api/java/resteasy
- samples/client/echo_api/java/restclient
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: 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: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress

View File

@@ -6,14 +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/**
- samples/client/echo_api/java/resteasy/**
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/resteasy/**
jobs: jobs:
build: build:
name: Build Java Client JDK8 name: Build Java Client JDK8
@@ -26,16 +23,14 @@ 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
- samples/client/echo_api/java/resteasy
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -43,11 +38,11 @@ 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
(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: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -10,12 +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/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
- samples/client/others/java/resttemplate-list-schema-validation/**
pull_request: pull_request:
paths: paths:
- 'samples/client/petstore/java/**' - 'samples/client/petstore/java/**'
@@ -25,12 +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/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
- samples/client/others/java/resttemplate-list-schema-validation/**
jobs: jobs:
build: build:
name: Build Java Client JDK11 name: Build Java Client JDK11
@@ -55,17 +43,15 @@ jobs:
- samples/client/petstore/java/webclient-swagger2 - samples/client/petstore/java/webclient-swagger2
- samples/client/petstore/java/vertx - samples/client/petstore/java/vertx
- samples/client/petstore/java/jersey2-java8-localdatetime - samples/client/petstore/java/jersey2-java8-localdatetime
- samples/client/petstore/java/resteasy
- samples/client/petstore/java/google-api-client - samples/client/petstore/java/google-api-client
- samples/client/petstore/java/rest-assured - samples/client/petstore/java/rest-assured
- samples/client/petstore/java/rest-assured-jackson - samples/client/petstore/java/rest-assured-jackson
- samples/client/petstore/java/microprofile-rest-client - samples/client/petstore/java/microprofile-rest-client
- 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-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/
@@ -74,21 +60,14 @@ 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/echo_api/java/okhttp-gson-user-defined-templates/
- samples/client/others/java/resttemplate-useAbstractionForFiles/
- samples/client/others/java/webclient-useAbstractionForFiles/
- samples/client/others/java/jersey2-oneOf-duplicates/
- samples/client/others/java/jersey2-oneOf-Mixed/
- samples/client/others/java/resttemplate-list-schema-validation/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -97,4 +76,4 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -5,12 +5,10 @@ on:
paths: paths:
- samples/client/petstore/java/resttemplate-jakarta/** - samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
pull_request: pull_request:
paths: paths:
- samples/client/petstore/java/resttemplate-jakarta/** - samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
jobs: jobs:
build: build:
name: Build Java Client JDK17 name: Build Java Client JDK17
@@ -22,44 +20,23 @@ jobs:
# clients # clients
- samples/client/petstore/java/resttemplate-jakarta - samples/client/petstore/java/resttemplate-jakarta
- samples/client/petstore/java/webclient-jakarta - samples/client/petstore/java/webclient-jakarta
- samples/client/petstore/java/restclient
- samples/client/petstore/java/restclient-nullable-arrays
- samples/client/petstore/java/restclient-swagger2
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
path: | path: |
~/.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: Build with Maven - name: Build with Maven
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package
- name: Build with Gradle
- name: Cache gradle dependencies
uses: actions/cache@v4
env:
cache-name: gradle-caches
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
- name: Cache gradle wrapper
uses: actions/cache@v4
env:
cache-name: gradle-wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: ./gradlew build -x test run: gradle clean build

View File

@@ -1,44 +0,0 @@
name: Samples Java Helidon v3
on:
push:
paths:
- samples/client/petstore/java-helidon-client/v3/**
- samples/server/petstore/java-helidon-server/v3/**
- samples/server/others/java-helidon-server/v3/**
pull_request:
paths:
- samples/client/petstore/java-helidon-client/v3/**
- samples/server/petstore/java-helidon-server/v3/**
- samples/server/others/java-helidon-server/v3/**
jobs:
build:
name: Build Java Helidon
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/java-helidon-client/v3/mp
- samples/client/petstore/java-helidon-client/v3/se
- samples/server/petstore/java-helidon-server/v3/mp
- samples/server/petstore/java-helidon-server/v3/se
- samples/server/others/java-helidon-server/v3/mp-format-test
version: [17]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress

View File

@@ -1,45 +0,0 @@
name: Samples Java Helidon v4
on:
push:
paths:
- samples/client/petstore/java-helidon-client/v4/**
- samples/server/petstore/java-helidon-server/v4/**
- samples/server/others/java-helidon-server/v4/**
pull_request:
paths:
- samples/client/petstore/java-helidon-client/v4/**
- samples/server/petstore/java-helidon-server/v4/**
- samples/server/others/java-helidon-server/v4/**
jobs:
build:
name: Build Java Helidon
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/java-helidon-client/v4/mp
- samples/client/petstore/java-helidon-client/v4/se
- samples/server/petstore/java-helidon-server/v4/mp
- samples/server/petstore/java-helidon-server/v4/se
- samples/server/petstore/java-helidon-server/v4/se-uac
- samples/server/others/java-helidon-server/v4/mp-format-test
version: [21]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress

View File

@@ -0,0 +1,41 @@
name: Samples Java Helidon
on:
push:
paths:
- samples/client/petstore/java-helidon-client/**
- samples/server/petstore/java-helidon-server/**
pull_request:
paths:
- samples/client/petstore/java-helidon-client/**
- samples/server/petstore/java-helidon-server/**
jobs:
build:
name: Build Java Helidon
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/java-helidon-client/mp
- samples/client/petstore/java-helidon-client/se
- samples/server/petstore/java-helidon-server/mp
- samples/server/petstore/java-helidon-server/se
version: [17]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}
- 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

@@ -29,13 +29,13 @@ jobs:
- samples/server/petstore/java-play-framework-no-swagger-ui - samples/server/petstore/java-play-framework-no-swagger-ui
- 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@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -44,4 +44,4 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -3,19 +3,19 @@ name: Samples Java Server
on: on:
push: push:
paths: paths:
# java-camel is tested locally for the time being
#- 'samples/server/petstore/java-camel/**'
- 'samples/server/petstore/java-vertx-web/**' - 'samples/server/petstore/java-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/**'
- 'samples/server/petstore/java-microprofile/**'
pull_request: pull_request:
paths: paths:
#- 'samples/server/petstore/java-camel/**'
- '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/**'
- 'samples/server/petstore/java-microprofile/**'
jobs: jobs:
build: build:
name: Build Java Server name: Build Java Server
@@ -25,19 +25,19 @@ jobs:
matrix: matrix:
sample: sample:
# servers # servers
#- samples/server/petstore/java-camel/
- 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/
- samples/server/petstore/java-microprofile/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -46,4 +46,4 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package

View File

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

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@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress

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
@@ -38,13 +40,13 @@ jobs:
- samples/server/petstore/jaxrs-cxf-non-spring-app - samples/server/petstore/jaxrs-cxf-non-spring-app
- 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@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -53,4 +55,4 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -4,32 +4,26 @@ on:
paths: paths:
# clients # clients
- samples/openapi3/client/petstore/spring-cloud-3/** - samples/openapi3/client/petstore/spring-cloud-3/**
- samples/client/petstore/java-helidon-client/v3/mp/** - samples/client/petstore/java-helidon-client/mp/**
- samples/client/petstore/java-helidon-client/v3/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/**
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
# servers # servers
- samples/openapi3/server/petstore/springboot-3/** - samples/openapi3/server/petstore/springboot-3/**
- samples/server/petstore/java-camel/** - samples/server/petstore/java-helidon-server/mp/**
- samples/server/petstore/java-helidon-server/v3/mp/** - samples/server/petstore/java-helidon-server/se/**
- samples/server/petstore/java-helidon-server/v3/se/**
pull_request: pull_request:
paths: paths:
# clients # clients
- samples/openapi3/client/petstore/spring-cloud-3/** - samples/openapi3/client/petstore/spring-cloud-3/**
- samples/client/petstore/java-helidon-client/v3/mp/** - samples/client/petstore/java-helidon-client/mp/**
- samples/client/petstore/java-helidon-client/v3/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/**
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
# servers # servers
- samples/openapi3/server/petstore/springboot-3/** - samples/openapi3/server/petstore/springboot-3/**
- samples/server/petstore/java-camel/** - samples/server/petstore/java-helidon-server/mp/**
- samples/server/petstore/java-helidon-server/v3/mp/** - samples/server/petstore/java-helidon-server/se/**
- samples/server/petstore/java-helidon-server/v3/se/**
jobs: jobs:
build: build:
name: Build with JDK17 name: Build with JDK17
@@ -40,27 +34,24 @@ jobs:
sample: sample:
# clients # clients
- samples/openapi3/client/petstore/spring-cloud-3 - samples/openapi3/client/petstore/spring-cloud-3
- samples/client/petstore/java-helidon-client/v3/mp/ - samples/client/petstore/java-helidon-client/mp
- samples/client/petstore/java-helidon-client/v3/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
- samples/client/petstore/java/microprofile-rest-client-outer-enum
# servers # servers
- samples/openapi3/server/petstore/springboot-3 - samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/java-camel/ - samples/server/petstore/java-helidon-server/mp
- samples/server/petstore/java-helidon-server/v3/mp/ - samples/server/petstore/java-helidon-server/se
- samples/server/petstore/java-helidon-server/v3/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
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -69,4 +60,4 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -1,49 +0,0 @@
name: Samples JDK21
on:
push:
paths:
# clients
- samples/client/petstore/java-helidon-client/v4/mp/**
- samples/client/petstore/java-helidon-client/v4/se/**
# servers
- samples/server/petstore/java-helidon-server/v4/mp/**
- samples/server/petstore/java-helidon-server/v4/se/**
pull_request:
paths:
# clients
- samples/client/petstore/java-helidon-client/v4/mp/**
- samples/client/petstore/java-helidon-client/v4/se/**
# servers
- samples/server/petstore/java-helidon-server/v4/mp/**
- samples/server/petstore/java-helidon-server/v4/se/**
jobs:
build:
name: Build with JDK21
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/java-helidon-client/v4/mp/
- samples/client/petstore/java-helidon-client/v4/se/
# servers
- samples/server/petstore/java-helidon-server/v4/mp/
- samples/server/petstore/java-helidon-server/v4/se/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress

View File

@@ -15,8 +15,8 @@ jobs:
name: Tests Julia name: Tests Julia
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v2 - uses: julia-actions/setup-julia@v1
with: with:
version: 1.8 version: 1.8
arch: x64 arch: x64
@@ -30,7 +30,7 @@ jobs:
# Using develop mode to install package so that it is easier to modify the package test files # Using develop mode to install package so that it is easier to modify the package test files
julia -e "using Pkg; Pkg.develop(\"OpenAPI\");" julia -e "using Pkg; Pkg.develop(\"OpenAPI\");"
cd ~/.julia/dev/OpenAPI cd ~/.julia/dev/OpenAPI
git checkout v0.1.25 git checkout v0.1.14
cd $currdir cd $currdir
rm -rf ~/.julia/dev/OpenAPI/test/client/openapigenerator_petstore_v3/petstore rm -rf ~/.julia/dev/OpenAPI/test/client/openapigenerator_petstore_v3/petstore
rm -rf ~/.julia/dev/OpenAPI/test/server/openapigenerator_petstore_v3/petstore rm -rf ~/.julia/dev/OpenAPI/test/server/openapigenerator_petstore_v3/petstore

View File

@@ -4,11 +4,12 @@ on:
push: push:
branches: branches:
- 'samples/client/petstore/kotlin*/**' - 'samples/client/petstore/kotlin*/**'
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
pull_request: pull_request:
paths: paths:
- 'samples/client/petstore/kotlin*/**' - 'samples/client/petstore/kotlin*/**'
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
env:
GRADLE_VERSION: 6.9
jobs: jobs:
build: build:
@@ -22,34 +23,32 @@ jobs:
- samples/client/petstore/kotlin - samples/client/petstore/kotlin
- samples/client/petstore/kotlin-gson - samples/client/petstore/kotlin-gson
- samples/client/petstore/kotlin-jackson - samples/client/petstore/kotlin-jackson
- samples/client/petstore/kotlin-model-prefix-type-mappings
# needs Android configured # needs Android configured
#- samples/client/petstore/kotlin-json-request-string #- samples/client/petstore/kotlin-json-request-string
- samples/client/petstore/kotlin-jvm-okhttp4-coroutines - samples/client/petstore/kotlin-jvm-okhttp4-coroutines
- 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-retrofit2 - samples/client/petstore/kotlin-retrofit2
- samples/client/petstore/kotlin-retrofit2-kotlinx_serialization - samples/client/petstore/kotlin-retrofit2-kotlinx_serialization
- samples/client/petstore/kotlin-retrofit2-jackson
- 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-okhttp4 - samples/client/petstore/kotlin-default-values-jvm-okhttp4
- samples/client/petstore/kotlin-default-values-jvm-retrofit2 - samples/client/petstore/kotlin-default-values-jvm-retrofit2
- samples/client/petstore/kotlin-default-values-jvm-volley - samples/client/petstore/kotlin-default-values-jvm-volley
- samples/client/petstore/kotlin-default-values-multiplatform - samples/client/petstore/kotlin-default-values-multiplatform
- samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3
- samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4 - samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4
- samples/client/petstore/kotlin-array-simple-string-jvm-volley - samples/client/petstore/kotlin-array-simple-string-jvm-volley
- samples/client/petstore/kotlin-array-simple-string-multiplatform - samples/client/petstore/kotlin-array-simple-string-multiplatform
- samples/client/petstore/kotlin-bigdecimal-default-multiplatform - samples/client/petstore/kotlin-bigdecimal-default-multiplatform
- samples/client/petstore/kotlin-bigdecimal-default-okhttp4 - samples/client/petstore/kotlin-bigdecimal-default-okhttp4
- samples/client/petstore/kotlin-jvm-jackson
- samples/client/petstore/kotlin-jvm-ktor-jackson - samples/client/petstore/kotlin-jvm-ktor-jackson
- samples/client/petstore/kotlin-jvm-ktor-gson - samples/client/petstore/kotlin-jvm-ktor-gson
- samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization - samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization
@@ -59,19 +58,16 @@ 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/echo_api/kotlin-jvm-spring-3-webclient - samples/client/petstore/kotlin-spring-cloud
- samples/client/petstore/kotlin-jvm-spring-3-restclient
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
- samples/client/petstore/kotlin-name-parameter-mappings - samples/client/petstore/kotlin-name-parameter-mappings
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -79,8 +75,9 @@ jobs:
~/.gradle ~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Gradle wrapper - name: Install Gradle wrapper
uses: eskatos/gradle-command-action@v3 uses: eskatos/gradle-command-action@v2
with: with:
gradle-version: ${{ env.GRADLE_VERSION }}
build-root-directory: ${{ matrix.sample }} build-root-directory: ${{ matrix.sample }}
arguments: wrapper arguments: wrapper
- name: Build - name: Build

View File

@@ -1,49 +0,0 @@
name: Kotlin Client (Echo API) JDK17
on:
push:
paths:
- samples/client/echo_api/kotlin**
pull_request:
paths:
- samples/client/echo_api/kotlin**
jobs:
build:
name: Build Kotlin Client JDK17
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
- samples/client/echo_api/kotlin-model-prefix-type-mappings
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Gradle wrapper
uses: eskatos/gradle-command-action@v3
with:
build-root-directory: ${{ matrix.sample }}
arguments: wrapper
- 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: Build
working-directory: ${{ matrix.sample }}
run: ./gradlew build

View File

@@ -1,20 +1,12 @@
name: Samples Kotlin server (jdk17) name: Samples Kotlin server
on: on:
push: push:
branches: branches:
- 'samples/server/petstore/kotlin-springboot-3*/**' - 'samples/server/petstore/kotlin-springboot-3*/**'
- 'samples/server/petstore/kotlin-server/javalin/**'
- 'samples/server/petstore/kotlin-server/javalin-6/**'
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/**
pull_request: pull_request:
paths: paths:
- 'samples/server/petstore/kotlin-springboot-3*/**' - 'samples/server/petstore/kotlin-springboot-3*/**'
- 'samples/server/petstore/kotlin-server/javalin/**'
- 'samples/server/petstore/kotlin-server/javalin-6/**'
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/**
env: env:
GRADLE_VERSION: 7.4 GRADLE_VERSION: 7.4
@@ -29,21 +21,14 @@ jobs:
sample: sample:
# server # server
- samples/server/petstore/kotlin-springboot-3 - samples/server/petstore/kotlin-springboot-3
- samples/server/petstore/kotlin-springboot-delegate-nodefaults
- samples/server/petstore/kotlin-springboot-request
- samples/server/petstore/kotlin-springboot-request-cookie
- samples/server/petstore/kotlin-server/javalin
- samples/server/petstore/kotlin-server/javalin-6
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -51,7 +36,7 @@ jobs:
~/.gradle ~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Gradle wrapper - name: Install Gradle wrapper
uses: eskatos/gradle-command-action@v3 uses: eskatos/gradle-command-action@v2
with: with:
gradle-version: ${{ env.GRADLE_VERSION }} gradle-version: ${{ env.GRADLE_VERSION }}
build-root-directory: ${{ matrix.sample }} build-root-directory: ${{ matrix.sample }}

View File

@@ -1,45 +0,0 @@
name: Samples Kotlin server (jdk21)
on:
push:
branches:
- 'samples/server/petstore/kotlin-server/javalin-6/**'
pull_request:
paths:
- 'samples/server/petstore/kotlin-server/javalin-6/**'
env:
GRADLE_VERSION: 8.8
jobs:
build:
name: Build Kotlin server
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/kotlin-server/javalin-6
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Gradle wrapper
uses: eskatos/gradle-command-action@v3
with:
gradle-version: ${{ env.GRADLE_VERSION }}
build-root-directory: ${{ matrix.sample }}
arguments: wrapper
- name: Build
working-directory: ${{ matrix.sample }}
run: ./gradlew build -x test

View File

@@ -3,18 +3,10 @@ name: Samples Kotlin server
on: on:
push: push:
branches: branches:
- samples/server/others/kotlin-server/jaxrs-spec/**
- 'samples/server/petstore/kotlin*/**' - 'samples/server/petstore/kotlin*/**'
- 'samples/server/others/kotlin-server/jaxrs-spec-array-response/**'
# comment out due to gradle build failure
#- samples/server/petstore/kotlin-spring-default/**
pull_request: pull_request:
paths: paths:
- samples/server/others/kotlin-server/jaxrs-spec/**
- 'samples/server/petstore/kotlin*/**' - 'samples/server/petstore/kotlin*/**'
- 'samples/server/others/kotlin-server/jaxrs-spec-array-response/**'
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/**
env: env:
GRADLE_VERSION: 6.9 GRADLE_VERSION: 6.9
@@ -29,8 +21,6 @@ jobs:
sample: sample:
# server # server
- samples/server/petstore/kotlin-springboot - samples/server/petstore/kotlin-springboot
- samples/server/petstore/kotlin-springboot-multipart-request-model
- samples/server/petstore/kotlin-springboot-bigdecimal-default
- samples/server/petstore/kotlin-springboot-delegate - samples/server/petstore/kotlin-springboot-delegate
- samples/server/petstore/kotlin-springboot-modelMutable - samples/server/petstore/kotlin-springboot-modelMutable
- samples/server/petstore/kotlin-springboot-reactive - samples/server/petstore/kotlin-springboot-reactive
@@ -39,24 +29,17 @@ jobs:
- samples/server/petstore/kotlin-springboot-springfox - samples/server/petstore/kotlin-springboot-springfox
- samples/server/petstore/kotlin-server/ktor - samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/jaxrs-spec - samples/server/petstore/kotlin-server/jaxrs-spec
- samples/server/petstore/kotlin-server/jaxrs-spec-mutiny
- samples/server/petstore/kotlin-server-modelMutable - samples/server/petstore/kotlin-server-modelMutable
- samples/server/petstore/kotlin-server/javalin
- samples/server/others/kotlin-server/jaxrs-spec
- samples/server/others/kotlin-server/jaxrs-spec-array-response
- samples/server/petstore/kotlin-spring-cloud
# comment out due to gradle build failure
#- samples/server/petstore/kotlin-spring-default
# no build.gradle file # no build.gradle file
#- samples/server/petstore/kotlin-vertx-modelMutable #- samples/server/petstore/kotlin-vertx-modelMutable
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -64,7 +47,7 @@ jobs:
~/.gradle ~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Gradle wrapper - name: Install Gradle wrapper
uses: eskatos/gradle-command-action@v3 uses: eskatos/gradle-command-action@v2
with: with:
gradle-version: ${{ env.GRADLE_VERSION }} gradle-version: ${{ env.GRADLE_VERSION }}
build-root-directory: ${{ matrix.sample }} build-root-directory: ${{ matrix.sample }}

View File

@@ -1,45 +0,0 @@
name: Samples Kotlin WireMock
on:
push:
branches:
- samples/server/petstore/kotlin-wiremock*/**
- samples/server/echo_api/kotlin-wiremock/**
pull_request:
paths:
- samples/server/petstore/kotlin-wiremock*/**
- samples/server/echo_api/kotlin-wiremock/**
jobs:
build:
name: Build Kotlin WireMock
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/kotlin-wiremock
- samples/server/petstore/kotlin-wiremock-responses
- samples/server/echo_api/kotlin-wiremock
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Gradle wrapper
uses: eskatos/gradle-command-action@v3
with:
build-root-directory: ${{ matrix.sample }}
arguments: wrapper
- name: Build
working-directory: ${{ matrix.sample }}
run: ./gradlew build -x test

View File

@@ -18,7 +18,7 @@ jobs:
# servers # servers
- samples/server/petstore/php-laravel/lib/ - samples/server/petstore/php-laravel/lib/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:

View File

@@ -4,11 +4,9 @@ on:
push: push:
paths: paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/** - samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
pull_request: pull_request:
paths: paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/** - samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
jobs: jobs:
build: build:
name: Build PHP projects name: Build PHP projects
@@ -19,9 +17,8 @@ jobs:
sample: sample:
# servers # servers
- samples/server/petstore/php-symfony/SymfonyBundle-php/ - samples/server/petstore/php-symfony/SymfonyBundle-php/
- samples/server/petstore/php-flight/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:

View File

@@ -1,33 +0,0 @@
name: Samples Postman
on:
pull_request:
paths:
- samples/schema/postman-collection/python/**
- samples/schema/postman-collection/postman.json
- .github/workflows/samples-postman.yaml
jobs:
build:
name: Test Python client
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# schema
- samples/schema/postman-collection
python-version:
- "3.11"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r python/requirements.txt
pip install -r python/test-requirements.txt
- name: Test
working-directory: ${{ matrix.sample }}
run: python -m pytest

View File

@@ -1,49 +0,0 @@
name: Python Client (Echo API)
on:
pull_request:
paths:
- samples/client/echo_api/python/**
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/**
- .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
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
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 unittest discover
- name: mypy
working-directory: ${{ matrix.sample }}
run: python -m mypy

View File

@@ -1,33 +0,0 @@
name: Python FastAPI Server
on:
push:
paths:
- samples/server/petstore/python-fastapi/**
pull_request:
paths:
- samples/server/petstore/python-fastapi/**
jobs:
build:
name: Test Python FastAPI server
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/python-fastapi/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
working-directory: ${{ matrix.sample }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Test
working-directory: ${{ matrix.sample }}
run: PYTHONPATH=src 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@v3
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Setup node.js
uses: actions/setup-node@v3
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Install
working-directory: ${{ matrix.sample }}
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test
working-directory: ${{ matrix.sample }}
run: python -m pytest

View File

@@ -1,62 +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.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@v4
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
- name: mypy
working-directory: ${{ matrix.sample }}
run: poetry run mypy

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,58 +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.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@v4
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@v3
- 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,42 +0,0 @@
name: Samples R
on:
push:
paths:
- 'samples/client/echo_api/r/**'
pull_request:
paths:
- 'samples/client/echo_api/r/**'
jobs:
build:
name: Build R
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/client/echo_api/r/'
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: r-lib/actions/setup-r@v2
with:
r-version: 3.6.1
- uses: r-lib/actions/setup-r-dependencies@v2
working-directory: ${{ matrix.sample }}
with:
cache-version: 2
- name: Install curl
run: sudo apt-get install -y r-cran-curl
- name: build and test
working-directory: ${{ matrix.sample }}
run: |
# export _R_CHECK_FORCE_SUGGESTS_=false
/bin/bash build_and_test.bash
shell: bash

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

@@ -6,13 +6,11 @@ on:
- "samples/client/others/rust/**" - "samples/client/others/rust/**"
- "samples/server/petstore/rust-server/**" - "samples/server/petstore/rust-server/**"
- "samples/client/petstore/rust-server/**" - "samples/client/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
pull_request: pull_request:
paths: paths:
- "samples/client/others/rust/**" - "samples/client/others/rust/**"
- "samples/client/petstore/rust/**" - "samples/client/petstore/rust/**"
- "samples/server/petstore/rust-server/**" - "samples/server/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
jobs: jobs:
build: build:
@@ -26,12 +24,11 @@ jobs:
- samples/client/others/rust/ - samples/client/others/rust/
- samples/client/petstore/rust/ - samples/client/petstore/rust/
- samples/server/petstore/rust-server/ - samples/server/petstore/rust-server/
- samples/server/petstore/rust-axum/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
toolchain: stable toolchain: stable
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: cargo build --all-targets --all-features run: cargo build

View File

@@ -22,25 +22,21 @@ jobs:
# clients # clients
- 'samples/client/petstore/java/okhttp-gson' - 'samples/client/petstore/java/okhttp-gson'
- samples/client/petstore/scalaz - samples/client/petstore/scalaz
- samples/client/petstore/scala-pekko
#- samples/client/petstore/scala-sttp # won't pass while the same tests in circleci pass #- samples/client/petstore/scala-sttp # won't pass while the same tests in circleci pass
# servers # servers
- samples/server/petstore/scala-lagom-server - samples/server/petstore/scala-lagom-server
- samples/server/petstore/scala-play-server - samples/server/petstore/scala-play-server
- samples/server/petstore/scala-akka-http-server - samples/server/petstore/scala-akka-http-server
- samples/server/petstore/scala-pekko-http-server
- samples/server/petstore/scalatra - samples/server/petstore/scalatra
- samples/server/petstore/scala-finch # cannot be tested with jdk11 - samples/server/petstore/scala-finch # cannot be tested with jdk11
- samples/server/petstore/scala-http4s-server
- samples/server/petstore/scala-cask
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -4,17 +4,9 @@ on:
push: push:
paths: paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional - samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
pull_request: pull_request:
paths: paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional - samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
jobs: jobs:
build: build:
name: Build Java Spring (JDK17) name: Build Java Spring (JDK17)
@@ -25,19 +17,14 @@ jobs:
sample: sample:
# clients # clients
- samples/openapi3/client/petstore/spring-cloud-3-with-optional - samples/openapi3/client/petstore/spring-cloud-3-with-optional
# servers
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -46,4 +33,4 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -3,16 +3,10 @@ name: Samples Java Spring
on: on:
push: push:
paths: paths:
# clients
- 'samples/client/petstore/spring*/**'
# servers
- 'samples/server/petstore/spring*/**' - 'samples/server/petstore/spring*/**'
- 'samples/openapi3/server/petstore/spring*/**' - 'samples/openapi3/server/petstore/spring*/**'
pull_request: pull_request:
paths: paths:
# clients
- 'samples/client/petstore/spring*/**'
# servers
- 'samples/server/petstore/spring*/**' - 'samples/server/petstore/spring*/**'
- 'samples/openapi3/server/petstore/spring*/**' - 'samples/openapi3/server/petstore/spring*/**'
jobs: jobs:
@@ -25,48 +19,42 @@ jobs:
sample: sample:
# clients # clients
- samples/client/petstore/spring-cloud - samples/client/petstore/spring-cloud
- samples/client/petstore/spring-cloud-auth
- samples/client/petstore/spring-cloud-date-time
- samples/client/petstore/spring-cloud-deprecated
- samples/client/petstore/spring-cloud-tags
- samples/openapi3/client/petstore/spring-cloud - samples/openapi3/client/petstore/spring-cloud
- samples/openapi3/client/petstore/spring-cloud-async - 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-cloud-spring-pageable
- 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-spring-pageable
- samples/client/petstore/spring-cloud-tags
# servers # servers
- samples/openapi3/server/petstore/springboot
- samples/openapi3/server/petstore/springboot-implicitHeaders
- samples/openapi3/server/petstore/springboot-delegate
- samples/openapi3/server/petstore/spring-boot-oneof
- samples/server/petstore/spring-boot-nullable-set
- samples/server/petstore/spring-boot-defaultInterface-unhandledException
- samples/server/petstore/springboot - samples/server/petstore/springboot
- samples/openapi3/server/petstore/springboot
- samples/server/petstore/springboot-beanvalidation - samples/server/petstore/springboot-beanvalidation
- samples/server/petstore/springboot-useoptional
- samples/server/petstore/springboot-reactive
- samples/server/petstore/springboot-implicitHeaders
- samples/openapi3/server/petstore/springboot-implicitHeaders
- samples/server/petstore/springboot-delegate - samples/server/petstore/springboot-delegate
- samples/server/petstore/springboot-delegate-no-response-entity - samples/server/petstore/springboot-delegate-no-response-entity
- samples/server/petstore/springboot-implicitHeaders - samples/openapi3/server/petstore/springboot-delegate
- samples/server/petstore/spring-boot-nullable-set
- samples/server/petstore/spring-boot-defaultInterface-unhandledException
- samples/openapi3/server/petstore/spring-boot-oneof
- samples/server/petstore/springboot-virtualan
- samples/server/petstore/springboot-implicitHeaders-annotationLibrary - samples/server/petstore/springboot-implicitHeaders-annotationLibrary
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-reactive
- samples/server/petstore/springboot-reactive-noResponseEntity
- samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8 - samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8
- 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
- samples/server/petstore/springboot-useoptional
- samples/server/petstore/springboot-virtualan
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- uses: actions/setup-java@v4 - uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -75,4 +63,4 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress run: mvn clean package

View File

@@ -1,50 +0,0 @@
name: Samples Swift
on:
push:
paths:
- samples/client/petstore/swift5/**
pull_request:
paths:
- samples/client/petstore/swift5/**
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
sample:
- samples/client/petstore/swift5/alamofireLibrary
- samples/client/petstore/swift5/anycodableLibrary
- samples/client/petstore/swift5/asyncAwaitLibrary
- samples/client/petstore/swift5/combineLibrary
- samples/client/petstore/swift5/default
- samples/client/petstore/swift5/deprecated
- samples/client/petstore/swift5/frozenEnums
- samples/client/petstore/swift5/nonPublicApi
- samples/client/petstore/swift5/objcCompatible
- samples/client/petstore/swift5/oneOf
- samples/client/petstore/swift5/promisekitLibrary
- samples/client/petstore/swift5/readonlyProperties
- samples/client/petstore/swift5/resultLibrary
- samples/client/petstore/swift5/rxswiftLibrary
- samples/client/petstore/swift5/urlsessionLibrary
- samples/client/petstore/swift5/validation
# NOTE: disabled as vaporLibrary doesnt build when adding this CI config
#- samples/client/petstore/swift5/vaporLibrary
- samples/client/petstore/swift5/x-swift-hashable
include:
- os: ubuntu-latest
sample: samples/client/petstore/swift5/alamofireLibrary
name: Build Swift samples
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v2
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
swift-version: '5'
- name: Build
working-directory: ${{ matrix.sample }}
run: swift build

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 && git checkout 15a684c41d4de692878636f47fcc1670af309a0f && 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

@@ -18,9 +18,9 @@ jobs:
sample: sample:
- samples/client/petstore/zapier - samples/client/petstore/zapier
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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: |

26
.github/workflows/sonar.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Sonar CI
on:
push:
branches:
- master
- '[4-9]+.[0-9]+.x'
- sonar
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'OpenAPITools' }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Compile with Maven
run: ./mvnw -B -q clean install jacoco:report
- name: Jacoco Aggregate
run: ./mvnw jacoco:report-aggregate
- name: Publish to Sonar
run: ./mvnw -B -q -nsu sonar:sonar -Dsonar.projectKey=OpenAPITools_openapi-generator -Dsonar.organization=openapitools -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_LOGIN }} -Dsonar.branch.name=${GITHUB_REF##*/}

View File

@@ -18,14 +18,14 @@ jobs:
matrix: matrix:
java: [11, 17] java: [11, 17]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v3
- 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'
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v4 uses: actions/cache@v3
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:
@@ -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.14.0 uses: s4u/setup-maven-action@v1.8.0
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
maven-version: 3.8.8 maven-version: 3.8.8
@@ -53,7 +53,7 @@ jobs:
# generator names containing "-" caused problems in the past, see https://github.com/OpenAPITools/openapi-generator/issues/9528 # generator names containing "-" caused problems in the past, see https://github.com/OpenAPITools/openapi-generator/issues/9528
java -jar ./openapi-generator-cli.jar author template --verbose -g jaxrs-spec --library quarkus java -jar ./openapi-generator-cli.jar author template --verbose -g jaxrs-spec --library quarkus
- name: Setup Gradle - name: Setup Gradle
uses: gradle/gradle-build-action@v3 uses: gradle/gradle-build-action@v2
- name: Gradle tests - name: Gradle tests
run: | run: |
gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace

21
.gitignore vendored
View File

@@ -1,5 +1,4 @@
.mvn/.gradle-enterprise/ .mvn/.gradle-enterprise/
.mvn/.develocity/
.scannerwork/ .scannerwork/
.vscode .vscode
*.iml *.iml
@@ -9,7 +8,6 @@ out/
*.gpg *.gpg
classpath.txt classpath.txt
version.properties version.properties
modules/openapi-generator-maven-plugin/src/test/resources/default/_merged_spec.yaml
modules/openapi-generator-gradle-plugin/bin/ modules/openapi-generator-gradle-plugin/bin/
!modules/openapi-generator-cli/src/main/resources/version.properties !modules/openapi-generator-cli/src/main/resources/version.properties
.project .project
@@ -86,17 +84,12 @@ samples/client/petstore/cpp-restsdk/CMakeCache.txt
samples/client/petstore/cpp-restsdk/CMakeFiles/ samples/client/petstore/cpp-restsdk/CMakeFiles/
samples/client/petstore/cpp-restsdk/Makefile samples/client/petstore/cpp-restsdk/Makefile
samples/client/petstore/cpp-restsdk/cmake_install.cmake samples/client/petstore/cpp-restsdk/cmake_install.cmake
samples/client/petstore/cpp-restsdk/client/CMakeFiles
samples/client/petstore/cpp-restsdk/client/Makefile
samples/client/petstore/cpp-restsdk/client/cmake_install.cmake
samples/client/petstore/cpp-restsdk/client/CppRestPetstoreClientConfig.cmake
samples/client/petstore/cpp-restsdk/client/CMakeCache.txt
#Java/Android #Java/Android
**/.gradle **/.gradle
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/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
@@ -180,17 +173,17 @@ samples/client/petstore/csharp-refactor/OpenAPIClient/nuget.exe
# Python # Python
*.pyc *.pyc
__pycache__ __pycache__
.venv/
samples/client/petstore/python/dev-requirements.txt.log samples/client/petstore/python/dev-requirements.txt.log
samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt
samples/client/petstore/python/.coverage samples/client/petstore/python/.coverage
samples/client/petstore/python/.projectile samples/client/petstore/python/.projectile
samples/client/petstore/python/.venv/
samples/client/petstore/python-asyncio/.venv/
samples/client/petstore/python-asyncio/.pytest_cache/ samples/client/petstore/python-asyncio/.pytest_cache/
**/poetry.lock samples/client/petstore/python-tornado/.venv/
# PHP # PHP
samples/client/petstore/php/OpenAPIClient-php/composer.lock samples/client/petstore/php/OpenAPIClient-php/composer.lock
samples/client/petstore/php-nextgen/OpenAPIClient-php/composer.lock
samples/client/petstore/php-dt/composer.lock samples/client/petstore/php-dt/composer.lock
samples/client/petstore/php-dt-modern/composer.lock samples/client/petstore/php-dt-modern/composer.lock
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
@@ -218,8 +211,6 @@ samples/server/petstore/kotlin-server/ktor/build
samples/server/petstore/kotlin-springboot/build samples/server/petstore/kotlin-springboot/build
samples/client/petstore/kotlin*/src/main/kotlin/test/ samples/client/petstore/kotlin*/src/main/kotlin/test/
samples/client/petstore/kotlin*/build/ samples/client/petstore/kotlin*/build/
samples/server/others/kotlin-server/jaxrs-spec/build/
samples/client/echo_api/kotlin-jvm-spring-3-restclient/build/
# haskell # haskell
.stack-work .stack-work
@@ -279,7 +270,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
@@ -289,6 +279,3 @@ samples/openapi3/client/petstore/go/privatekey.pem
## OCaml ## OCaml
samples/client/petstore/ocaml/_build/ samples/client/petstore/ocaml/_build/
# jetbrain http client
samples/client/jetbrains/adyen/checkout71/http/client/Apis/http-client.private.env.json

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

View File

@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- Common develocity.xml configuration for Maven shared between CI agents and developers building locally.
The build cache credentials required for CI builds to write to the remote build cache are read from environment variables.
Possibly, the credentials are configured in Jenkins via Credentials plugin (https://plugins.jenkins.io/credentials/) and
Credentials Binding plugin (https://plugins.jenkins.io/credentials-binding/), or the credentials are injected using the
vendor-specific mechanism of the CI server running the build.
Note: In the XML configuration below, you need to adjust
- the server url of your Develocity server
- the name of the environment variable that reveals the build is running in a CI environment
- the names of the environment variables holding the build cache credentials
to the specifics of your CI server settings. -->
<develocity
xmlns="https://www.gradle.com/develocity-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/develocity-maven https://www.gradle.com/schema/develocity-maven.xsd">
<server>
<url>https://ge.openapi-generator.tech/</url>
<allowUntrusted>false</allowUntrusted>
</server>
<buildScan>
<backgroundBuildScanUpload>#{isFalse(env['CI'])}</backgroundBuildScanUpload> <!-- adjust to your CI provider -->
<publishing>
<onlyIf>authenticated</onlyIf>
</publishing>
<obfuscation>
<!-- Use a redacted value.-->
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
</obfuscation>
</buildScan>
<buildCache>
<local>
<enabled>true</enabled>
</local>
<remote>
<enabled>true</enabled>
<!-- Check credentials presence to avoid build cache errors on PR builds when credentials are not present -->
<storeEnabled>#{isTrue(env['CI']) and isTrue(env['GRADLE_ENTERPRISE_ACCESS_KEY'])}</storeEnabled>
</remote>
</buildCache>
</develocity>

View File

@@ -2,12 +2,12 @@
<extensions> <extensions>
<extension> <extension>
<groupId>com.gradle</groupId> <groupId>com.gradle</groupId>
<artifactId>develocity-maven-extension</artifactId> <artifactId>gradle-enterprise-maven-extension</artifactId>
<version>1.21.6</version> <version>1.17</version>
</extension> </extension>
<extension> <extension>
<groupId>com.gradle</groupId> <groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId> <artifactId>common-custom-user-data-maven-extension</artifactId>
<version>1.12.5</version> <version>1.11.1</version>
</extension> </extension>
</extensions> </extensions>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- Common gradle-enterprise.xml configuration for Maven shared between CI agents and developers building locally.
The build cache credentials required for CI builds to write to the remote build cache are read from environment variables.
Possibly, the credentials are configured in Jenkins via Credentials plugin (https://plugins.jenkins.io/credentials/) and
Credentials Binding plugin (https://plugins.jenkins.io/credentials-binding/), or the credentials are injected using the
vendor-specific mechanism of the CI server running the build.
Note: In the XML configuration below, you need to adjust
- the server url of your Gradle Enterprise server
- the name of the environment variable that reveals the build is running in a CI environment
- the names of the environment variables holding the build cache credentials
to the specifics of your CI server settings. -->
<gradleEnterprise
xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
<server>
<url>https://ge.openapi-generator.tech/</url> <!-- adjust to your GE server -->
<allowUntrusted>false</allowUntrusted> <!-- ensure a trusted certificate is configured -->
</server>
<buildScan>
<captureGoalInputFiles>true</captureGoalInputFiles>
<backgroundBuildScanUpload>#{isFalse(env['CI'])}</backgroundBuildScanUpload> <!-- adjust to your CI provider -->
<publish>ALWAYS</publish>
<publishIfAuthenticated>true</publishIfAuthenticated>
<obfuscation>
<!-- Use a redacted value.-->
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
</obfuscation>
</buildScan>
<buildCache>
<local>
<enabled>false</enabled>
</local>
<remote>
<server>
<url>https://ge.openapi-generator.tech/cache/exp3/</url> <!-- adjust to your GE hostname, and note the trailing slash -->
<allowUntrusted>true</allowUntrusted> <!-- set to false if a trusted certificate is configured for the GE server -->
<credentials>
<username>${env.GRADLE_ENTERPRISE_CACHE_USERNAME}</username>
<password>${env.GRADLE_ENTERPRISE_CACHE_PASSWORD}</password>
</credentials>
</server>
<enabled>true</enabled> <!-- must be true for this experiment -->
<storeEnabled>#{env['CI'] != null}</storeEnabled> <!-- adjust to an env var that is always present only in your CI environment -->
</remote>
</buildCache>
</gradleEnterprise>

View File

@@ -1,2 +0,0 @@
java=11.0.23-tem
maven=3.8.8

View File

@@ -22,7 +22,6 @@ cache:
- $HOME/samples/client/petstore/ruby/vendor/bundle - $HOME/samples/client/petstore/ruby/vendor/bundle
- $HOME/samples/client/petstore/python/.venv/ - $HOME/samples/client/petstore/python/.venv/
- $HOME/samples/server/petstore/rust-server/target - $HOME/samples/server/petstore/rust-server/target
- $HOME/samples/server/petstore/rust-axum/target
- $HOME/perl5 - $HOME/perl5
- $HOME/.cargo - $HOME/.cargo
- $HOME/.pub-cache - $HOME/.pub-cache
@@ -137,7 +136,7 @@ script:
# run integration tests defined in maven pom.xml # run integration tests defined in maven pom.xml
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet. # WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
# show "error" only to reduce the log size # show "error" only to reduce the log size
- ./mvnw -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -DskipTests -Dmaven.javadoc.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error - ./mvnw -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -DskipTests -Dmaven.javadoc.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error 2>&1 | grep -i error
after_success: after_success:
# push to maven repo # push to maven repo
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then - if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then

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

@@ -9,17 +9,20 @@ set -e
export NODE_ENV=test export NODE_ENV=test
function cleanup {
# Show logs of 'petstore.swagger' container to troubleshoot Unit Test failures, if any.
if [ "$NODE_INDEX" != "4" ]; then
docker logs petstore.swagger # container name specified in circle.yml
fi
}
trap cleanup EXIT
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
sudo apt-get -y install cpanminus ./mvnw --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/client/petstore/perl && /bin/bash ./test.bash)
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
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"
@@ -39,23 +42,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
# install cpprestsdk # run integration tests
sudo apt-get install libcpprest-dev ./mvnw --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
wget "https://github.com/aminya/setup-cpp/releases/download/v0.37.0/setup-cpp-x64-linux"
chmod +x ./setup-cpp-x64-linux
sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true
source ~/.cpprc # activate cpp environment variables
# run go integration tests
(cd samples/client/petstore/go && mvn integration-test)
(cd samples/openapi3/client/petstore/go && mvn integration-test)
(cd samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false && mvn integration-test)
(cd samples/client/others/go/allof_multiple_ref_and_discriminator && mvn integration-test)
(cd samples/client/petstore/cpp-restsdk/client && mvn integration-test)
elif [ "$NODE_INDEX" = "3" ]; then 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
@@ -72,54 +72,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) elif [ "$NODE_INDEX" = "4" ]; then
(cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test) echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..."
(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) #mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd samples/client/petstore/typescript-angular-v17-provided-in-root && mvn integration-test) #(cd samples/openapi3/client/petstore/python && make test)
(cd samples/client/petstore/typescript-angular-v18-provided-in-root && mvn integration-test) # comment out due to ModuleNotFoundError: No module named 'urllib3.request'
(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test) #(cd samples/openapi3/client/petstore/python-prior && make test)
(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test) #(cd samples/openapi3/client/3_0_3_unit_test/python && make 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)
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)
(cd samples/client/petstore/java/resttemplate-jakarta && mvn integration-test)
fi fi

View File

@@ -31,7 +31,7 @@ Please file the pull request against the correct branch, e.g. `master` for non-b
All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages) All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide. If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
### Templates ### Templates
@@ -84,26 +84,6 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit` - For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
- For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page. - For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.
### Building
The `openapi-generator-cli` can be built using the following command. This will generate the `openapi-generator-cli.jar` in the `modules/openapi-generator-cli/target` directory without running the tests and generating the Javadocs.
```shell
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
```
Or on Windows:
```shell
mvnw.cmd clean install -DskipTests -Dmaven.javadoc.skip=true
```
The binary can run via `java -jar`. For example:
```shell
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help
```
### Testing ### Testing
To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen) To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
@@ -132,5 +112,5 @@ See [OpenAPI Tools wiki](https://github.com/OpenAPITools/openapi-generator/wiki/
- File a PR with meaningful title, description and commit messages - File a PR with meaningful title, description and commit messages
- Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed. - Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
- Recommended git settings - Recommended git settings
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around - `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) - To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))

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}
@@ -10,16 +10,6 @@ COPY ./LICENSE ${GEN_DIR}
# Required to compile openapi-generator # Required to compile openapi-generator
COPY ./google_checkstyle.xml ${GEN_DIR} COPY ./google_checkstyle.xml ${GEN_DIR}
# All poms are copied, then we go offline, to allow for better caching of code changes without fetching all dependencies each time
COPY ./modules/openapi-generator-gradle-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-gradle-plugin/
COPY ./modules/openapi-generator-maven-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-maven-plugin/
COPY ./modules/openapi-generator-online/pom.xml ${GEN_DIR}/modules/openapi-generator-online/
COPY ./modules/openapi-generator-cli/pom.xml ${GEN_DIR}/modules/openapi-generator-cli/
COPY ./modules/openapi-generator-core/pom.xml ${GEN_DIR}/modules/openapi-generator-core/
COPY ./modules/openapi-generator/pom.xml ${GEN_DIR}/modules/openapi-generator/
COPY ./pom.xml ${GEN_DIR}
RUN mvn dependency:go-offline
# Modules are copied individually here to allow for caching of docker layers between major.minor versions # Modules are copied individually here to allow for caching of docker layers between major.minor versions
COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
@@ -27,9 +17,10 @@ COPY ./modules/openapi-generator-online ${GEN_DIR}/modules/openapi-generator-onl
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
COPY ./modules/openapi-generator-core ${GEN_DIR}/modules/openapi-generator-core COPY ./modules/openapi-generator-core ${GEN_DIR}/modules/openapi-generator-core
COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
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/

110
README.md
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.8.0`): [Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.0.0`):
[![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)
@@ -25,7 +25,7 @@
<div align="center"> <div align="center">
:star::star::star: If you would like to contribute, please refer to [guidelines](CONTRIBUTING.md) and a list of [open tasks](https://github.com/openapitools/openapi-generator/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). :star::star::star: :star::star::star: If you would like to contribute, please refer to [guidelines](CONTRIBUTING.md) and a list of [open tasks](https://github.com/openapitools/openapi-generator/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).:star::star::star:
:bangbang: To migrate from Swagger Codegen to OpenAPI Generator, please refer to the [migration guide](docs/migration-from-swagger-codegen.md) :bangbang: :bangbang: To migrate from Swagger Codegen to OpenAPI Generator, please refer to the [migration guide](docs/migration-from-swagger-codegen.md) :bangbang:
@@ -60,37 +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.dmtech.de/?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)
[<img src="https://openapi-generator.tech/img/companies/alloyautomation.png" width="128" height="128">](https://runalloy.com/signup?utm_source=github&utm_medium=referral&utm_campaign=1524_openapigenerator)
[<img src="https://openapi-generator.tech/img/companies/ssstwitter.png" width="128" height="128">](https://ssstwitter.com/?utm_source=github&utm_medium=referral&utm_campaign=sponsor)
[<img src="https://openapi-generator.tech/img/companies/svix.png" width="128" height="128">](https://www.svix.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/litslink.png" width="128" height="128">](https://litslink.com/services/artificial-intelligence?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/designli.jpg" width="128" height="128">](https://designli.co?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/itm.png" width="128" height="128">](https://opensource.muenchen.de?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/kong.png" width="128" height="128">](https://konghq.com/products/kong-konnect?utm_medium=referral&utm_source=github&utm_campaign=platform&utm_content=openapi-generator)
[<img src="https://openapi-generator.tech/img/companies/route4me.png" width="128" height="128">](https://route4me.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity #### 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, Spring 6 RestClient, 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, pekko), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 18.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** ([Flight](https://docs.flightphp.com/), 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/), [Cask](https://github.com/com-lihaoyi/cask), 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
@@ -128,13 +115,12 @@ 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.8.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.8.0-SNAPSHOT/) | 09.08.2024 | Minor release with breaking changes (with fallback) | | 7.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.0-SNAPSHOT/) | Jul/Aug 2023 | Major release with breaking changes (no fallback) |
| [7.7.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.7.0) (latest stable release) | 02.07.2024 | Minor release with breaking changes (with fallback) | | [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) (latest stable release) | 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)
@@ -192,16 +178,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.7.0/openapi-generator-cli-7.7.0.jar` JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar`
For **Mac/Linux** users: For **Mac/Linux** users:
```sh ```sh
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar -O openapi-generator-cli.jar wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.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.7.0/openapi-generator-cli-7.7.0.jar Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.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.
@@ -262,9 +248,9 @@ To build from source, you need the following installed and available in your `$P
* [Java 11](https://adoptium.net/) * [Java 11](https://adoptium.net/)
* [Apache Maven 3.8.8 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`
@@ -436,7 +422,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.7.0 openapi-generator-cli version-manager set 6.6.0
``` ```
Or install it as dev-dependency: Or install it as dev-dependency:
@@ -460,7 +446,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.7.0/openapi-generator-cli-7.7.0.jar) You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.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`
@@ -485,7 +471,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \ -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g java \ -g java \
-t modules/openapi-generator/src/main/resources/Java \ -t modules/openapi-generator/src/main/resources/Java \
--additional-properties artifactId=petstore-okhttp-gson,hideGenerationTimestamp=true \ --additional-properties artifactId=petstore-okhttp-gson,hideGenerationTimestamp:true \
-o samples/client/petstore/java/okhttp-gson -o samples/client/petstore/java/okhttp-gson
``` ```
@@ -576,9 +562,9 @@ Please refer to [online.md](docs/online.md) on how to run and use the `openapi-g
### [3.4 - License information on Generated Code](#table-of-contents) ### [3.4 - License information on Generated Code](#table-of-contents)
The OpenAPI Generator project is intended as a benefit for users of the Open API Specification. The project itself has the [License](#7---license) as specified. In addition, please understand the following points: The OpenAPI Generator project is intended as a benefit for users of the Open API Specification. The project itself has the [License](#license) as specified. In addition, please understand the following points:
* The templates included with this project are subject to the [License](#7---license). * The templates included with this project are subject to the [License](#license).
* Generated code is intentionally _not_ subject to the parent project license * Generated code is intentionally _not_ subject to the parent project license
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate. When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
@@ -599,7 +585,6 @@ Here is a list of community-contributed IDE plug-ins that integrate with OpenAPI
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page. Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
- [Aalborg University](https://www.aau.dk) - [Aalborg University](https://www.aau.dk)
- [act coding](https://github.com/actcoding)
- [Adaptant Solutions AG](https://www.adaptant.io/) - [Adaptant Solutions AG](https://www.adaptant.io/)
- [adesso SE](https://www.adesso.de/) - [adesso SE](https://www.adesso.de/)
- [Adyen](https://www.adyen.com/) - [Adyen](https://www.adyen.com/)
@@ -626,14 +611,10 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [California State University, Northridge](https://www.csun.edu) - [California State University, Northridge](https://www.csun.edu)
- [CAM](https://www.cam-inc.co.jp/) - [CAM](https://www.cam-inc.co.jp/)
- [Camptocamp](https://www.camptocamp.com/en) - [Camptocamp](https://www.camptocamp.com/en)
- [Carlsberg Group](https://www.carlsberggroup.com/)
- [Christopher Queen Consulting](https://www.christopherqueenconsulting.com/)
- [Cisco](https://www.cisco.com/) - [Cisco](https://www.cisco.com/)
- [codecentric AG](https://www.codecentric.de/) - [codecentric AG](https://www.codecentric.de/)
- [CoinAPI](https://www.coinapi.io/) - [CoinAPI](https://www.coinapi.io/)
- [Commencis](https://www.commencis.com/) - [Commencis](https://www.commencis.com/)
- [ConfigCat](https://configcat.com/)
- [cronn GmbH](https://www.cronn.de/)
- [Crossover Health](https://crossoverhealth.com/) - [Crossover Health](https://crossoverhealth.com/)
- [Cupix](https://www.cupix.com/) - [Cupix](https://www.cupix.com/)
- [Datadog](https://www.datadoghq.com) - [Datadog](https://www.datadoghq.com)
@@ -707,15 +688,12 @@ 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)
- [SearchApi](https://www.searchapi.io/)
- [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)
- [Splitit](https://www.splitit.com/) - [Splitit](https://www.splitit.com/)
- [Stingray](http://www.stingray.com) - [Stingray](http://www.stingray.com)
- [Suva](https://www.suva.ch/) - [Suva](https://www.suva.ch/)
- [Svix](https://www.svix.com/)
- [Telstra](https://dev.telstra.com) - [Telstra](https://dev.telstra.com)
- [Tencent](https://www.tencent.com) - [Tencent](https://www.tencent.com)
- [The University of Aizu](https://www.u-aizu.ac.jp/en/) - [The University of Aizu](https://www.u-aizu.ac.jp/en/)
@@ -910,7 +888,6 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2022-04-06 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/openapi-generator) by Ajil Oommen (Senior Flutter Developer) - 2022-04-06 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/openapi-generator) by Ajil Oommen (Senior Flutter Developer)
- 2022-05-13 - [A Path From an API To Client Libraries](https://www.youtube.com/watch?v=XC8oVn_efTw) by [Filip Srnec](https://www.devoxx.co.uk/talk/?id=11211) at Infobip - 2022-05-13 - [A Path From an API To Client Libraries](https://www.youtube.com/watch?v=XC8oVn_efTw) by [Filip Srnec](https://www.devoxx.co.uk/talk/?id=11211) at Infobip
- 2022-06-01 - [API First, using OpenAPI and Spring Boot](https://medium.com/xgeeks/api-first-using-openapi-and-spring-boot-2602c04bb0d3) by [Micael Estrázulas Vianna](https://estrazulas.medium.com/) - 2022-06-01 - [API First, using OpenAPI and Spring Boot](https://medium.com/xgeeks/api-first-using-openapi-and-spring-boot-2602c04bb0d3) by [Micael Estrázulas Vianna](https://estrazulas.medium.com/)
- 2022-06-10 - [Autogenerating Clients with FastAPI and Github Actions](https://www.propelauth.com/post/autogenerating-clients-with-fastapi-and-github-actions) by [Andrew Israel](https://www.propelauth.com/author/andrew)
- 2022-06-12 - [Mustache templates with OpenAPI specs](https://medium.com/geekculture/mustache-templates-with-openapi-specs-f24711c67dec) by [Beppe Catanese](https://github.com/gcatanese) - 2022-06-12 - [Mustache templates with OpenAPI specs](https://medium.com/geekculture/mustache-templates-with-openapi-specs-f24711c67dec) by [Beppe Catanese](https://github.com/gcatanese)
- 2022-07-01 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/) - 2022-07-01 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/)
- 2022-07-22 - [使用OpenAPI Generator Maven plugin开发api优先的java客户端和服务端代码](https://blog.roccoshi.top/2022/java/openapi-generator%E7%9A%84%E4%BD%BF%E7%94%A8/) by [Lincest](https://github.com/Lincest) - 2022-07-22 - [使用OpenAPI Generator Maven plugin开发api优先的java客户端和服务端代码](https://blog.roccoshi.top/2022/java/openapi-generator%E7%9A%84%E4%BD%BF%E7%94%A8/) by [Lincest](https://github.com/Lincest)
@@ -933,17 +910,12 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2023-05-18 - [如何基于 Swagger 使用 OpenAPI Generator 生成 JMeter 脚本?](https://blog.51cto.com/u_15181572/6294974) by [高楼Zee)](https://blog.51cto.com/u_15181572) - 2023-05-18 - [如何基于 Swagger 使用 OpenAPI Generator 生成 JMeter 脚本?](https://blog.51cto.com/u_15181572/6294974) by [高楼Zee)](https://blog.51cto.com/u_15181572)
- 2023-06-28 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/) - 2023-06-28 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/)
- 2023-06-30 - [Generate Client SDKs with OpenApi Generator in Springboot](https://medium.com/@ramavathvinayak/generate-client-sdks-with-openapi-generator-in-springboot-f9f012e73c0b) by [Vinayak Ramavath](https://medium.com/@ramavathvinayak) - 2023-06-30 - [Generate Client SDKs with OpenApi Generator in Springboot](https://medium.com/@ramavathvinayak/generate-client-sdks-with-openapi-generator-in-springboot-f9f012e73c0b) by [Vinayak Ramavath](https://medium.com/@ramavathvinayak)
- 2023-12-10 - [UnityでOpenAPI Generatorを使う](https://www.youtube.com/watch?v=CbNwKVV5LRM) by [Soup Tori](https://www.youtube.com/@souptori8417)
- 2024-01-24 - [Comment générer des stubs wiremock avec openapi generator](https://www.youtube.com/watch?v=0jhONfBrcKw) by [Alexis Couvreur](https://github.com/acouvreur)
- 2024-03-04 - [Generating TypeScript Types with OpenAPI for REST API Consumption](https://www.pullrequest.com/blog/generating-typescript-types-with-openapi-for-rest-api-consumption/) by [PullRequest](https://www.pullrequest.com/)
- 2024-03-07 - [Fully typed Web Apps with OpenAPI (Part 1)](https://medium.com/@gfox1984/fully-typed-web-apps-with-openapi-part-1-595d55766670) by [Guillaume Renard](https://medium.com/@gfox1984)
- 2024-03-08 - [Laravel OpenAPIによる "辛くない" スキーマ駆動開発](https://fortee.jp/phperkaigi-2024/proposal/9e2e6c38-d078-4efa-99b4-83ebf9033b34) by [KentarouTakeda](https://twitter.com/KentarouTakeda)
## [6 - About Us](#table-of-contents) ## [6 - About Us](#table-of-contents)
What's the design philosophy or principle behind OpenAPI Generator? What's the design philosophy or principle behind OpenAPI Generator?
We focus on developer experience. The generators should produce code, config, documentation, and more that are easily understandable and consumable by users. We focused on simple use cases to start with (bottom-up approach). Since then the project and the community have grown a lot: 600k weekly downloads via NPM CLI wrapper, 30M downloads via openapi-generator-cli docker image just to highlight a few. We've gradually supported more features (e.g. oneOf, anyOf introduced in OpenAPI 3.0) in various generators and we will continue this approach to deliver something based on our understanding of user demand and what they want, and continue to add support of new features introduced in OpenAPI specification (such as v3.1 and future versions of the OpenAPI specification). We focus on developer experience. The generators should produce code, config, documentation, and more that are easily understandable and consumable by users. We focused on simple use cases to start with (bottom-up approach). Since then the project and the community have grown a lot: 300k weekly downloads via NPM CLI wrapper, 20M downloads via openapi-generator-cli docker image just to highlight a few. We've gradually supported more features (e.g. oneOf, anyOf introduced in OpenAPI 3.0) in various generators and we will continue this approach to deliver something based on our understanding of user demand and what they want, and continue to add support of new features introduced in OpenAPI specification (such as v3.1 and future versions of the OpenAPI specification).
### [6.1 - OpenAPI Generator Core Team](#table-of-contents) ### [6.1 - OpenAPI Generator Core Team](#table-of-contents)
@@ -955,9 +927,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.
@@ -999,7 +974,6 @@ Here is a list of template creators:
* Java (okhttp-gson): @xhh * Java (okhttp-gson): @xhh
* Java (RestTemplate): @nbruno * Java (RestTemplate): @nbruno
* Java (Spring 5 WebClient): @daonomic * Java (Spring 5 WebClient): @daonomic
* Java (Spring 6 RestClient): @nicklas2751
* Java (RESTEasy): @gayathrigs * Java (RESTEasy): @gayathrigs
* Java (Vertx): @lopesmcc * Java (Vertx): @lopesmcc
* Java (Google APIs Client Library): @charlescapps * Java (Google APIs Client Library): @charlescapps
@@ -1018,7 +992,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
@@ -1030,17 +1003,14 @@ 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
* Scala (Akka): @cchafer * Scala (Akka): @cchafer
* Scala (sttp): @chameleon82 * Scala (sttp): @chameleon82
* Scala (sttp4): @flsh86 * Scala (sttp4): @flsh86
* Scala (Pekko): @mickaelmagniez
* Swift: @tkqubo * Swift: @tkqubo
* Swift 3: @hexelon * Swift 3: @hexelon
* Swift 4: @ehyche * Swift 4: @ehyche
@@ -1088,7 +1058,6 @@ Here is a list of template creators:
* Java Vert.x: @lwlee2608 * Java Vert.x: @lwlee2608
* Java Micronaut: @andriy-dmytruk * Java Micronaut: @andriy-dmytruk
* Java Helidon: @spericas @tjquinno @tvallin * Java Helidon: @spericas @tjquinno @tvallin
* Java WireMock: [@acouvreur](https://github.com/acouvreur)
* JAX-RS RestEasy: @chameleon82 * JAX-RS RestEasy: @chameleon82
* JAX-RS CXF: @hiveship * JAX-RS CXF: @hiveship
* JAX-RS CXF (CDI): @nickcmaynard * JAX-RS CXF (CDI): @nickcmaynard
@@ -1098,9 +1067,7 @@ Here is a list of template creators:
* Kotlin (Spring Boot): @dr4ke616 * Kotlin (Spring Boot): @dr4ke616
* Kotlin (Vertx): @Wooyme * Kotlin (Vertx): @Wooyme
* Kotlin (JAX-RS): @anttileppa * Kotlin (JAX-RS): @anttileppa
* Kotlin WireMock: @stefankoppier
* NodeJS Express: @YishTish * NodeJS Express: @YishTish
* PHP Flight: @daniel-sc
* PHP Laravel: @renepardon * PHP Laravel: @renepardon
* PHP Lumen: @abcsun * PHP Lumen: @abcsun
* PHP Mezzio (with Path Handler): @Articus * PHP Mezzio (with Path Handler): @Articus
@@ -1113,7 +1080,6 @@ Here is a list of template creators:
* Ruby on Rails 5: @zlx * Ruby on Rails 5: @zlx
* Rust (rust-server): @metaswitch * Rust (rust-server): @metaswitch
* Scala Akka: @Bouillie * Scala Akka: @Bouillie
* Scala Cask: @aaronp
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert) * Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Scala Lagom: @gmkumar2005 * Scala Lagom: @gmkumar2005
* Scala Play: @adigerber * Scala Play: @adigerber
@@ -1130,9 +1096,8 @@ Here is a list of template creators:
* GraphQL: @wing328 [:heart:](https://www.patreon.com/wing328) * GraphQL: @wing328 [:heart:](https://www.patreon.com/wing328)
* Ktorm: @Luiz-Monad * Ktorm: @Luiz-Monad
* MySQL: [@ybelenko](https://github.com/ybelenko) * MySQL: [@ybelenko](https://github.com/ybelenko)
* Postman Collection: @gcatanese
* Protocol Buffer: @wing328 * Protocol Buffer: @wing328
* WSDL: @adessoDpd * WSDL @adessoDpd
:heart: = Link to support the contributor directly :heart: = Link to support the contributor directly
@@ -1174,7 +1139,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) | | Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) | | C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) | | C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
| C# | @mandrean (2017/08) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) @iBicha (2023/07) | | C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) @iBicha (2023/07) |
| Clojure | | | Clojure | |
| Crystal | @cyangle (2021/01) | | Crystal | @cyangle (2021/01) |
| Dart | @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) | | Dart | @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) |
@@ -1187,12 +1152,12 @@ If you want to join the committee, please kindly apply by sending an email to te
| GraphQL | @renepardon (2018/12) | | GraphQL | @renepardon (2018/12) |
| Groovy | | | Groovy | |
| Haskell | | | Haskell | |
| Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @martin-mfg (2023/08) | | Java | @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) |
| Java Spring | @cachescrubber (2022/02) @welshm (2022/02) @MelleD (2022/02) @atextor (2022/02) @manedev79 (2022/02) @javisst (2022/02) @borsch (2022/02) @banlevente (2022/02) @Zomzog (2022/09) @martin-mfg (2023/08) | | Java Spring | @cachescrubber (2022/02) @welshm (2022/02) @MelleD (2022/02) @atextor (2022/02) @manedev79 (2022/02) @javisst (2022/02) @borsch (2022/02) @banlevente (2022/02) @Zomzog (2022/09) |
| JMeter | @kannkyo (2021/01) | | JMeter | @kannkyo (2021/01) |
| Jetbrains HTTP Client | @jlengrand (2023/01) | | Jetbrains HTTP Client | @jlengrand (2023/01) |
| Julia | @tanmaykm (2023/01) | | Julia | @tanmaykm (2023/01) |
| Kotlin | @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) | | Kotlin | @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) |
| Lua | @daurnimator (2017/08) | | Lua | @daurnimator (2017/08) |
| N4JS | @mmews-n4 (2023/03) | | N4JS | @mmews-n4 (2023/03) |
| Nim | | | Nim | |
@@ -1202,11 +1167,11 @@ 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 | @spacether (2019/11) [:heart:][spacether sponsorship] @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) |
| Scala | @clasnake (2017/07), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) @fish86 (2023/06) | | Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) @fish86 (2023/06) |
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) @dydus0x14 (2023/06) | | Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) @dydus0x14 (2023/06) |
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) | | TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) |
| Xojo | @Topheee (2023/04) | | Xojo | @Topheee (2023/04) |
@@ -1295,3 +1260,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
@@ -43,47 +43,23 @@ build_script:
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln #- dotnet build samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln
test_script: test_script:
- dotnet test samples\client\petstore\csharp\generichost\net8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test c# API client (multiple frameworks)
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClientCoreAndNet47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test c# API client (httpclient)
- dotnet test samples\client\petstore\csharp\generichost\net8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClient-httpclient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj # test c# API client (generichost)
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClient-generichost-netstandard2.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test c# API client (netcore)
- dotnet test samples\client\petstore\csharp\generichost\net8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj #- dotnet test samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test C# API client (.net framework 4.7)
- dotnet test samples\client\petstore\csharp\generichost\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClient-net47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test C# API client (.net framework 4.8)
- dotnet test samples\client\petstore\csharp\generichost\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClient-net48\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test C# API client (.net 5.0)
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClient-net5.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test C# API Client using conditional-serialization
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - dotnet test samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\httpclient\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\MultipleFrameworks\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net6\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
### TODO: Execute all generators via powershell or other ### TODO: Execute all generators via powershell or other
# generate all petstore clients # generate all petstore clients

View File

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

View File

@@ -1,9 +0,0 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
useNewtonsoft: false

View File

@@ -1,9 +0,0 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
nullableReferenceTypes: true

View File

@@ -1,9 +0,0 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-pocoModels
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
pocoModels: true

View File

@@ -1,9 +0,0 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-project4Models
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
useSeparateModelProject: true

View File

@@ -1,11 +0,0 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-useSwashBuckle
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
useSwashBuckle: false
buildTarget: library
isLibrary: true

View File

@@ -1,8 +0,0 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'

View File

@@ -1,9 +0,0 @@
generatorName: c
outputDir: samples/client/petstore/c-useJsonUnformatted
inputSpec: modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/C-libcurl
additionalProperties:
useJsonUnformatted: true
modelNameMappings:
another_model: MappedModel
another_property: mappedProperty

View File

@@ -2,6 +2,3 @@ generatorName: c
outputDir: samples/client/petstore/c outputDir: samples/client/petstore/c
inputSpec: modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml inputSpec: modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/C-libcurl templateDir: modules/openapi-generator/src/main/resources/C-libcurl
modelNameMappings:
another_model: MappedModel
another_property: mappedProperty

View File

@@ -1,7 +0,0 @@
generatorName: cpp-pistache-server
outputDir: samples/server/petstore/cpp-pistache-everything
inputSpec: modules/openapi-generator/src/test/resources/3_0/issues-anytype-object-set-petstore-everything.yaml
templateDir: modules/openapi-generator/src/main/resources/cpp-pistache-server
additionalProperties:
useStructModel: "false"
addExternalLibs: "true"

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