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 discoverable JSON Schema for config files (e.g. wp-cli.yml) #5718

Open
1 task done
montchr opened this issue Jan 5, 2023 · 2 comments
Open
1 task done

Add discoverable JSON Schema for config files (e.g. wp-cli.yml) #5718

montchr opened this issue Jan 5, 2023 · 2 comments

Comments

@montchr
Copy link

montchr commented Jan 5, 2023

Feature Request

Is your feature request directly related to a specific, existing command?

No – this applies to configuration files for WP-CLI as described in https://make.wordpress.org/cli/handbook/references/config/

Is your feature request about a new command, or a more general idea?

Not really – it is rather common for JSON-compatible configuration files (e.g. JSON/YAML/TOML) to define and publish a discoverable JSON Schema declaration. Since wp-cli.yml already exists and has a clear definition, publishing structured metadata about its format has a clearly-defined scope with many existing examples to follow.

Describe your use case and the problem you are facing

As a developer creating a new or editing an existing YAML config file for WP-CLI, I would like to use my text editor's integrated support for autocompletion, inline documentation, and validation of my file so that I can remain within my editor without needing to mentally compute the supported configuration structure/keys/values as listed in Config – WP-CLI – WordPress.org.

Describe the solution you'd like

Generate a comprehensive JSON Schema for the WP-CLI configuration file specification. If it exists already (I haven't found it), it should be made more discoverable. I would like to see it included in the JSON Schema Store, which would automatically be ingested by VS Code et al.

Maybe-Relevant Examples

Further References

@montchr montchr changed the title Add or make discoverable JSON Schema for config files (e.g. wp-cli.yml) Add discoverable JSON Schema for config files (e.g. wp-cli.yml) Jan 5, 2023
@danielbachhuber
Copy link
Member

Thanks for the suggestion, @montchr ! This seems like a sensible thing to do.

@montchr
Copy link
Author

montchr commented Jan 7, 2023

Awesome!

I don’t think I have the context to open a pull request for this but I would gladly test out an implementation. Let me know if I can be of any help.

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