diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ac3b85..1b53dd2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,10 +5,18 @@ ci: repos: - repo: local hooks: - - id: spectral-lint - name: spectral linter + - id: spectral-lint-references + name: "spectral linter: references" language: node - entry: npx spectral lint ./reference/**/*.yaml + entry: npx spectral lint ./reference/**/*.yaml --ruleset .spectral.yaml + files: ^reference/|models/ + additional_dependencies: ["@stoplight/spectral-cli@6.6.0"] + types: [yaml] + + - id: spectral-lint-models + name: "spectral linter: models" + language: node + entry: npx spectral lint ./reference/**/*.yaml --ruleset .spectral.models.yaml --fail-severity warn files: ^reference/|models/ additional_dependencies: ["@stoplight/spectral-cli@6.6.0"] types: [yaml] diff --git a/.spectral.models.yaml b/.spectral.models.yaml new file mode 100644 index 0000000..4fa0879 --- /dev/null +++ b/.spectral.models.yaml @@ -0,0 +1,10 @@ +extends: + - "spectral:oas" + +formats: + - json-schema-loose + +rules: + oas3-api-servers: off + openapi-tags: off + operation-tags: off