-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve error messages #1536
Conversation
|
|
validating /openapi.yaml... | ||
Something went wrong when processing /Users/andrewtatomyr/Tests/redocly-cli-backup/__tests__/lint/assertions-property-key-not-allowed/openapi.yaml: | ||
|
||
- The 'disallowed' assertion can't be used on properties. Please remove the 'property' key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the error is:
- disallowed can't be used on a single property. Please use 'property'..
validating /openapi.yaml... | ||
Something went wrong when processing /Users/andrewtatomyr/Tests/redocly-cli-backup/__tests__/lint/assertions-property-key-required/openapi.yaml: | ||
|
||
- The 'nonEmpty' assertion can't be used on all keys. Please provide a single property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current error is:
- nonEmpty can't be used on all keys. Please provide a single property.
Coverage report
Test suite run success734 tests passing in 102 suites. Report generated by 🧪jest coverage report action from ed380df |
16f1e46
to
ed380df
Compare
What/Why/How?
When an assertion is supposed to run only on object keys and the assertion subject contains the
property
key, the error is- <the assertion name> can't be used on a single property. Please use 'property'..
which should be the other way around (thanks @adamaltman for pointing on that).This PR fixes that, and also cleans up the error messages by removing needless periods and using better formatting.
Reference
Testing
Screenshots (optional)
Check yourself
Security