File tree Expand file tree Collapse file tree 6 files changed +71
-2
lines changed
lint/assertions-severity-override Expand file tree Collapse file tree 6 files changed +71
-2
lines changed Original file line number Diff line number Diff line change 1+ openapi : 3.1.0
2+ info :
3+ title : Food Empire API
4+ version : 0.5.1
Original file line number Diff line number Diff line change 1+ extends :
2+ - ruleset.yaml
3+
4+ apis :
5+ main :
6+ root : ./openapi.yaml
7+ rules :
8+ rule/test-license : warn # should not be highlighted
Original file line number Diff line number Diff line change 1+ rules :
2+ rule/test-license : # the default severity (error) of this configurable rule will be overwritten in redocly.yaml
3+ subject :
4+ type : Info
5+ property : license
6+ assertions :
7+ defined : true
8+ rule/test-description :
9+ subject :
10+ type : Info
11+ property : description
12+ assertions :
13+ defined : true
Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+ exports [ `E2E lint assertions-severity-override 1` ] = `
4+
5+ validating openapi.yaml...
6+ [1] openapi.yaml:3:3 at #/info/description
7+
8+ rule/test-description failed because the Info description didn't meet the assertions: Should be defined
9+
10+ 1 | openapi: 3.1.0
11+ 2 | info:
12+ 3 | title: Food Empire API
13+ | ^^^^^^^^^^^^^^^^^^^^^^
14+ 4 | version: 0.5.1
15+ | ^^^^^^^^^^^^^^
16+ 5 |
17+
18+ Error was generated by the rule/test-description rule.
19+
20+
21+ [2] openapi.yaml:3:3 at #/info/license
22+
23+ rule/test-license failed because the Info license didn't meet the assertions: Should be defined
24+
25+ 1 | openapi: 3.1.0
26+ 2 | info:
27+ 3 | title: Food Empire API
28+ | ^^^^^^^^^^^^^^^^^^^^^^
29+ 4 | version: 0.5.1
30+ | ^^^^^^^^^^^^^^
31+ 5 |
32+
33+ Warning was generated by the rule/test-license rule.
34+
35+
36+ openapi.yaml: validated in <test>ms
37+
38+ ❌ Validation failed with 1 error and 1 warning.
39+ run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file.
40+
41+
42+ ` ;
Original file line number Diff line number Diff line change 1717 application/json :
1818 schema :
1919 $ref : ./message-schema.yaml
20+ 400 :
21+ $ref : https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/resources/museum.yaml#/components/responses/BadRequest
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ $2 redocly-lint
1717$2 redocly-bundle
1818$2 redocly-build-docs
1919# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
20- if [[ " $( wc -l redoc-static.html) " == " 294 redoc-static.html" ]]; then
20+ if [[ " $( wc -l redoc-static.html) " == " 300 redoc-static.html" ]]; then
2121 echo " Docs built correctly."
2222else
23- echo " Docs built incorrectly. Received lines: $( wc -l redoc-static.html) (expected 294 lines in redoc-static.html)."
23+ echo " Docs built incorrectly. Received lines: $( wc -l redoc-static.html) (expected 300 lines in redoc-static.html)."
2424 exit 1
2525fi
You can’t perform that action at this time.
0 commit comments