-
Notifications
You must be signed in to change notification settings - Fork 29
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
Document each property #89
Comments
Looks like we need to wait Joi on this one. They have a rough specification for .describe(). Just missing implementation. One way to cheat would be to port from Joi to JSON Schema. A big step, though. On the plus side then you get to use JSON Schema compatible tooling. |
I think this overlaps with the goal of webpack-explain. I think a "living" documentation that interpolates the values you supplied in a given config can be very helpful, i just haven't settled on the most elegant way to implement this. I don't really understand |
@jonathanewerner Did you have a look at JSON Schema? I know it could be a little painful to go from Joi to that, but just maybe it would be fitting for all these tools. Standard etc. |
I did have a cursory look, but my first impression is that it'll only allow data-type related validations, which wouldn't allow dynamic validations like the ones introduced via joi 9 custom rules (i.e. implements checks for file path existence on disk, and arbitrary dynamic, run-time checks). |
Correct. Custom checks like that would have to be built on top of it. |
I'm not convinced then. Having one interface and one style of validation output is important for code clarity/complexity & one kind of output is 👍🏻 for UX. |
This is a huge task by itself. If Joi allows us to document properties, we should definitely do that. That would allow introspection and lead to new tools/services based on the schema (think editor plugins etc.).
The text was updated successfully, but these errors were encountered: