Add file_format field to JSON Schema v2#1262
Conversation
12d9eb4 to
69c4695
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1262 +/- ##
=====================================
Coverage 80.8% 80.8%
=====================================
Files 111 111
Lines 9301 9308 +7
=====================================
+ Hits 7516 7523 +7
Misses 1785 1785 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f8eb945 to
8345e13
Compare
src/registry/json_schema.rs
Outdated
| @@ -59,7 +59,7 @@ pub(crate) fn command(args: &RegistryJsonSchemaArgs) -> Result<ExitDirectives, D | |||
| let json_schema = match args.json_schema { | |||
| JsonSchemaType::ResolvedRegistry => schema_for!(ResolvedRegistry), | |||
| JsonSchemaType::SemconvGroup => schema_for!(Versioned), | |||
There was a problem hiding this comment.
Should we do this same trick for V1?
There was a problem hiding this comment.
V1 is perfectly fine without file format - I don't want anyone to start using it, so I'd rather keep it intact
There was a problem hiding this comment.
Right - but look at it returning Versioned here - which means it's both V1 and V2 in the same schema - This is the complaint you have on my PR which blindly updated the schema :)
I think we should probably just changed SemconvGroup to be schema_for!(SemconvGroupV1) or whatever here... then I can merge in your pr before submitting mine.
jsuereth
left a comment
There was a problem hiding this comment.
I wonder if we should be doing the same fix on V1 or if we dont' care for now.
…m/lmolkova/weaver into add-file-format-to-json-schema-v2
JSON Schema v2 does not contain file_format resulting in benign but annoying VS code errors
This PR brings it there without breaking compatibility with
version: "2"and other tricks we do in custom deserialization.