Skip to content

Commit

Permalink
Fix: ministero-salute#25. Add OAS validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioggstream authored Oct 19, 2022
1 parent f59ad4a commit 7c695d0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# This action checks that the OAS files inside the repository are valid according
# to the Italian API guidelines.
#
# TODO: check if spectral-action supports remote rulesets.
# TODO: consider pinning the ruleset version.
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
checks: write

jobs:
spectral:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: curl https://italia.github.io/api-oas-checker/spectral-full.yml > .spectral.yml

# Get additional module required by spectral-full
- run: mkdir functions
- run: curl https://raw.githubusercontent.com/italia/api-oas-checker/f6f4e6e360b2ce9816dcca29396571dda1c6027d/security/functions/checkSecurity.js > functions/checkSecurity.js

- uses: stoplightio/spectral-action@v0.8.8

0 comments on commit 7c695d0

Please sign in to comment.