Skip to content

Commit

Permalink
feat(sage-monorepo): externalize the config and ruleset used by the O…
Browse files Browse the repository at this point in the history
…penAPI validator for OpenChallenges (#2818)
  • Loading branch information
tschaffter authored Sep 17, 2024
1 parent 1287259 commit a93fedd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
5 changes: 0 additions & 5 deletions libs/openchallenges/api-description/openapi-lint-config.yaml

This file was deleted.

8 changes: 6 additions & 2 deletions libs/openchallenges/api-description/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "lint-openapi --config openapi-lint-config.yaml --ruleset spectral.yaml build/openapi.yaml build/challenge.openapi.yaml build/organization.openapi.yaml build/image.openapi.yaml",
"cwd": "{projectRoot}"
"commands": [
"lint-openapi --config tools/ibm-openapi-validator/config.yaml {projectRoot}/build/openapi.yaml",
"lint-openapi --config tools/ibm-openapi-validator/config.yaml {projectRoot}/build/challenge.openapi.yaml",
"lint-openapi --config tools/ibm-openapi-validator/config.yaml {projectRoot}/build/organization.openapi.yaml",
"lint-openapi --config tools/ibm-openapi-validator/config.yaml {projectRoot}/build/image.openapi.yaml"
]
},
"dependsOn": ["build"]
},
Expand Down
7 changes: 7 additions & 0 deletions tools/ibm-openapi-validator/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
errorsOnly: true
summaryOnly: false
limits:
warnings: 25
# This path to the spectral config file assumes that the validator's current working directory is
# set to the workspace root folder.
ruleset: tools/ibm-openapi-validator/spectral.yaml
File renamed without changes.

0 comments on commit a93fedd

Please sign in to comment.