auth0-deploy-cli
auth0-deploy-cli copied to clipboard
Provide JSON schema for deploy CLI config files
Checklist
- [X] I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
When working with the JSON files exported by the deploy CLI, it's hard to know what fields and values are valid/required/etc.
Describe the ideal solution
It would be great if a JSON schema for these types were provided.
Ideally, the schema would be published to something like JSON Schema Store so that editors can automatically detect them via glob patterns. Alternatively/additionally, the export functionality of the CLI could write in a $schema URL for each file it exports, so that editors can use this information to validate the file.
Alternatives and current workarounds
I was unable to find a JSON schema definition. If only that were available, this would already be a huge step forward as users could wire it up to their editors manually.
Additional context
No response
@stabai This is an excellent suggestion, it would certainly make the process of creating Deploy CLI configuration much clearer. We already loosely define some of the resource handlers, but admittedly probably not enough for being a goo DX. It would be a pretty big undertaking to augment atop the current tool but this is something I'd consider implementing for future version of the tool.
Yeah, I think the trick is also in ensuring that the schema stays correct as the API evolves. Defining the API contract in a way that it can both be used by the service that the Deploy CLI calls and also be automatically translated into a JSON schema would be the approach I'd seek.
For example, using Protocol Buffers might be a good way to allow this, since they can define interoperable schemas in many languages and also be converted to JSON schemas (but I don't claim to know what would work well for this service).