-
Notifications
You must be signed in to change notification settings - Fork 162
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
Introduce the description
field in the rules
#1283
Comments
This is a nice idea! I think it would be great to have descriptions of rules, and to be able to get a ruleset in summary-for-humans format. I especially like the idea of using markdown in the description so that we can link to further resources where it makes sense to do that. I don't anticipate us replacing our existing (very good) docs for the built-in rules, but most rules won't publish separate pages with such clear explanation of configuration and examples and so on - and I'm not sure it makes sense to have all that information as a description. |
this is tangentially related to #1052 |
Looping back on how this should look. I think we should use an OpenAPI -style description for our rules. So 1-2 sentences of markdown is the expected format, but not a book/article level of information. The goal is to describe what a rule does and why - for our built-in rules we could expand on the one-liners in the built-in rules docs. For configurable rules, we could give meaningful descriptions in all our examples to show how the rules should be used. (I'm happy to help add the content to go alongside the functionality here) How these should be presented:
|
Is your feature request related to a problem? Please describe.
It's good to keep the docs together with the code. However, currently, built-in rules are authored separately from the corresponding documentation.
Another common problem is that a rule can be unclear (requires a more detailed explanation).
Describe the solution you'd like
It might be helpful to introduce a
description
field (similar to what we have in OAS) that would explain the intention of the rule or provide some examples of using it. The descriptions themselves should utilize the markdown/markdoc format.Also, we need to implement a way of creating docs from the descriptions.
This will help to keep the docs and the code in sync as we can generate the actual documentation out of the descriptions.
We can also show an extended hint of a rule in an editor extension.
Consider this example of a Redocly config:
For build-in rules, it should be predefined but with a possibility to override the existing one, e.g.:
I'm not clear, however, if it'd be better to reference the existing .md files from the code or actually move the descriptions into the code.
@adamaltman please add anything I missed here.
Describe alternatives you've considered
We may continue writing the rules and the docs separately.
The text was updated successfully, but these errors were encountered: