Compare commits

..

3 Commits

Author SHA1 Message Date
William Cheng
eb9cbdab50 minor fix 2025-07-29 12:14:29 +08:00
William Cheng
3ff367b764 fix workflow 2025-07-29 12:09:01 +08:00
William Cheng
4ebdcc0662 add r petstore github workflow 2025-07-29 12:05:19 +08:00
20076 changed files with 239670 additions and 1015149 deletions

View File

@@ -13,7 +13,7 @@
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {}, "ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": { "ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest", "version": "latest",
"moby": false "moby": true
} }
}, },
// Configure tool-specific properties. // Configure tool-specific properties.

View File

@@ -1,6 +1,6 @@
<!-- <!--
Please follow the issue template below for bug reports and feature requests. Please follow the issue template below for bug reports and feature requests.
Also please indicate in the issue title which language/library is concerned. E.g.: [JAVA] Bug generating foo with bar Also please indicate in the issue title which language/library is concerned. Eg: [JAVA] Bug generating foo with bar
--> -->
##### Description ##### Description

View File

@@ -18,7 +18,7 @@ assignees: ''
<!-- <!--
Please follow the issue template below for bug reports. Please follow the issue template below for bug reports.
Also please indicate in the issue title which language/library is concerned. E.g.: [BUG][JAVA] Bug generating foo with bar Also please indicate in the issue title which language/library is concerned. Eg: [BUG][JAVA] Bug generating foo with bar
--> -->
##### Description ##### Description

View File

@@ -1,74 +0,0 @@
name: Release to DockerHub (snapshot, stable)
on:
push:
tags:
- 'v*' # Triggers on any tag starting with 'v' (e.g., v1.0, v2.1.3)
branches:
- master
jobs:
docker:
name: Publish images
runs-on: ubuntu-latest
steps:
# build the JARs
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build
run: ./mvnw clean install -DskipTests=true
# docker workflow
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup variables
run: |
# set as GitHub ENV variables
echo "cli_version=$(\./mvnw -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')" >> $GITHUB_ENV
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
echo "DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online" >> $GITHUB_ENV
echo "DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli" >> $GITHUB_ENV
# online images
- name: Publish openapi-generator-online snapshot version
if: github.ref_type != 'tag' # not tag (release)
run: |
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} ./modules/openapi-generator-online
- name: Publish openapi-generator-online stable version
if: github.ref_type == 'tag' # tagged (release)
run: |
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest-release ./modules/openapi-generator-online
# cli images
- name: Publish openapi-generator-cli snapshot version
if: github.ref_type != 'tag' # not tag (release)
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} ./modules/openapi-generator-cli
- name: Publish openapi-generator-cli stable version
if: github.ref_type == 'tag' # tagged (release)
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest-release ./modules/openapi-generator-cli

View File

@@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v5 uses: actions/checkout@v4
- name: Test run-in-docker.sh - name: Test run-in-docker.sh
shell: bash shell: bash

View File

@@ -13,15 +13,14 @@ jobs:
name: Gradle plugin tests name: Gradle plugin tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v5 uses: actions/setup-java@v4
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:
@@ -35,22 +34,12 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}- ${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}-
${{ runner.os }}-test-gradle-plugin- ${{ runner.os }}-test-gradle-plugin-
- name: mvn clean install - name: Run tests
run: |
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- name: Run tests with wrapper
env: env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: | run: |
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate) (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk) (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk)
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: '8.14.3'
- name: Run tests without wrapper
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && gradle buildJavaResttemplateSdk) # not using gradle wrapper (cd modules/openapi-generator-gradle-plugin/samples/local-spec && gradle buildJavaResttemplateSdk) # not using gradle wrapper

View File

@@ -32,22 +32,21 @@ jobs:
- samples/client/petstore/java/native - samples/client/petstore/java/native
- samples/client/petstore/java/native-jakarta - samples/client/petstore/java/native-jakarta
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
cache: gradle
# Cache Gradle Dependencies # Cache Gradle Dependencies
- name: Setup Gradle Dependencies Cache - name: Setup Gradle Dependencies Cache
uses: actions/cache@v5 uses: actions/cache@v4
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@v5 uses: actions/cache@v4
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,23 +20,22 @@ jobs:
os: [ubuntu-latest] os: [ubuntu-latest]
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v5 uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }} - name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5 uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
cache: gradle
- uses: actions/cache@v5 - uses: actions/cache@v4
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@v5 - uses: actions/cache@v4
with: with:
path: | path: |
~/.gradle/caches ~/.gradle/caches
@@ -45,12 +44,8 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- uses: gradle/actions/setup-gradle@v5
with:
gradle-version: '8.14.3'
- name: Setup Maven - name: Setup Maven
uses: s4u/setup-maven-action@v1.19.0 uses: s4u/setup-maven-action@v1.18.0
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
maven-version: 3.8.8 maven-version: 3.8.8
@@ -62,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@v6 uses: actions/upload-artifact@v4
if: matrix.java == '11' && matrix.os == 'ubuntu-latest' if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with: with:
name: artifact name: artifact
@@ -70,7 +65,7 @@ jobs:
- name: Test Gradle plugin usage - name: Test Gradle plugin usage
shell: bash shell: bash
run: gradle --project-dir modules/openapi-generator-gradle-plugin/samples/local-spec buildGoSdk --stacktrace run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
- name: Test Maven plugin integration - name: Test Maven plugin integration
if: matrix.java == '11' if: matrix.java == '11'
@@ -90,15 +85,14 @@ jobs:
os: [ubuntu-latest] os: [ubuntu-latest]
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v5 uses: actions/checkout@v4
- name: Setup Maven - name: Setup Maven
uses: s4u/setup-maven-action@v1.19.0 uses: s4u/setup-maven-action@v1.18.0
with: with:
java-version: 11 java-version: 11
maven-version: 3.8.8 maven-version: 3.8.8
cache: gradle
- name: Download build artifact - name: Download build artifact
uses: actions/download-artifact@v7 uses: actions/download-artifact@v4
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@v5 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v5 uses: actions/setup-java@v4
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:

View File

@@ -1,61 +0,0 @@
name: Release to Maven Central (snapshot, stable)
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build
run: ./mvnw clean install -DskipTests=true
#run: ./mvnw clean install
publish:
runs-on: ubuntu-latest
name: Publish to Maven Central
needs: build
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Set up Maven Central Repository
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'zulu'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: ./mvnw -DskipTests=true --batch-mode -P release -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}

View File

@@ -1,69 +0,0 @@
name: Mill plugin tests
on:
push:
paths:
- modules/openapi-generator-mill-plugin/**
pull_request:
paths:
- modules/openapi-generator-mill-plugin/**
jobs:
test:
name: Mill plugin tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'temurin'
- name: Restore cache (read-only)
# only use restore keys, no save key because we need to clear the cache before running the examples
uses: actions/cache/restore@v5
with:
path: |
~/.m2/repository
~/.gradle
~/.cache/coursier
!~/.gradle/caches/*/plugin-resolution/
!~/.m2/repository/org/openapitools/
!~/.cache/coursier/v1/https/repo1.maven.org/maven2/org/openapitools/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Maven Clean Install
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
# This is needed because of differences in how Maven and Coursier download artifacts
# Maven will only download the pom when the transitive dependency is not needed in the current projects compile classpath
# whereas Coursier expects the artifact (jar) to be present in a Maven repository. When Coursier encounters a
# artifact folder with a pom it considers the artifact to be available and will then crash when the jar is missing.
- name: Clear m2 cache except openapitools (because otherwise coursier will fail to resolve artifacts where only poms are downloaded)
run: |
mv ~/.m2/repository/org/openapitools /tmp/openapitools-backup || true
rm -rf ~/.m2/repository/*
mkdir -p ~/.m2/repository/org
mv /tmp/openapitools-backup ~/.m2/repository/org/openapitools || true
- name: Mill Example - Test Validation Command
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
(cd modules/openapi-generator-mill-plugin/example/ && ./mill validateOpenapiSpec $(pwd)/api/petstore-invalid.yaml)
- name: Mill Example - Test Validation Task
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
(cd modules/openapi-generator-mill-plugin/example/ && ./mill openapi.validate)
- name: Mill Example - Test Compile Task
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
(cd modules/openapi-generator-mill-plugin/example/ && ./mill __.compile)

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@v5 - uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
ruby-version: '2.6' ruby-version: '2.6'

View File

@@ -15,15 +15,14 @@ jobs:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v5 uses: actions/setup-java@v4
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:
@@ -42,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@v6 uses: actions/upload-artifact@v4
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
@@ -54,15 +53,14 @@ jobs:
needs: needs:
- build - build
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v5 uses: actions/setup-java@v4
with: with:
java-version: 11 java-version: 11
distribution: 'temurin' distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: cache-maven-repository cache-name: cache-maven-repository
with: with:
@@ -81,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@v6 uses: actions/upload-artifact@v4
with: with:
name: surefire-test-results name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml' path: '**/surefire-reports/TEST-*.xml'
@@ -92,14 +90,14 @@ jobs:
needs: needs:
- build - build
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v5 uses: actions/setup-java@v4
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@v7 uses: actions/download-artifact@v4
with: with:
name: openapi-generator-cli.jar name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target path: modules/openapi-generator-cli/target
@@ -131,14 +129,14 @@ jobs:
- build - build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v5 uses: actions/setup-java@v4
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@v7 uses: actions/download-artifact@v4
with: with:
name: openapi-generator-cli.jar name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target path: modules/openapi-generator-cli/target

View File

@@ -25,8 +25,8 @@ jobs:
- samples/server/petstore/aspnet/fastendpoints-useResponseCaching - samples/server/petstore/aspnet/fastendpoints-useResponseCaching
- samples/server/petstore/aspnet/fastendpoints-useValidators - samples/server/petstore/aspnet/fastendpoints-useValidators
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- name: Build - name: Build

View File

@@ -25,7 +25,7 @@ jobs:
- 'samples/client/others/c/bearerAuth/' - 'samples/client/others/c/bearerAuth/'
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Prepare - name: Prepare
run: | run: |
sudo apt-get update sudo apt-get update

View File

@@ -1,51 +0,0 @@
name: Samples Clojure Client
on:
push:
paths:
- samples/client/petstore/clojure/**
pull_request:
paths:
- samples/client/petstore/clojure/**
jobs:
build:
name: Build Clojure Client (JDK11)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/clojure/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Cache maven dependencies
uses: actions/cache@v5
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Install Leiningen (if using Leiningen)
run: |
curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > lein
chmod +x lein
sudo mv lein /usr/local/bin/
- name: Run tests (Leiningen)
working-directory: ${{ matrix.sample }}
run: lein test

View File

@@ -1,30 +0,0 @@
name: Samples cpp oat++ client
on:
push:
branches:
- "samples/client/petstore/cpp-oatpp/**"
pull_request:
paths:
- "samples/client/petstore/cpp-oatpp/**"
env:
GRADLE_VERSION: 6.9
jobs:
build:
name: Build cpp oat++ client
strategy:
matrix:
sample:
- samples/client/petstore/cpp-oatpp
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Build
working-directory: ${{ matrix.sample }}
run: cmake -B build && cmake --build build --verbose

View File

@@ -13,7 +13,7 @@ env:
jobs: jobs:
build: build:
name: Build cpp oat++ server name: Build cpp qt client
strategy: strategy:
matrix: matrix:
sample: sample:
@@ -24,7 +24,7 @@ jobs:
- windows-latest - windows-latest
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: cmake -B build && cmake --build build --verbose run: cmake -B build && cmake --build build --verbose

View File

@@ -25,7 +25,7 @@ jobs:
- windows-latest - windows-latest
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Install Qt - name: Install Qt
uses: jurplel/install-qt-action@v4 uses: jurplel/install-qt-action@v4
with: with:

View File

@@ -1,37 +0,0 @@
name: Samples Crystal clients
on:
push:
paths:
- samples/client/petstore/crystal/**
pull_request:
paths:
- samples/client/petstore/crystal/**
jobs:
build:
name: Build Crystal projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/crystal/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Shards Install
run: shards install
working-directory: ${{ matrix.sample }}
- name: Run tests
run: crystal spec
working-directory: ${{ matrix.sample }}

View File

@@ -1,59 +0,0 @@
name: Samples Dart (build, test)
on:
push:
branches:
paths:
#- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
pull_request:
paths:
#- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
sdk: ["3.9.0"]
sample:
#- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/
- samples/openapi3/client/petstore/dart-dio/oneof/
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/
- samples/openapi3/client/petstore/dart-dio/binary_response/
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/
steps:
- uses: actions/checkout@v5
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: pub get
working-directory: ${{ matrix.sample }}
run: dart pub get
- name: build_runner build
working-directory: ${{ matrix.sample }}
run: dart run build_runner build
- name: test
working-directory: ${{ matrix.sample }}
run: dart test

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@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
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@v5 uses: actions/cache@v4
env: env:
cache-name: pub-cache cache-name: pub-cache
with: with:

View File

@@ -11,8 +11,8 @@ on:
- samples/client/petstore/csharp/generichost/net4.8/** - samples/client/petstore/csharp/generichost/net4.8/**
jobs: jobs:
build: build:
name: Build .Net Framework projects name: Build .Net projects
runs-on: windows-latest runs-on: windows-2019
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -33,7 +33,7 @@ jobs:
- samples/client/petstore/csharp/generichost/net4.8/Petstore - samples/client/petstore/csharp/generichost/net4.8/Petstore
- samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate - samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- 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,37 +0,0 @@
name: Samples C# .Net Client (Petstore)
on:
push:
paths:
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
pull_request:
paths:
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
jobs:
build:
name: Build clients
runs-on: ubuntu-latest
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.1.0
with:
dotnet-version: '7.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@@ -15,7 +15,7 @@ on:
- samples/client/petstore/csharp/unityWebRequest/standard2.0/** - samples/client/petstore/csharp/unityWebRequest/standard2.0/**
jobs: jobs:
build: build:
name: Build .Net Standard projects name: Build .Net projects
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
fail-fast: false fail-fast: false
@@ -27,8 +27,8 @@ jobs:
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/ - samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/ # - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: 3.1.* dotnet-version: 3.1.*
- name: Build - name: Build

View File

@@ -1,59 +0,0 @@
name: Samples C# .Net 10 Clients
on:
push:
paths:
- samples/client/petstore/csharp/generichost/latest/**
- samples/client/petstore/csharp/generichost/net10/**
- samples/client/petstore/csharp/httpclient/net10/**
- samples/client/petstore/csharp/restsharp/net10/**
- samples/client/petstore/csharp/unityWebRequest/net10/**
pull_request:
paths:
- samples/client/petstore/csharp/generichost/latest/**
- samples/client/petstore/csharp/generichost/net10/**
- samples/client/petstore/csharp/httpclient/net10/**
- samples/client/petstore/csharp/restsharp/net10/**
- samples/client/petstore/csharp/unityWebRequest/net10/**
jobs:
build:
name: Build .Net 10 projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/generichost/latest/ComposedEnum
- samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf
- samples/client/petstore/csharp/generichost/latest/Tags
- samples/client/petstore/csharp/generichost/latest/HelloWorld
- samples/client/petstore/csharp/generichost/latest/OneOfList
- samples/client/petstore/csharp/generichost/net10/AllOf
- samples/client/petstore/csharp/generichost/net10/AnyOf
- samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare
- samples/client/petstore/csharp/generichost/net10/FormModels
# - samples/client/petstore/csharp/generichost/net10/ManualPetstoreTests
# - samples/client/petstore/csharp/generichost/net10/ManualSourceGenerationTests
- samples/client/petstore/csharp/generichost/net10/NullReferenceTypes
- samples/client/petstore/csharp/generichost/net10/OneOf
- samples/client/petstore/csharp/generichost/net10/Petstore
- samples/client/petstore/csharp/generichost/net10/SourceGeneration
- samples/client/petstore/csharp/generichost/net10/UseDateTimeForDate
# restsharp
- samples/client/petstore/csharp/restsharp/net10/EnumMappings
# httpclient
- samples/client/petstore/csharp/httpclient/net10/Petstore
- samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi
# unity
# - samples/client/petstore/csharp/unityWebRequest/net10/Petstore
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.1.0
with:
dotnet-version: '10.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

@@ -24,8 +24,8 @@ jobs:
- 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
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: '6.0.x' dotnet-version: '6.0.x'
- name: Build - name: Build

View File

@@ -1,54 +0,0 @@
name: Samples C# .Net 7 Client
on:
push:
paths:
# the .NET Core 3.0 runtime is no longer supported as it reached its end-of-life on March 3, 2020
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
- samples/client/petstore/csharp/restsharp/net8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
pull_request:
paths:
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
- samples/client/petstore/csharp/restsharp/net8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
jobs:
build:
name: Build clients
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sample:
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/
- samples/client/petstore/csharp/restsharp/net8/Petstore/
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.1.0
with:
dotnet-version: '7.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@@ -18,8 +18,8 @@ jobs:
# clients # clients
- samples/client/echo_api/csharp/restsharp/net8/EchoApi - samples/client/echo_api/csharp/restsharp/net8/EchoApi
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- name: Run echo server - name: Run echo server

View File

@@ -18,8 +18,8 @@ jobs:
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/ - samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
- samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/ - samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- name: Build - name: Build

View File

@@ -25,8 +25,8 @@ jobs:
- samples/server/petstore/aspnetcore-8.0-useSwashBuckle - samples/server/petstore/aspnetcore-8.0-useSwashBuckle
- samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management - samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- name: Build - name: Build

View File

@@ -15,7 +15,7 @@ on:
- samples/client/petstore/csharp/unityWebRequest/net8/** - samples/client/petstore/csharp/unityWebRequest/net8/**
jobs: jobs:
build: build:
name: Build .Net 8 projects name: Build .Net projects
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@@ -33,8 +33,8 @@ jobs:
- samples/client/petstore/csharp/generichost/net8/SourceGeneration - samples/client/petstore/csharp/generichost/net8/SourceGeneration
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate - samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- name: Build - name: Build

View File

@@ -3,24 +3,29 @@ name: Samples C# .Net 9 Clients
on: on:
push: push:
paths: paths:
- samples/client/petstore/csharp/generichost/latest/**
- samples/client/petstore/csharp/generichost/net9/** - samples/client/petstore/csharp/generichost/net9/**
- samples/client/petstore/csharp/httpclient/net9/** - samples/client/petstore/csharp/httpclient/net9/**
- samples/client/petstore/csharp/restsharp/net9/** - samples/client/petstore/csharp/restsharp/net9/**
- samples/client/petstore/csharp/unityWebRequest/net9/** - samples/client/petstore/csharp/unityWebRequest/net9/**
pull_request: pull_request:
paths: paths:
- samples/client/petstore/csharp/generichost/latest/**
- samples/client/petstore/csharp/generichost/net9/** - samples/client/petstore/csharp/generichost/net9/**
- samples/client/petstore/csharp/httpclient/net9/** - samples/client/petstore/csharp/httpclient/net9/**
- samples/client/petstore/csharp/restsharp/net9/** - samples/client/petstore/csharp/restsharp/net9/**
- samples/client/petstore/csharp/unityWebRequest/net9/** - samples/client/petstore/csharp/unityWebRequest/net9/**
jobs: jobs:
build: build:
name: Build .Net 9 projects name: Build .Net projects
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
sample: sample:
- samples/client/petstore/csharp/generichost/latest/Tags
- samples/client/petstore/csharp/generichost/latest/HelloWorld
- samples/client/petstore/csharp/generichost/latest/OneOfList
- samples/client/petstore/csharp/generichost/net9/AllOf - samples/client/petstore/csharp/generichost/net9/AllOf
- samples/client/petstore/csharp/generichost/net9/AnyOf - samples/client/petstore/csharp/generichost/net9/AnyOf
- samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare - samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare
@@ -36,14 +41,13 @@ jobs:
- samples/client/petstore/csharp/restsharp/net9/EnumMappings - samples/client/petstore/csharp/restsharp/net9/EnumMappings
# httpclient # httpclient
- samples/client/petstore/csharp/httpclient/net9/Petstore - samples/client/petstore/csharp/httpclient/net9/Petstore
- samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi
# unity # unity
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore #- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v5.1.0 - uses: actions/setup-dotnet@v4.3.1
with: with:
dotnet-version: '9.0.x' dotnet-version: '9.0.101'
- 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

@@ -26,7 +26,7 @@ jobs:
SWAGGER_HOST: http://petstore.swagger.io SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2 SWAGGER_BASE_PATH: /v2
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: ${{matrix.otp}} otp-version: ${{matrix.otp}}

View File

@@ -23,7 +23,7 @@ jobs:
- samples/client/petstore/elm - samples/client/petstore/elm
- samples/openapi3/client/elm - samples/openapi3/client/elm
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: jorelali/setup-elm@v6 - uses: jorelali/setup-elm@v6
with: with:
elm-version: 0.19.1 elm-version: 0.19.1

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@v5 - uses: actions/checkout@v4
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
with: with:
otp-version: '27' otp-version: '27'

View File

@@ -16,12 +16,12 @@ jobs:
# clients # clients
- samples/client/echo_api/go - samples/client/echo_api/go
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-go@v6 - uses: actions/setup-go@v5
with: with:
go-version: "stable" go-version: "stable"
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -1,45 +0,0 @@
name: Samples Go Clients (Petstore)
on:
push:
paths:
- samples/client/petstore/go/**
- samples/openapi3/client/petstore/go/**
pull_request:
paths:
- samples/client/petstore/go/**
- samples/openapi3/client/petstore/go/**
jobs:
build:
name: Build Go
runs-on: ubuntu-latest
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/go/
- samples/openapi3/client/petstore/go/
steps:
- uses: actions/checkout@v5
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
- uses: actions/setup-go@v6
- run: go version
- name: Install Dependencies
working-directory: ${{ matrix.sample }}
run: |
go mod tidy
- name: Run test
working-directory: ${{ matrix.sample }}
run: go test -mod=mod -v

View File

@@ -1,45 +0,0 @@
name: Samples Go Clients
on:
push:
paths:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/**'
- 'samples/openapi3/client/petstore/go-petstore-withXml/**'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/**
- samples/client/others/go/allof_multiple_ref_and_discriminator/**
- samples/client/others/go/oneof-anyof-required/**
- samples/client/others/go/oneof-discriminator-lookup/**
pull_request:
paths:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/**'
- 'samples/openapi3/client/petstore/go-petstore-withXml/**'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/**
- samples/client/others/go/allof_multiple_ref_and_discriminator/**
- samples/client/others/go/oneof-anyof-required/**
- samples/client/others/go/oneof-discriminator-lookup/**
jobs:
build:
name: Build Go
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/'
- 'samples/openapi3/client/petstore/go-petstore-withXml/'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/
- samples/client/others/go/allof_multiple_ref_and_discriminator/
- samples/client/others/go/oneof-anyof-required/
- samples/client/others/go/oneof-discriminator-lookup/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
- run: go version
- name: Install Dependencies
working-directory: ${{ matrix.sample }}
run: |
go mod tidy
- name: Run test
working-directory: ${{ matrix.sample }}
run: go test -mod=mod -v

View File

@@ -21,8 +21,8 @@ jobs:
- samples/server/petstore/go-gin-api-server/ - samples/server/petstore/go-gin-api-server/
- samples/server/petstore/go-gin-api-server-interface-only/ - samples/server/petstore/go-gin-api-server-interface-only/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-go@v6 - uses: actions/setup-go@v5
with: with:
go-version: "stable" go-version: "stable"
- run: go version - run: go version

View File

@@ -6,13 +6,13 @@ 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/**' - '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/**' - 'samples/server/others/go-server/no-body-path-params/**'
jobs: jobs:
build: build:
@@ -26,10 +26,9 @@ jobs:
- 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/ - samples/server/others/go-server/no-body-path-params/
- samples/server/others/go-server/optional-body/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-go@v6 - uses: actions/setup-go@v5
with: with:
go-version: "stable" go-version: "stable"
- run: go version - run: go version
@@ -48,9 +47,9 @@ jobs:
go-version: go-version:
- "1.18" - "1.18"
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v6 uses: actions/setup-go@v5
with: with:
go-version: ${{ matrix.go-version }} go-version: ${{ matrix.go-version }}
- name: Install Dependencies - name: Install Dependencies
@@ -59,4 +58,4 @@ jobs:
go mod tidy go mod tidy
- name: Run tests - name: Run tests
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: go test ./samples_tests -v run: go test ./samples_tests -v

View File

@@ -21,14 +21,13 @@ jobs:
sample: sample:
- samples/client/petstore/groovy - samples/client/petstore/groovy
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -27,7 +27,7 @@ jobs:
- samples/server/others/haskell-servant-ping/ - samples/server/others/haskell-servant-ping/
- samples/client/petstore/haskell-http-client/ - samples/client/petstore/haskell-http-client/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: haskell/actions/setup@v2 - uses: haskell/actions/setup@v2
with: with:
# ghc-version: '8.8.4' # Exact version of ghc to use # ghc-version: '8.8.4' # Exact version of ghc to use

View File

@@ -22,13 +22,13 @@ jobs:
- samples/client/echo_api/java/resttemplate - samples/client/echo_api/java/resttemplate
- samples/client/echo_api/java/resteasy - samples/client/echo_api/java/resteasy
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -36,7 +36,7 @@ jobs:
~/.m2 ~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -23,13 +23,13 @@ jobs:
- samples/client/echo_api/java/resteasy - samples/client/echo_api/java/resteasy
- samples/client/echo_api/java/restclient - samples/client/echo_api/java/restclient
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -37,7 +37,7 @@ jobs:
~/.m2 ~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -29,13 +29,13 @@ jobs:
- samples/client/echo_api/java/resttemplate - samples/client/echo_api/java/resttemplate
- samples/client/echo_api/java/resteasy - samples/client/echo_api/java/resteasy
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -43,7 +43,7 @@ jobs:
~/.m2 ~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -5,7 +5,6 @@ on:
paths: paths:
- 'samples/client/petstore/java/**' - 'samples/client/petstore/java/**'
- samples/client/petstore/jaxrs-cxf-client/** - samples/client/petstore/jaxrs-cxf-client/**
- samples/client/petstore/jaxrs-cxf-client-swagger2/**
- samples/client/petstore/java-micronaut-client/** - samples/client/petstore/java-micronaut-client/**
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/** - samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
@@ -18,17 +17,12 @@ on:
- samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/jersey2-oneOf-duplicates/** - samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/** - samples/client/others/java/jersey2-oneOf-Mixed/**
- samples/client/petstore/java/jersey3-oneOf/**
- samples/client/others/java/okhttp-gson-streaming/**
- samples/client/others/java/resteasy/**
- samples/client/others/java/apache-httpclient/**
- samples/client/others/java/resttemplate-list-schema-validation/** - samples/client/others/java/resttemplate-list-schema-validation/**
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/** - samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
pull_request: pull_request:
paths: paths:
- 'samples/client/petstore/java/**' - 'samples/client/petstore/java/**'
- samples/client/petstore/jaxrs-cxf-client/** - samples/client/petstore/jaxrs-cxf-client/**
- samples/client/petstore/jaxrs-cxf-client-swagger2/**
- samples/client/petstore/java-micronaut-client/** - samples/client/petstore/java-micronaut-client/**
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/** - samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/** - samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
@@ -41,10 +35,6 @@ on:
- samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/jersey2-oneOf-duplicates/** - samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/** - samples/client/others/java/jersey2-oneOf-Mixed/**
- samples/client/petstore/java/jersey3-oneOf/**
- samples/client/others/java/okhttp-gson-streaming/**
- samples/client/others/java/resteasy/**
- samples/client/others/java/apache-httpclient/**
- samples/client/others/java/resttemplate-list-schema-validation/** - samples/client/others/java/resttemplate-list-schema-validation/**
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/** - samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
jobs: jobs:
@@ -56,12 +46,10 @@ jobs:
matrix: matrix:
sample: sample:
# clients # clients
- samples/client/petstore/jaxrs-cxf-client-swagger2
- samples/client/petstore/jaxrs-cxf-client - samples/client/petstore/jaxrs-cxf-client
- samples/client/petstore/java/native - samples/client/petstore/java/native
- samples/client/petstore/java/native-async - samples/client/petstore/java/native-async
- samples/client/petstore/java/native-jakarta - samples/client/petstore/java/native-jakarta
- samples/client/petstore/java/native-useGzipFeature
- samples/client/petstore/java/retrofit2 - samples/client/petstore/java/retrofit2
- samples/client/petstore/java/retrofit2rx2 - samples/client/petstore/java/retrofit2rx2
- samples/client/petstore/java/retrofit2rx3 - samples/client/petstore/java/retrofit2rx3
@@ -109,19 +97,14 @@ jobs:
- samples/client/others/java/jersey2-oneOf-Mixed/ - samples/client/others/java/jersey2-oneOf-Mixed/
- samples/client/others/java/resttemplate-list-schema-validation/ - samples/client/others/java/resttemplate-list-schema-validation/
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/ - samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/
- samples/client/petstore/java/jersey3-oneOf/
- samples/client/others/java/okhttp-gson-streaming/
- samples/client/petstore/java/resteasy/
- samples/client/petstore/java/apache-httpclient/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -133,7 +116,7 @@ jobs:
run: mvn clean package --no-transfer-progress run: mvn clean package --no-transfer-progress
- name: Cache gradle dependencies - name: Cache gradle dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: gradle-caches cache-name: gradle-caches
with: with:
@@ -141,7 +124,7 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
- name: Cache gradle wrapper - name: Cache gradle wrapper
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: gradle-wrapper cache-name: gradle-wrapper
with: with:

View File

@@ -7,7 +7,6 @@ on:
- samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/** - samples/client/petstore/java/restclient-*/**
- samples/client/others/java/webclient-sealedInterface/** - samples/client/others/java/webclient-sealedInterface/**
- samples/client/others/java/webclient-sealedInterface_3_1/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/restclient-enum-in-multipart/** - samples/client/others/java/restclient-enum-in-multipart/**
pull_request: pull_request:
@@ -16,7 +15,6 @@ on:
- samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/** - samples/client/petstore/java/restclient-*/**
- samples/client/others/java/webclient-sealedInterface/** - samples/client/others/java/webclient-sealedInterface/**
- samples/client/others/java/webclient-sealedInterface_3_1/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/restclient-enum-in-multipart/** - samples/client/others/java/restclient-enum-in-multipart/**
jobs: jobs:
@@ -36,18 +34,16 @@ jobs:
- samples/client/petstore/java/restclient-useSingleRequestParameter - samples/client/petstore/java/restclient-useSingleRequestParameter
- samples/client/petstore/java/restclient-useSingleRequestParameter-static - samples/client/petstore/java/restclient-useSingleRequestParameter-static
- samples/client/others/java/webclient-sealedInterface - samples/client/others/java/webclient-sealedInterface
- samples/client/others/java/webclient-sealedInterface_3_1
- samples/client/petstore/java/webclient-useSingleRequestParameter - samples/client/petstore/java/webclient-useSingleRequestParameter
- samples/client/others/java/restclient-enum-in-multipart - samples/client/others/java/restclient-enum-in-multipart
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -60,7 +56,7 @@ jobs:
run: mvn clean package --no-transfer-progress run: mvn clean package --no-transfer-progress
- name: Cache gradle dependencies - name: Cache gradle dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: gradle-caches cache-name: gradle-caches
with: with:
@@ -68,7 +64,7 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
- name: Cache gradle wrapper - name: Cache gradle wrapper
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: gradle-wrapper cache-name: gradle-wrapper
with: with:

View File

@@ -1,39 +0,0 @@
name: Samples Java Dubbo
on:
push:
paths:
- 'samples/server/petstore/java-dubbo/**'
pull_request:
paths:
- 'samples/server/petstore/java-dubbo/**'
jobs:
build:
name: Build Java Dubbo
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/java-dubbo
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Cache maven dependencies
uses: actions/cache@v5
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress -DskipTests
# add -DskipTests as the app compiles but fails to start
#run: mvn clean package --no-transfer-progress

View File

@@ -26,13 +26,13 @@ jobs:
- samples/server/others/java-helidon-server/v3/mp-format-test - samples/server/others/java-helidon-server/v3/mp-format-test
version: [17] version: [17]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: ${{ matrix.version }} java-version: ${{ matrix.version }}
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -27,13 +27,13 @@ jobs:
- samples/server/others/java-helidon-server/v4/mp-format-test - samples/server/others/java-helidon-server/v4/mp-format-test
version: [21] version: [21]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: ${{ matrix.version }} java-version: ${{ matrix.version }}
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -1,65 +0,0 @@
# run java client tests with petstore server
name: Samples Java Petsore Client JDK11
on:
push:
paths:
- samples/client/petstore/java/jersey2-java8/**
- samples/openapi3/client/petstore/java/jersey2-java8/**
- samples/client/petstore/java/jersey3/**
- samples/client/petstore/java/okhttp-gson/**
- samples/client/petstore/java/okhttp-gson-3.1/**
- samples/client/petstore/java/okhttp-gson-dynamicOperations/**
- samples/client/petstore/java-micronaut-client/**
pull_request:
paths:
- samples/client/petstore/java/jersey2-java8/**
- samples/openapi3/client/petstore/java/jersey2-java8/**
- samples/client/petstore/java/jersey3/**
- samples/client/petstore/java/okhttp-gson/**
- samples/client/petstore/java/okhttp-gson-3.1/**
- samples/client/petstore/java/okhttp-gson-dynamicOperations/**
- samples/client/petstore/java-micronaut-client/**
jobs:
build:
name: Build Java Client JDK11
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/java/jersey2-java8
- samples/openapi3/client/petstore/java/jersey2-java8
- samples/client/petstore/java/jersey3
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/java/okhttp-gson-3.1
- samples/client/petstore/java/okhttp-gson-dynamicOperations
- samples/client/petstore/java-micronaut-client
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Cache maven dependencies
uses: actions/cache@v5
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build with Maven
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress

View File

@@ -23,19 +23,19 @@ jobs:
- samples/server/petstore/java-play-framework-fake-endpoints - samples/server/petstore/java-play-framework-fake-endpoints
- samples/server/petstore/java-play-framework-fake-endpoints-with-security - samples/server/petstore/java-play-framework-fake-endpoints-with-security
- samples/server/petstore/java-play-framework-no-bean-validation - samples/server/petstore/java-play-framework-no-bean-validation
- samples/server/petstore/java-play-framework-no-excp-handling - samples/server/petstore/java-play-framework-no-exception-handling
- samples/server/petstore/java-play-framework-no-interface - samples/server/petstore/java-play-framework-no-interface
- samples/server/petstore/java-play-framework-no-nullable - samples/server/petstore/java-play-framework-no-nullable
- 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@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -1,38 +0,0 @@
name: Samples Java (sbt)
on:
push:
paths:
- 'samples/client/petstore/java/okhttp-gson/**'
pull_request:
paths:
- 'samples/client/petstore/java/okhttp-gson/**'
jobs:
build:
name: Build sbt/Java client, servers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/java/okhttp-gson
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v5
env:
cache-name: maven-repository
with:
path: |
~/.ivy2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
- name: Build and test
working-directory: ${{ matrix.sample }}
run: sbt -v +test

View File

@@ -31,13 +31,13 @@ jobs:
#- samples/server/petstore/java-undertow/ #- samples/server/petstore/java-undertow/
- samples/server/petstore/java-microprofile/ - samples/server/petstore/java-microprofile/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -17,13 +17,13 @@ jobs:
sample: sample:
- samples/server/petstore/java-wiremock - samples/server/petstore/java-wiremock
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -1,51 +0,0 @@
name: Samples JS clients
on:
push:
paths:
#- samples/client/petstore/javascript-flowtyped/**
- samples/client/petstore/javascript-es6/**
- samples/client/petstore/javascript-promise-es6/**
pull_request:
paths:
#- samples/client/petstore/javascript-flowtyped/**
- samples/client/petstore/javascript-es6/**
- samples/client/petstore/javascript-promise-es6/**
jobs:
build:
name: Build projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- "18.x"
- "20.x"
sample:
# clients
- samples/client/petstore/javascript-es6/
- samples/client/petstore/javascript-promise-es6/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
- name: Use Node.js 20.x
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
cache: 'npm' # Or 'yarn'
- name: npm install
working-directory: ${{ matrix.sample }}
run: npm install
- name: npm test
working-directory: ${{ matrix.sample }}
run: npm test

View File

@@ -18,13 +18,13 @@ jobs:
# servers # servers
- samples/server/petstore/jaxrs/jersey3 - samples/server/petstore/jaxrs/jersey3
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -20,7 +20,10 @@ jobs:
- samples/server/petstore/jaxrs/jersey2-useTags - samples/server/petstore/jaxrs/jersey2-useTags
- samples/server/petstore/jaxrs-jersey - samples/server/petstore/jaxrs-jersey
- samples/server/petstore/jaxrs-spec - samples/server/petstore/jaxrs-spec
- samples/server/petstore/jaxrs-spec-withxml - samples/server/petstore/jaxrs-spec-interface
- samples/server/petstore/jaxrs-spec-interface-response
- samples/server/petstore/jaxrs-jersey
- 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-datelib-j8 - samples/server/petstore/jaxrs-datelib-j8
@@ -34,17 +37,14 @@ jobs:
- samples/server/petstore/jaxrs-cxf-cdi - samples/server/petstore/jaxrs-cxf-cdi
- 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
- samples/server/petstore/jaxrs-spec-swagger-annotations
- samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta
- samples/server/petstore/jaxrs-spec-swagger-v3-annotations
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -58,13 +58,13 @@ jobs:
- samples/server/petstore/java-helidon-server/v3/mp/ - samples/server/petstore/java-helidon-server/v3/mp/
- samples/server/petstore/java-helidon-server/v3/se - samples/server/petstore/java-helidon-server/v3/se
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -31,13 +31,13 @@ jobs:
- samples/server/petstore/java-helidon-server/v4/mp/ - samples/server/petstore/java-helidon-server/v4/mp/
- samples/server/petstore/java-helidon-server/v4/se/ - samples/server/petstore/java-helidon-server/v4/se/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 21 java-version: 21
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -15,7 +15,7 @@ jobs:
name: Tests Julia name: Tests Julia
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2 - uses: julia-actions/setup-julia@v2
with: with:
version: 1.8 version: 1.8

View File

@@ -5,12 +5,10 @@ on:
branches: branches:
- 'samples/client/petstore/kotlin*/**' - 'samples/client/petstore/kotlin*/**'
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**' - 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
- samples/client/others/kotlin-integer-enum/**
pull_request: pull_request:
paths: paths:
- 'samples/client/petstore/kotlin*/**' - 'samples/client/petstore/kotlin*/**'
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**' - 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
- samples/client/others/kotlin-integer-enum/**
jobs: jobs:
build: build:
@@ -29,10 +27,10 @@ jobs:
# 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-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-multiplatform-kotlinx-datetime
- samples/client/petstore/kotlin-multiplatform-allOf-discriminator
- samples/client/petstore/kotlin-nonpublic - samples/client/petstore/kotlin-nonpublic
- samples/client/petstore/kotlin-nullable - samples/client/petstore/kotlin-nullable
- samples/client/petstore/kotlin-retrofit2 - samples/client/petstore/kotlin-retrofit2
@@ -43,11 +41,12 @@ jobs:
- samples/client/petstore/kotlin-threetenbp - samples/client/petstore/kotlin-threetenbp
- samples/client/petstore/kotlin-kotlinx-datetime - samples/client/petstore/kotlin-kotlinx-datetime
- samples/client/petstore/kotlin-uppercase-enum - samples/client/petstore/kotlin-uppercase-enum
- samples/client/petstore/kotlin-array-integer-enum
- samples/client/petstore/kotlin-default-values-jvm-okhttp4 - samples/client/petstore/kotlin-default-values-jvm-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-multiplatform - samples/client/petstore/kotlin-default-values-multiplatform
- 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-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
@@ -67,18 +66,14 @@ jobs:
- samples/client/petstore/kotlin-name-parameter-mappings - samples/client/petstore/kotlin-name-parameter-mappings
- samples/client/others/kotlin-jvm-okhttp-parameter-tests - samples/client/others/kotlin-jvm-okhttp-parameter-tests
- samples/client/others/kotlin-jvm-okhttp-path-comments - samples/client/others/kotlin-jvm-okhttp-path-comments
- samples/client/others/kotlin-integer-enum
- samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization
- samples/client/others/kotlin-oneOf-discriminator-kotlinx-serialization
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -21,14 +21,13 @@ jobs:
- samples/client/echo_api/kotlin-model-prefix-type-mappings - samples/client/echo_api/kotlin-model-prefix-type-mappings
- samples/client/echo_api/kotlin-jvm-okhttp - samples/client/echo_api/kotlin-jvm-okhttp
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -41,7 +40,7 @@ jobs:
build-root-directory: ${{ matrix.sample }} build-root-directory: ${{ matrix.sample }}
arguments: wrapper arguments: wrapper
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -8,7 +8,6 @@ on:
- 'samples/server/petstore/kotlin-server-modelMutable/**' - 'samples/server/petstore/kotlin-server-modelMutable/**'
- 'samples/server/petstore/kotlin-springboot-*/**' - 'samples/server/petstore/kotlin-springboot-*/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**' - 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
- 'samples/server/petstore/kotlin-spring-declarative*/**'
# comment out due to gradle build failure # comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/** # - samples/server/petstore/kotlin-spring-default/**
pull_request: pull_request:
@@ -18,7 +17,6 @@ on:
- 'samples/server/petstore/kotlin-server-modelMutable/**' - 'samples/server/petstore/kotlin-server-modelMutable/**'
- 'samples/server/petstore/kotlin-springboot-*/**' - 'samples/server/petstore/kotlin-springboot-*/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**' - 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
- 'samples/server/petstore/kotlin-spring-declarative*/**'
# comment out due to gradle build failure # comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/** # - samples/server/petstore/kotlin-spring-default/**
@@ -36,8 +34,6 @@ jobs:
# server # server
- samples/server/petstore/kotlin-server-required-and-nullable-properties - samples/server/petstore/kotlin-server-required-and-nullable-properties
- samples/server/petstore/kotlin-springboot-3 - samples/server/petstore/kotlin-springboot-3
- samples/server/petstore/kotlin-springboot-3-no-response-entity
- samples/server/petstore/kotlin-springboot-additionalproperties
- samples/server/petstore/kotlin-springboot-delegate-nodefaults - samples/server/petstore/kotlin-springboot-delegate-nodefaults
- samples/server/petstore/kotlin-springboot-request-cookie - samples/server/petstore/kotlin-springboot-request-cookie
- samples/server/petstore/kotlin-server/jaxrs-spec - samples/server/petstore/kotlin-server/jaxrs-spec
@@ -47,21 +43,16 @@ jobs:
- samples/server/petstore/kotlin-server/ktor - samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2 - samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-misk - samples/server/petstore/kotlin-misk
- samples/server/petstore/kotlin-spring-declarative-interface
- samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines
- samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped
- samples/server/petstore/kotlin-spring-declarative-interface-wrapped
# comment out due to gradle build failure # comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/ # - samples/server/petstore/kotlin-spring-default/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -76,4 +67,4 @@ jobs:
arguments: wrapper arguments: wrapper
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: ./gradlew build -x test run: ./gradlew build -x test

View File

@@ -27,14 +27,13 @@ jobs:
- samples/server/petstore/kotlin-server-required-and-nullable-properties - samples/server/petstore/kotlin-server-required-and-nullable-properties
- samples/server/petstore/kotlin-misk - samples/server/petstore/kotlin-misk
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 21 java-version: 21
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -29,8 +29,6 @@ jobs:
sample: sample:
# server # server
- samples/server/petstore/kotlin-springboot - samples/server/petstore/kotlin-springboot
- samples/server/petstore/kotlin-springboot-no-response-entity
- samples/server/petstore/kotlin-springboot-no-response-entity-delegate
- samples/server/petstore/kotlin-springboot-multipart-request-model - samples/server/petstore/kotlin-springboot-multipart-request-model
- samples/server/petstore/kotlin-springboot-bigdecimal-default - samples/server/petstore/kotlin-springboot-bigdecimal-default
- samples/server/petstore/kotlin-springboot-delegate - samples/server/petstore/kotlin-springboot-delegate
@@ -40,8 +38,6 @@ jobs:
- samples/server/petstore/kotlin-springboot-source-swagger1 - samples/server/petstore/kotlin-springboot-source-swagger1
- samples/server/petstore/kotlin-springboot-source-swagger2 - samples/server/petstore/kotlin-springboot-source-swagger2
- samples/server/petstore/kotlin-springboot-springfox - samples/server/petstore/kotlin-springboot-springfox
- samples/server/petstore/kotlin-springboot-x-kotlin-implements
- samples/server/petstore/kotlin-springboot-include-http-request-context-delegate
- samples/server/petstore/kotlin-server/ktor - samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2 - samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-server/jaxrs-spec - samples/server/petstore/kotlin-server/jaxrs-spec
@@ -58,14 +54,13 @@ jobs:
# 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@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 8
cache: gradle
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:
@@ -80,4 +75,4 @@ jobs:
arguments: wrapper arguments: wrapper
- name: Build - name: Build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: ./gradlew build -x test run: ./gradlew build -x test

View File

@@ -22,13 +22,13 @@ jobs:
- samples/server/petstore/kotlin-wiremock-responses - samples/server/petstore/kotlin-wiremock-responses
- samples/server/echo_api/kotlin-wiremock - samples/server/echo_api/kotlin-wiremock
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 11 java-version: 11
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -4,15 +4,9 @@ on:
push: push:
paths: paths:
- 'samples/client/petstore/ocaml/**' - 'samples/client/petstore/ocaml/**'
- 'samples/client/petstore/ocaml-fake-petstore/**'
- 'samples/client/petstore/ocaml-oneOf-primitive/**'
- 'samples/client/petstore/ocaml-additional-properties/**'
pull_request: pull_request:
paths: paths:
- 'samples/client/petstore/ocaml/**' - 'samples/client/petstore/ocaml/**'
- 'samples/client/petstore/ocaml-fake-petstore/**'
- 'samples/client/petstore/ocaml-oneOf-primitive/**'
- 'samples/client/petstore/ocaml-additional-properties/**'
jobs: jobs:
build: build:
@@ -23,11 +17,8 @@ jobs:
matrix: matrix:
sample: sample:
- 'samples/client/petstore/ocaml/' - 'samples/client/petstore/ocaml/'
- 'samples/client/petstore/ocaml-fake-petstore/'
- 'samples/client/petstore/ocaml-oneOf-primitive/'
- 'samples/client/petstore/ocaml-additional-properties/'
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Set-up OCaml - name: Set-up OCaml
uses: ocaml/setup-ocaml@v3 uses: ocaml/setup-ocaml@v3
with: with:

View File

@@ -31,7 +31,7 @@ jobs:
SWAGGER_HOST: http://petstore.swagger.io SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2 SWAGGER_BASE_PATH: /v2
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- 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,48 +0,0 @@
name: Samples PHP (Server) Syntax Checker
on:
push:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
#- samples/server/petstore/php-laravel/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-mezzio-ph-modern/**
- samples/server/petstore/php-mezzio-ph/**
- samples/server/petstore/php-slim4/**
pull_request:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
#- samples/server/petstore/php-laravel/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-mezzio-ph-modern/**
- samples/server/petstore/php-mezzio-ph/**
- samples/server/petstore/php-slim4/**
jobs:
build:
name: Build PHP projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
sample:
# servers
- samples/server/petstore/php-symfony/SymfonyBundle-php/
#- samples/server/petstore/php-laravel/
- samples/server/petstore/php-flight/
- samples/server/petstore/php-mezzio-ph-modern/
- samples/server/petstore/php-mezzio-ph/
- samples/server/petstore/php-slim4/
steps:
- uses: actions/checkout@v5
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
- name: php -l
working-directory: ${{ matrix.sample }}
run: find . -name "*.php" -exec php -l {} +

View File

@@ -1,36 +0,0 @@
name: Samples PHP Syntax Checker
on:
push:
paths:
- samples/client/petstore/php/OpenAPIClient-php/**
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
pull_request:
paths:
- samples/client/petstore/php/OpenAPIClient-php/**
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
jobs:
build:
name: Build PHP projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
sample:
# clients
- samples/client/petstore/php/OpenAPIClient-php/
- samples/client/petstore/php-nextgen/OpenAPIClient-php/
steps:
- uses: actions/checkout@v5
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
- name: php -l
working-directory: ${{ matrix.sample }}
run: find . -name "*.php" -exec php -l {} +

View File

@@ -32,7 +32,7 @@ jobs:
- samples/server/petstore/php-laravel/ - samples/server/petstore/php-laravel/
- samples/server/petstore/php-laravel-issue-21334/ - samples/server/petstore/php-laravel-issue-21334/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:

View File

@@ -19,8 +19,8 @@ jobs:
python-version: python-version:
- "3.12" - "3.12"
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install - name: Install

View File

@@ -1,40 +0,0 @@
name: Samples PowerShell
on:
push:
paths:
- samples/client/petstore/powershell/**
pull_request:
paths:
- samples/client/petstore/powershell/**
jobs:
build:
runs-on: ubuntu-latest
name: Test Powershell Clients
strategy:
matrix:
sample:
- samples/client/petstore/powershell/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Build the client
working-directory: ${{ matrix.sample }}
shell: pwsh
run: |
./Build.ps1
- name: Test
working-directory: ${{ matrix.sample }}
shell: pwsh
run: |
Import-Module -Name './src/PSPetstore'
Invoke-Pester -PassThru

View File

@@ -22,7 +22,7 @@ jobs:
- 'samples/config/petstore/protobuf-schema-config/' - 'samples/config/petstore/protobuf-schema-config/'
- 'samples/config/petstore/protobuf-schema-config-complex/' - 'samples/config/petstore/protobuf-schema-config-complex/'
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Install Protocol Buffers Compiler - name: Install Protocol Buffers Compiler
run: | run: |
sudo apt-get update sudo apt-get update

View File

@@ -24,12 +24,12 @@ jobs:
- "3.12" - "3.12"
- "3.13" - "3.13"
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -18,10 +18,10 @@ jobs:
# servers # servers
- samples/server/petstore/python-fastapi/ - samples/server/petstore/python-fastapi/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.9'
- name: Install dependencies - name: Install dependencies
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: | run: |

View File

@@ -12,8 +12,8 @@ jobs:
name: Validate pyproject.toml name: Validate pyproject.toml
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
with: with:
python-version: "3.13" python-version: "3.13"
- name: Install validator - name: Install validator
@@ -34,9 +34,7 @@ jobs:
- "3.13" - "3.13"
sample: sample:
- samples/openapi3/client/petstore/python-aiohttp - samples/openapi3/client/petstore/python-aiohttp
- samples/openapi3/client/petstore/python-httpx
- samples/openapi3/client/petstore/python - samples/openapi3/client/petstore/python
- samples/openapi3/client/petstore/python-lazyImports
services: services:
petstore-api: petstore-api:
image: swaggerapi/petstore image: swaggerapi/petstore
@@ -46,14 +44,14 @@ jobs:
SWAGGER_HOST: http://petstore.swagger.io SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2 SWAGGER_BASE_PATH: /v2
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
id: py id: py
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Cache - name: Cache
uses: actions/cache@v5 uses: actions/cache@v4
with: with:
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}- key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
path: | path: |

View File

@@ -23,12 +23,12 @@ jobs:
- "3.11" - "3.11"
- "3.12" - "3.12"
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -31,14 +31,14 @@ jobs:
SWAGGER_HOST: http://petstore.swagger.io SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2 SWAGGER_BASE_PATH: /v2
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
id: py id: py
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Cache - name: Cache
uses: actions/cache@v5 uses: actions/cache@v4
with: with:
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}- key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
path: | path: |

View File

@@ -18,10 +18,10 @@ jobs:
# servers # servers
- samples/server/petstore/python-aiohttp-srclayout/ - samples/server/petstore/python-aiohttp-srclayout/
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-python@v6 - uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.9'
- name: Test - name: Test
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
run: make test-all run: make test-all

View File

@@ -0,0 +1,43 @@
name: Samples R Petstore
on:
push:
paths:
- 'samples/client/petstore/R/**'
pull_request:
paths:
- 'samples/client/petstore/R/**'
jobs:
build:
name: Build R
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/client/petstore/R/'
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: r-lib/actions/setup-r@v2
with:
r-version: 3.6.1
- uses: r-lib/actions/setup-r-dependencies@v2
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,69 +1,42 @@
name: Samples R clients name: Samples R
on: on:
push: push:
paths: paths:
- samples/client/petstore/R/** - 'samples/client/echo_api/r/**'
- samples/client/petstore/R-httr2/**
- samples/client/petstore/R-httr2-wrapper/**
pull_request: pull_request:
paths: paths:
- samples/client/petstore/R/** - 'samples/client/echo_api/r/**'
- samples/client/petstore/R-httr2/**
- samples/client/petstore/R-httr2-wrapper/**
jobs: jobs:
build: build:
name: Build R projects name: Build R
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
sample: sample:
# clients - 'samples/client/echo_api/r/'
- samples/client/petstore/R/
- samples/client/petstore/R-httr2/
- samples/client/petstore/R-httr2-wrapper/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Add hosts to /etc/hosts - name: Setup node.js
uses: actions/setup-node@v4
- name: Run echo server
run: | run: |
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts 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 - uses: r-lib/actions/setup-r@v2
with: with:
use-public-rspm: true r-version: 3.6.1
- name: Install devtools
run: install.packages("devtools")
shell: Rscript {0}
working-directory: ${{ matrix.sample }}
- name: Build
run: devtools::build()
shell: Rscript {0}
working-directory: ${{ matrix.sample }}
- uses: r-lib/actions/setup-r-dependencies@v2 - uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: ${{ matrix.sample }}
extra-packages: any::rcmdcheck
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
working-directory: ${{ matrix.sample }}
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
error-on: '"error"'
- name: Install local package
run: R CMD INSTALL .
shell: bash # Ensure correct shell for command execution
working-directory: ${{ matrix.sample }} 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

@@ -24,9 +24,9 @@ jobs:
- 'samples/client/echo_api/ruby-faraday/' - 'samples/client/echo_api/ruby-faraday/'
- 'samples/client/echo_api/ruby-typhoeus/' - 'samples/client/echo_api/ruby-typhoeus/'
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v5 uses: actions/setup-node@v4
- name: Run echo server - name: Run echo server
run: | run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@@ -1,72 +0,0 @@
name: Samples Rust Clients
on:
push:
paths:
- "samples/client/others/rust/**"
- "samples/client/petstore/rust-server/**"
pull_request:
paths:
- "samples/client/others/rust/**"
- "samples/client/petstore/rust/**"
jobs:
build:
name: Build Rust
runs-on: ubuntu-latest
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
strategy:
fail-fast: false
matrix:
sample:
# these folders contain sub-projects of rust clients, servers
- samples/client/others/rust/
- samples/client/petstore/rust/
steps:
- uses: actions/checkout@v5
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-targets: false # Don't cache workspace target directories as they don't exist
cache-directories:
${{ matrix.sample }}/target
workspaces: |
${{ matrix.sample }}/output/*
- name: Build
working-directory: ${{ matrix.sample }}
run: cargo build --all-targets --all-features
- name: Tests
working-directory: ${{ matrix.sample }}
run: |
set -e
# Iterate through each example and test various features
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
do
# Not all versions have a client example
if test -f examples/client/main.rs; then
cargo build --example client --features="client"
fi
# Test the CLI works if present
if test -f bin/cli.rs; then
cargo build --bin ${package##*/} --features cli
target/debug/${package##*/} --help
fi
cargo fmt
cargo test
cargo clippy
cargo doc
done

View File

@@ -1,71 +0,0 @@
name: Samples Rust Servers
on:
push:
paths:
- "samples/server/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
pull_request:
paths:
- "samples/server/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
jobs:
build:
name: Build Rust
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# these folders contain sub-projects of rust clients, servers
- samples/server/petstore/rust-server/
- samples/server/petstore/rust-server-deprecated/
- samples/server/petstore/rust-axum/
steps:
- uses: actions/checkout@v5
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-targets: false # Don't cache workspace target directories as they don't exist
cache-directories:
${{ matrix.sample }}/target
workspaces: |
${{ matrix.sample }}/output/*
- name: Build
working-directory: ${{ matrix.sample }}
run: |
set -e
cargo build --all-targets --all-features
cargo build --all-targets --no-default-features
- name: Tests
working-directory: ${{ matrix.sample }}
run: |
set -e
# Iterate through each example and test various features
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
do
# Not all versions have a server example
if test -f examples/server/main.rs; then
cargo build --example server --features="server"
fi
# Test the CLI works if present
if test -f bin/cli.rs; then
cargo build --bin ${package##*/} --features cli
target/debug/${package##*/} --help
fi
# Test the validate feature if it exists
if cargo read-manifest | grep -q '"validate"'; then
cargo build --features validate --all-targets
fi
cargo fmt
cargo test
cargo clippy
cargo doc
done

79
.github/workflows/samples-rust.yaml vendored Normal file
View File

@@ -0,0 +1,79 @@
name: Samples Rust
on:
push:
paths:
- "samples/client/others/rust/**"
- "samples/server/petstore/rust-server/**"
- "samples/client/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
pull_request:
paths:
- "samples/client/others/rust/**"
- "samples/client/petstore/rust/**"
- "samples/server/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
jobs:
build:
name: Build Rust
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# these folders contain sub-projects of rust clients, servers
- samples/client/others/rust/
- samples/client/petstore/rust/
- samples/server/petstore/rust-server/
- samples/server/petstore/rust-server-deprecated/
- samples/server/petstore/rust-axum/
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-targets: false # Don't cache workspace target directories as they don't exist
cache-directories:
${{ matrix.sample }}/target
workspaces: |
${{ matrix.sample }}/output/*
- name: Build
working-directory: ${{ matrix.sample }}
run: cargo build --all-targets --all-features
- name: Tests
working-directory: ${{ matrix.sample }}
run: |
set -e
# Skip samples/client/petstore/rust/ as it's tests are failing.
if [[ "${{ matrix.sample }}" == "samples/client/petstore/rust/" ]]; then
echo "Skipping tests for samples/client/petstore/rust/"
exit 0
fi
# Iterate through each example and test various features
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
do
# Not all versions have a client example
if test -f examples/client/main.rs; then
cargo build --example client --features="client"
fi
# Not all versions have a server example
if test -f examples/server/main.rs; then
cargo build --example server --features="server"
fi
# Test the CLI works if present
if test -f bin/cli.rs; then
cargo build --bin ${package##*/} --features cli
target/debug/${package##*/} --help
fi
cargo fmt
cargo test
cargo clippy
cargo doc
done

View File

@@ -1,70 +0,0 @@
name: Samples Scala/sbt client
on:
push:
paths:
- samples/client/petstore/scalaz/**
- samples/client/petstore/scala-pekko/**
- samples/client/petstore/scala-http4s/**
- samples/client/petstore/scala-sttp4-jsoniter/**
- samples/client/petstore/scala-akka/**
- samples/client/petstore/scala-sttp/**
- samples/client/petstore/scala-sttp-circe/**
- samples/client/petstore/scala-sttp4/**
pull_request:
paths:
- samples/client/petstore/scalaz/**
- samples/client/petstore/scala-pekko/**
- samples/client/petstore/scala-http4s/**
- samples/client/petstore/scala-sttp4-jsoniter/**
- samples/client/petstore/scala-akka/**
- samples/client/petstore/scala-sttp/**
- samples/client/petstore/scala-sttp-circe/**
- samples/client/petstore/scala-sttp4/**
jobs:
build:
name: Build sbt/Scala
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/scalaz
- samples/client/petstore/scala-pekko
- samples/client/petstore/scala-http4s
- samples/client/petstore/scala-sttp4-jsoniter
- samples/client/petstore/scala-akka
- samples/client/petstore/scala-sttp
- samples/client/petstore/scala-sttp-circe
- samples/client/petstore/scala-sttp4
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v5
env:
cache-name: maven-repository
with:
path: |
~/.ivy2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
- name: Build and test
working-directory: ${{ matrix.sample }}
run: sbt -v test

View File

@@ -18,15 +18,15 @@ jobs:
# servers # servers
- samples/server/petstore/scala-finch # cannot be tested with jdk11 - samples/server/petstore/scala-finch # cannot be tested with jdk11
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Setup sbt launcher - name: Setup sbt launcher
uses: sbt/setup-sbt@v1 uses: sbt/setup-sbt@v1
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -1,43 +0,0 @@
name: Samples Scala/sbt server
on:
push:
paths:
- 'samples/server/petstore/scala**'
pull_request:
paths:
- 'samples/server/petstore/scala**'
jobs:
build:
name: Build sbt/Scala
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/scala-play-server
- samples/server/petstore/scala-akka-http-server
- samples/server/petstore/scala-pekko-http-server
- samples/server/petstore/scalatra
- samples/server/petstore/scala-http4s-server
- samples/server/petstore/scala-cask
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v5
env:
cache-name: maven-repository
with:
path: |
~/.ivy2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
- name: Build and test
working-directory: ${{ matrix.sample }}
run: sbt -v +test

55
.github/workflows/samples-scala.yaml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Samples Scala/sbt
on:
push:
paths:
- 'samples/client/petstore/scala**'
- 'samples/server/petstore/scala**'
- 'samples/client/petstore/java/okhttp-gson/**'
pull_request:
paths:
- 'samples/client/petstore/scala**'
- 'samples/server/petstore/scala**'
- 'samples/client/petstore/java/okhttp-gson/**'
jobs:
build:
name: Build sbt/Scala client, servers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/scalaz
- samples/client/petstore/scala-pekko
- samples/client/petstore/scala-http4s
#- samples/client/petstore/scala-sttp
#- samples/client/petstore/scala-sttp-circe
# servers
- samples/server/petstore/scala-lagom-server
- samples/server/petstore/scala-play-server
- samples/server/petstore/scala-akka-http-server
- samples/server/petstore/scala-pekko-http-server
- samples/server/petstore/scalatra
- samples/server/petstore/scala-http4s-server
- samples/server/petstore/scala-cask
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.ivy2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
- name: Build and test
working-directory: ${{ matrix.sample }}
run: sbt -v +test

View File

@@ -11,7 +11,6 @@ on:
- samples/server/petstore/springboot-file-delegate-optional - samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples - samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed - samples/server/petstore/spring-boot-oneof-sealed
- samples/openapi3/server/petstore/spring-boot-oneof-interface
pull_request: pull_request:
paths: paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional - samples/openapi3/client/petstore/spring-cloud-3-with-optional
@@ -22,7 +21,6 @@ on:
- samples/server/petstore/springboot-file-delegate-optional - samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples - samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed - samples/server/petstore/spring-boot-oneof-sealed
- samples/openapi3/server/petstore/spring-boot-oneof-interface
jobs: jobs:
build: build:
name: Build Java Spring (JDK17) name: Build Java Spring (JDK17)
@@ -41,15 +39,14 @@ jobs:
- samples/server/petstore/springboot-file-delegate-optional - samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples - samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed - samples/server/petstore/spring-boot-oneof-sealed
- samples/openapi3/server/petstore/spring-boot-oneof-interface
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -42,7 +42,7 @@ jobs:
- samples/openapi3/server/petstore/springboot-delegate - samples/openapi3/server/petstore/springboot-delegate
- samples/openapi3/server/petstore/spring-boot-oneof - samples/openapi3/server/petstore/spring-boot-oneof
- samples/server/petstore/spring-boot-nullable-set - samples/server/petstore/spring-boot-nullable-set
- samples/server/petstore/spring-boot-defaultInterface-unhandledExcp - samples/server/petstore/spring-boot-defaultInterface-unhandledException
- samples/server/petstore/springboot - samples/server/petstore/springboot
- samples/server/petstore/springboot-beanvalidation - samples/server/petstore/springboot-beanvalidation
- samples/server/petstore/springboot-builtin-validation - samples/server/petstore/springboot-builtin-validation
@@ -60,15 +60,14 @@ jobs:
- samples/server/petstore/springboot-spring-provide-args - samples/server/petstore/springboot-spring-provide-args
- samples/server/petstore/springboot-useoptional - samples/server/petstore/springboot-useoptional
- samples/server/petstore/springboot-virtualan - samples/server/petstore/springboot-virtualan
- samples/openapi3/server/petstore/spring-boot-oneof-interface
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-java@v5 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 8 java-version: 8
- name: Cache maven dependencies - name: Cache maven dependencies
uses: actions/cache@v5 uses: actions/cache@v4
env: env:
cache-name: maven-repository cache-name: maven-repository
with: with:

View File

@@ -34,8 +34,8 @@ jobs:
name: Build Swift samples name: Build Swift samples
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v3 - uses: swift-actions/setup-swift@v2
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
with: with:
swift-version: '5' swift-version: '5'

View File

@@ -20,9 +20,9 @@ jobs:
- 18 - 18
- 20 - 20
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-node@v5 - uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}

View File

@@ -1,148 +0,0 @@
name: Samples TS clients
on:
push:
paths:
- samples/client/others/typescript-angular/**
- samples/client/others/typescript-angular-v20/**
# comment out angular released before Nov 2023
#- samples/client/petstore/typescript-angular-v12-provided-in-root/**
#- samples/client/petstore/typescript-angular-v13-provided-in-root/**
#- samples/client/petstore/typescript-angular-v14-provided-in-root/**
#- samples/client/petstore/typescript-angular-v15-provided-in-root/**
- samples/client/petstore/typescript-angular-v16-provided-in-root/**
- samples/client/petstore/typescript-angular-v17-provided-in-root/**
- samples/client/petstore/typescript-angular-v18-provided-in-root/**
- samples/client/petstore/typescript-angular-v19-provided-in-root/**
- samples/client/petstore/typescript-angular-v20-provided-in-root/**
- samples/client/petstore/typescript-angular-v21-provided-in-root/**
- samples/openapi3/client/petstore/typescript/builds/default/**
# comment out due to build failure
#- samples/openapi3/client/petstore/typescript/tests/default/**
- samples/openapi3/client/petstore/typescript/builds/jquery/**
# comment out due to build failure
#- samples/openapi3/client/petstore/typescript/tests/jquery/**
- samples/openapi3/client/petstore/typescript/builds/object_params/**
# comment out due to build failure
#- samples/openapi3/client/petstore/typescript/tests/object_params/**
#- samples/openapi3/client/petstore/typescript/builds/inversify/**
#- samples/openapi3/client/petstore/typescript/tests/inversify/**
#- samples/openapi3/client/petstore/typescript/tests/deno/**
- samples/openapi3/client/petstore/typescript/builds/browser/**
# comment out due to build failure
#- samples/openapi3/client/petstore/typescript/tests/browser/**
#- samples/openapi3/client/petstore/typescript/builds/nullable-enum/**
- samples/client/petstore/typescript-fetch/builds/default/**
- samples/client/petstore/typescript-fetch/builds/es6-target/**
- samples/client/petstore/typescript-fetch/builds/with-npm-version/**
- samples/client/petstore/typescript-fetch/tests/default/**
# comment out due to build failure
#- samples/client/petstore/typescript-node/npm/**
- samples/client/petstore/typescript-rxjs/builds/with-npm-version/**
- samples/client/petstore/typescript-axios/builds/with-npm-version/**
# comment out due to build failure
#- samples/client/petstore/typescript-axios/tests/default/**
pull_request:
paths:
- samples/client/others/typescript-angular/**
- samples/client/others/typescript-angular-v20/**
#- samples/client/petstore/typescript-angular-v12-provided-in-root/**
#- samples/client/petstore/typescript-angular-v13-provided-in-root/**
#- samples/client/petstore/typescript-angular-v14-provided-in-root/**
#- samples/client/petstore/typescript-angular-v15-provided-in-root/**
- samples/client/petstore/typescript-angular-v16-provided-in-root/**
- samples/client/petstore/typescript-angular-v17-provided-in-root/**
- samples/client/petstore/typescript-angular-v18-provided-in-root/**
- samples/client/petstore/typescript-angular-v19-provided-in-root/**
- samples/client/petstore/typescript-angular-v20-provided-in-root/**
- samples/client/petstore/typescript-angular-v21-provided-in-root/**
- samples/openapi3/client/petstore/typescript/builds/default/**
#- samples/openapi3/client/petstore/typescript/tests/default/**
- samples/openapi3/client/petstore/typescript/builds/jquery/**
#- samples/openapi3/client/petstore/typescript/tests/jquery/**
- samples/openapi3/client/petstore/typescript/builds/object_params/**
#- samples/openapi3/client/petstore/typescript/tests/object_params/**
#- samples/openapi3/client/petstore/typescript/builds/inversify/**
#- samples/openapi3/client/petstore/typescript/tests/inversify/**
#- samples/openapi3/client/petstore/typescript/tests/deno/**
- samples/openapi3/client/petstore/typescript/builds/browser/**
#- samples/openapi3/client/petstore/typescript/tests/browser/**
#- samples/openapi3/client/petstore/typescript/builds/nullable-enum/**
- samples/client/petstore/typescript-fetch/builds/default/**
- samples/client/petstore/typescript-fetch/builds/es6-target/**
- samples/client/petstore/typescript-fetch/builds/with-npm-version/**
- samples/client/petstore/typescript-fetch/tests/default/**
#- samples/client/petstore/typescript-node/npm/**
- samples/client/petstore/typescript-rxjs/builds/with-npm-version/**
- samples/client/petstore/typescript-axios/builds/with-npm-version/**
#- samples/client/petstore/typescript-axios/tests/default/**
jobs:
build:
name: Build projects
runs-on: ubuntu-latest
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
strategy:
fail-fast: false
matrix:
node:
#- "18.x"
- "20.x"
sample:
- samples/client/others/typescript-angular/
- samples/client/others/typescript-angular-v20/
#- samples/client/petstore/typescript-angular-v12-provided-in-root/
#- samples/client/petstore/typescript-angular-v13-provided-in-root/
#- samples/client/petstore/typescript-angular-v14-provided-in-root/
#- samples/client/petstore/typescript-angular-v15-provided-in-root/
- samples/client/petstore/typescript-angular-v16-provided-in-root/
- samples/client/petstore/typescript-angular-v17-provided-in-root/
- samples/client/petstore/typescript-angular-v18-provided-in-root/
- samples/client/petstore/typescript-angular-v19-provided-in-root/
- samples/client/petstore/typescript-angular-v20-provided-in-root/
- samples/client/petstore/typescript-angular-v21-provided-in-root/
- samples/openapi3/client/petstore/typescript/builds/default/
#- samples/openapi3/client/petstore/typescript/tests/default/
- samples/openapi3/client/petstore/typescript/builds/jquery/
#- samples/openapi3/client/petstore/typescript/tests/jquery/
- samples/openapi3/client/petstore/typescript/builds/object_params/
#- samples/openapi3/client/petstore/typescript/tests/object_params/
#- samples/openapi3/client/petstore/typescript/builds/inversify/
#- samples/openapi3/client/petstore/typescript/tests/inversify/
#- samples/openapi3/client/petstore/typescript/tests/deno/
- samples/openapi3/client/petstore/typescript/builds/browser/
#- samples/openapi3/client/petstore/typescript/tests/browser/
#- samples/openapi3/client/petstore/typescript/builds/nullable-enum/
- samples/client/petstore/typescript-fetch/builds/default/
- samples/client/petstore/typescript-fetch/builds/es6-target/
- samples/client/petstore/typescript-fetch/builds/with-npm-version/
- samples/client/petstore/typescript-fetch/tests/default/
#- samples/client/petstore/typescript-node/npm/
- samples/client/petstore/typescript-rxjs/builds/with-npm-version/
- samples/client/petstore/typescript-axios/builds/with-npm-version/
#- samples/client/petstore/typescript-axios/tests/default/
steps:
- uses: actions/checkout@v5
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17' # Specify your desired Java version
distribution: 'temurin' # Or 'adopt', 'oracle', etc.
cache: maven # Cache Maven dependencies for faster builds
- name: Use Node.js
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
cache: 'npm' # Or 'yarn'
- name: mvn integration-test
working-directory: ${{ matrix.sample }}
run: mvn integration-test

View File

@@ -16,13 +16,13 @@ jobs:
# clients # clients
- samples/client/others/typescript/encode-decode/test - samples/client/others/typescript/encode-decode/test
node-version: node-version:
- 16
- 18
- 20 - 20
- 22
- 24
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-node@v5 - uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}

View File

@@ -1,35 +0,0 @@
name: TypeScript NestJS Server
on:
pull_request:
paths:
- samples/server/petstore/typescript-nestjs-server/**
- .github/workflows/samples-typescript-nestjs-server.yaml
jobs:
build:
name: Test TypeScript NestJS Server
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/server/petstore/typescript-nestjs-server
node-version:
- 20
- 22
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
- name: Install
working-directory: ${{ matrix.sample }}
run: |
npm i
- name: Test
working-directory: ${{ matrix.sample }}
run: npm run test

View File

@@ -20,9 +20,9 @@ jobs:
- 18 - 18
- 20 - 20
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- uses: actions/setup-node@v5 - uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}

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