openapi-generator-original/.github/workflows/samples-spring-jdk17.yaml
martin-mfg 9f3a73f81a
[spring]addition: api response examples + spring generator generates response examples (#17610, #16051) (#20933)
* addition: api response examples; spring's api.mustache generates response examples

* update samples

* added 2 sample configs; adsjuted to only generate examples for application/json

* added test

* remove accidentally added files

* small cleanup

* add new samples to workflow

---------

Co-authored-by: GlobeDaBoarder <glebivashyn@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-27 00:10:09 +08:00

56 lines
2.1 KiB
YAML

name: Samples Java Spring (JDK17)
on:
push:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
pull_request:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
jobs:
build:
name: Build Java Spring (JDK17)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
# servers
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress