Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ jobs:
docker run --rm -v $PWD:/spec redocly/cli:latest bundle openapi.yaml --ext json
docker run --rm -v $PWD:/spec redocly/cli:latest build-docs openapi.yaml
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
if [[ "$(wc -l redoc-static.html)" == "294 redoc-static.html" ]]; then
if [[ "$(wc -l redoc-static.html)" == "300 redoc-static.html" ]]; then
echo "Docs built correctly."
else
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 294 lines in redoc-static.html)."
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 300 lines in redoc-static.html)."
exit 1
fi
4 changes: 4 additions & 0 deletions __tests__/lint/assertions-severity-override/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
openapi: 3.1.0
info:
title: Test API
version: 1.0.0
8 changes: 8 additions & 0 deletions __tests__/lint/assertions-severity-override/redocly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends:
- ruleset.yaml

apis:
main:
root: ./openapi.yaml
rules:
rule/test-license: warn # should not be highlighted
13 changes: 13 additions & 0 deletions __tests__/lint/assertions-severity-override/ruleset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rules:
rule/test-license: # the default severity (error) of this configurable rule will be overwritten in redocly.yaml
subject:
type: Info
property: license
assertions:
defined: true
rule/test-description:
subject:
type: Info
property: description
assertions:
defined: true
42 changes: 42 additions & 0 deletions __tests__/lint/assertions-severity-override/snapshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`E2E lint assertions-severity-override 1`] = `

validating openapi.yaml...
[1] openapi.yaml:3:3 at #/info/description

rule/test-description failed because the Info description didn't meet the assertions: Should be defined

1 | openapi: 3.1.0
2 | info:
3 | title: Test API
| ^^^^^^^^^^^^^^^
4 | version: 1.0.0
| ^^^^^^^^^^^^^^
5 |

Error was generated by the rule/test-description rule.


[2] openapi.yaml:3:3 at #/info/license

rule/test-license failed because the Info license didn't meet the assertions: Should be defined

1 | openapi: 3.1.0
2 | info:
3 | title: Test API
| ^^^^^^^^^^^^^^^
4 | version: 1.0.0
| ^^^^^^^^^^^^^^
5 |

Warning was generated by the rule/test-license rule.


openapi.yaml: validated in <test>ms

❌ Validation failed with 1 error and 1 warning.
run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file.


`;
2 changes: 2 additions & 0 deletions __tests__/smoke/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ paths:
application/json:
schema:
$ref: ./message-schema.yaml
400:
$ref: https://raw.githubusercontent.com/Redocly/redocly-cli/refs/heads/main/resources/museum.yaml#/components/responses/BadRequest
4 changes: 2 additions & 2 deletions __tests__/smoke/run-smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ $2 redocly-lint
$2 redocly-bundle
$2 redocly-build-docs
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
if [[ "$(wc -l redoc-static.html)" == "294 redoc-static.html" ]]; then
if [[ "$(wc -l redoc-static.html)" == "300 redoc-static.html" ]]; then
echo "Docs built correctly."
else
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 294 lines in redoc-static.html)."
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 300 lines in redoc-static.html)."
exit 1
fi
1 change: 1 addition & 0 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"cli-1.25": "npm:@redocly/[email protected]",
"cli-1.26": "npm:@redocly/[email protected]",
"cli-1.27": "npm:@redocly/[email protected]",
"cli-1.28": "npm:@redocly/[email protected]",
"cli-next": "file:../redocly-cli.tgz"
}
}
Loading