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
Provide JSON Schema for Configuration #22
Comments
I'm working on this now. I'm writing a generator that parses the configuration structs (along with their documentation comments) and converts that into a schema. It's going well and it'll be nice not having to put in effort to ensure that the schema stays up to date. |
I've basically got it working now, and it's pretty nifty. I tested it out and it works awesomely! Thanks for the great feature request 😅 It's on the main branch of the early access version if you want to check it out @Sherlouk (Bundler.schema.json in the root of the repo) As an aside, I'm planning on just getting rid of the whole early access thing soon, but I haven't had time to figure out a few more things I want to get working before I do so. |
I don't think I actually have access any more? At least, I can't see it anywhere. I've been using VSCode a bunch, and when it picks up on a schema and automatically validates my configuration files I absolutely love it. So definitely a big win here once fully available and submitted to the plugin linked above. |
It says you should have access, here's a direct link to the repo: https://github.com/swift-bundler/swift-bundler-early-access |
I've got the schema fulling working now, it should also always be up-to-date with the code too which is handy. The hover description shown for each property is taken from the property's documentation comment in the Swift code, and everything except for Unfortunately the schema for |
Discussed this very briefly on Discord, but I think it would be really handy if we could provide a JSON schema document detailing every value supported in the configuration TOML file.
This would allow it to be used with plugins such as this one for VS Code which would provide code completion and validation of configurations improving the developer experience and hopefully reducing the number of issues developers face.
Taplo have stated they're happy for new schemas to be provided for native support, once the API is stabilised some, but even without pushing it upstream users can still utilise it if we host it on the documentation website 🙂
The text was updated successfully, but these errors were encountered: