zed
zed copied to clipboard
Add support for composable schemas in `zed validate`
Description
Part of composable schema support. We want to make it so that zed validate can operate on both composable schemas and standard schemas.
This implements it by adding a new behavior and a new flag:
- By default,
validatewill attempt to validate a schema first according to composable schema rules, then standard schema rules, and if both fail it will show the errors from composable schema. - There's a new flag:
schema-syntax. If you add--schema-syntax composable, it will validate according to only composable schema syntax rules, and if you add--schema-syntax standard, it will validate according to only standard schema rules. The default value for this flag is the empty string.
I also added proper tests for the validate command, which I'd neglected up until now.
Changes
TODO
Testing
TODO