Skip to content

PI-2509: Add ADR with rules for naming API endpoints (#475) #22

PI-2509: Add ADR with rules for naming API endpoints (#475)

PI-2509: Add ADR with rules for naming API endpoints (#475) #22

name: Generate OpenAPI spec
on:
workflow_dispatch:
push:
branches:
- main
jobs:
generate-openapi-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@v4
- name: Serve dependencies
run: make serve-dependencies
- name: Start service
run: |
./gradlew bootRun &
timeout 300 sh -c 'until curl -s localhost:8080/v3/api-docs; do sleep 5; done'
env:
SPRING_PROFILES_ACTIVE: local
- name: Fetch API docs
run: mkdir -p openapi && curl -f localhost:8080/v3/api-docs -o openapi/api-docs.json
- name: Publish API docs
uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2 # v4.6.3
with:
folder: openapi
target-folder: openapi