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

Add JSON Schema for the CLI config object #87

Closed
lazarljubenovic opened this issue Feb 1, 2021 · 1 comment
Closed

Add JSON Schema for the CLI config object #87

lazarljubenovic opened this issue Feb 1, 2021 · 1 comment
Labels
🎉 Feature request New feature or request 📦 @webdoc/cli Issue related to @webdoc/cli
Milestone

Comments

@lazarljubenovic
Copy link
Contributor

Currently we just hope that the developer provided a valid configuration object, without checking it. We should add a runtime check for this, and throw a nice error. As is, providing the configuration to the CLI is prone to typos and difficult-to-debug missing behaviors, given that there's no autocomplete in IDEs for the webdoc.conf.json file.

Both of these issues can be solved by providing and exposing a JSON schema -- IDEs could use it to autocomplete and show hints to the developer, and we could use it internally to validate the object against it. It's also a universal documentation language which serves as the source of truth for what the configuration should and shouldn't contain.

@ShukantPal ShukantPal added 📦 @webdoc/cli Issue related to @webdoc/cli 🎉 Feature request New feature or request labels Feb 1, 2021
@ShukantPal ShukantPal added this to the v2.0.0 milestone Jun 22, 2022
@ShukantPal
Copy link
Member

Thanks @lazarljubenovic - will go out in 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 Feature request New feature or request 📦 @webdoc/cli Issue related to @webdoc/cli
Projects
None yet
Development

No branches or pull requests

2 participants