forked from ministero-salute/it-fse-support
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: ministero-salute#25. Add OAS validation.
- Loading branch information
1 parent
f59ad4a
commit 7c695d0
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |