-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Better readable and consistent path style #815
Comments
@radicarl I investigated a couple of possibilities, and I believe it'd ideal to let user decide. The inconsistency in path is an issue regardless though, and something I'm addressing right now. |
One more issue I stumbled upon when working on #839. |
|
An option would be great. Thanks.
Sorry, but this I don't understand.
The complete path in the message gives me a lot of context infomation and helps me to evaluate the output of the linter, without looking in the linted document first. |
Actually, this is a short intro to
I understand, there might be different use cases. One may want to see the whole path in the message, the others just the missing part. @philsturgeon @marbemac
|
I would prefer an option. For consistency the {{path}}-placeholder in own rules should be affected from the option or your choice too. |
I believe an option might be the only choice, as built-in rules will shortly start using |
I agree that a we could make our messages clearer by not using path as much as we do. Apart from the $ref error thing (which is another issue sadly) I think we should be using the message for explaining to a human what is going on, and i think that path is not always doing that. We should have the path available for people to programmatically use in the JS API, and maybe we can display it in a tooltip or something, but we are already giving them a line number and taking them to the place with the error on click, so maybe displaying the target is more relevant. |
User story.
I would like to have better readable JSON/YAML-path in the output of the linter.
The wildcard {{path}} uses / for element separation and ~1 for / in element names. This is not very readable. I think . as a separator is in YAML and JSON more commen than the / and in this case the slashes in element names could be slashes.
I also noticed at least one different representation:
Describe the solution you'd like
Path representation in JSON-Path-like-Notation. The leading $. could help to identify the path in the output message.
The text was updated successfully, but these errors were encountered: