@checkdigit/spectral-config 2.1.1-PR.19-8537 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +47 -1
  2. package/ruleset.json +7 -6
package/package.json CHANGED
@@ -1 +1,47 @@
1
- {"name":"@checkdigit/spectral-config","version":"2.1.1-PR.19-8537","description":"Check Digit Spectral Config","main":"ruleset.json","private":false,"prettier":"@checkdigit/prettier-config","engines":{"node":">=20.17"},"files":["ruleset.json"],"repository":{"type":"git","url":"git+https://github.com/checkdigit/spectral-config.git"},"author":"Check Digit, LLC","license":"UNLICENSED","bugs":{"url":"https://github.com/checkdigit/spectral-config/issues"},"homepage":"https://github.com/checkdigit/spectral-config#readme","devDependencies":{"@checkdigit/prettier-config":"^5.3.0"},"peerDependencies":{"@stoplight/spectral-cli":"6.11.0"},"scripts":{"prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","lint":"","lint:fix":"","test":"npm run ci:compile && npm run ci:test && npm run ci:style && npm run ci:lint","ci:compile":"","ci:test":"spectral lint test/openapi.yml --ruleset test/.spectral.json","ci:coverage":"","ci:lint":"npm run lint","ci:style":"npm run prettier"},"eslintConfig":{"extends":["@checkdigit/eslint-config"]}}
1
+ {
2
+ "name": "@checkdigit/spectral-config",
3
+ "version": "2.1.1",
4
+ "description": "Check Digit Spectral Config",
5
+ "main": "ruleset.json",
6
+ "private": false,
7
+ "prettier": "@checkdigit/prettier-config",
8
+ "engines": {
9
+ "node": ">=20.17"
10
+ },
11
+ "files": [
12
+ "ruleset.json"
13
+ ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/checkdigit/spectral-config.git"
17
+ },
18
+ "author": "Check Digit, LLC",
19
+ "license": "UNLICENSED",
20
+ "bugs": {
21
+ "url": "https://github.com/checkdigit/spectral-config/issues"
22
+ },
23
+ "homepage": "https://github.com/checkdigit/spectral-config#readme",
24
+ "devDependencies": {
25
+ "@checkdigit/prettier-config": "^5.3.0"
26
+ },
27
+ "peerDependencies": {
28
+ "@stoplight/spectral-cli": "6.11.0"
29
+ },
30
+ "scripts": {
31
+ "prettier": "prettier --ignore-path .gitignore --list-different .",
32
+ "prettier:fix": "prettier --ignore-path .gitignore --write .",
33
+ "lint": "",
34
+ "lint:fix": "",
35
+ "test": "npm run ci:compile && npm run ci:test && npm run ci:style && npm run ci:lint",
36
+ "ci:compile": "",
37
+ "ci:test": "spectral lint test/openapi.yml --ruleset test/.spectral.json",
38
+ "ci:coverage": "",
39
+ "ci:lint": "npm run lint",
40
+ "ci:style": "npm run prettier"
41
+ },
42
+ "eslintConfig": {
43
+ "extends": [
44
+ "@checkdigit/eslint-config"
45
+ ]
46
+ }
47
+ }
package/ruleset.json CHANGED
@@ -37,14 +37,15 @@
37
37
  "oas2-schema": "error",
38
38
  "oas2-unused-definition": "error",
39
39
  "oas2-valid-media-example": "error",
40
- "schema-description": {
41
- "description": "All schemas must have a description.",
42
- "message": "Schema is missing description.",
40
+
41
+ "header-required-property": {
42
+ "description": "All headers must explicitly define whether they are required.",
43
+ "message": "Header is missing 'required' property.",
43
44
  "severity": "error",
44
- "given": "$.components.schemas.*",
45
+ "given": "$.components.headers.*",
45
46
  "then": {
46
- "field": "description",
47
- "function": "truthy"
47
+ "field": "required",
48
+ "function": "defined"
48
49
  }
49
50
  }
50
51
  }