Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/api-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Validate API Specs

on:
push:
branches: [main]
paths:
- "internal/apidocs/openapi.yaml"
- "internal/apidocs/asyncapi.yaml"
- ".spectral.yaml"
- ".github/workflows/api-doc.yml"
pull_request:
paths:
- "internal/apidocs/openapi.yaml"
- "internal/apidocs/asyncapi.yaml"
- ".spectral.yaml"
- ".github/workflows/api-doc.yml"

permissions:
contents: read

jobs:
validate-openapi:
name: Lint OpenAPI 3.1.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Spectral lint
run: >
npx --yes @stoplight/spectral-cli@6.15.0
lint internal/apidocs/openapi.yaml
--ruleset .spectral.yaml
--fail-severity error

validate-asyncapi:
name: Validate AsyncAPI 3.0.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: AsyncAPI validate
run: >
npx --yes @asyncapi/cli@3.6.0
validate internal/apidocs/asyncapi.yaml
5 changes: 5 additions & 0 deletions .spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: ["spectral:oas"]
rules:
oas3-schema: error
operation-description: warn
operation-tags: warn
Loading
Loading