Skip to content
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

Open
bebraw opened this issue May 12, 2016 · 6 comments
Open

Document each property #89

bebraw opened this issue May 12, 2016 · 6 comments

Comments

@bebraw
Copy link
Contributor

bebraw commented May 12, 2016

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.).

@bebraw
Copy link
Contributor Author

bebraw commented May 12, 2016

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.

@jonathanglasmeyer
Copy link
Collaborator

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 Joi.describe(), seems a bit half-baked to me and under-powered for this idea.

@bebraw
Copy link
Contributor Author

bebraw commented May 22, 2016

@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.

@jonathanglasmeyer
Copy link
Collaborator

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).

@bebraw
Copy link
Contributor Author

bebraw commented May 22, 2016

Correct. Custom checks like that would have to be built on top of it.

@jonathanglasmeyer
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants