bluesky / event-model

data model for event-based data collection and analysis
https://blueskyproject.io/event-model
BSD 3-Clause "New" or "Revised" License
13 stars 30 forks source link

Prevent validation errors in Start Document JSON Schema #258

Closed DiamondJoseph closed 1 year ago

DiamondJoseph commented 1 year ago

Description

Changes validation properties that are enums to define the enums as an array

Motivation and Context

Current state is not valid Json Schema and causes exceptions when attempting to be ingested. Alternative valid solution: "enum": "value" -> "string" : "value" (knowing that the potential value of the string comes from an enumeration) makes validation logic clearer to parse, but fails JsonSchema3 tests

How Has This Been Tested?

Tested in an online JSON Schema linter, equivalent changes in use in AsyncAPI schema for BlueAPI (in progress)

danielballan commented 1 year ago

Thanks @DiamondJoseph, looks good.