zed icon indicating copy to clipboard operation
zed copied to clipboard

Add support for composable schemas in `zed validate`

Open tstirrat15 opened this issue 9 months ago • 0 comments

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, validate will 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

tstirrat15 avatar Mar 11 '25 20:03 tstirrat15