JSON Schema :: Inconsistency :: Top level fields for TransformationEvent are closed, but others are open.
sgpinkus opened this issue · comments
The JSON Schema closes the top level fields that can occur to this (after deref):
"propertyNames": {
"anyOf": [
{
"type": "string",
"enum": [
"@context",
"eventTime",
"recordTime",
"eventTimeZoneOffset",
"eventID",
"errorDeclaration"
]
},
{
"type": "string",
"format": "uri"
},
{
"type": "string",
"enum": [
"eventType",
"inputEPCList",
"inputQuantityList",
"outputEPCList",
"outputQuantityList",
"transformationID",
"bizStep",
"disposition",
"persistentDisposition",
"readPoint",
"bizLocation",
"bizTransactionList",
"sourceList",
"destinationList",
"sensorElementList",
"ilmd"
]
}
]
}
But none of the other type schemas do this. Why is TransformationEvent the special case? Shouldn't this be done for all types or none of them (I would strongly prefer all types were closed in this way)?
Hi @sgpinkus - thanks for this feedback. I'm asking @jmcanterafonseca-iota to take a look, since he developed the modular approach to the JSON Schema. I'm not sure why TransformationEvent
should be handled differently from other standard event types such as ObjectEvent
. From what I've observed so far, it appears to be connected with the use of propertyNames
within the schema for TransformationEvent
to specify an enumeration, whereas this approach has not been taken for other event types. I'll log this in a public review comment to make sure that we investigate it and ensure consistency, one way or the other.
see PR #369
this can be closed