You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve schema for Time object to generate better TS types (#35)
* improve schema for Time object to generate better TS types
* improve tests to report validation errors
* fix small issue with test script
* remove top-level additionalProperties: false from time type to avoid issues with oneOf
* add test for comparing version strings in schema/package files
* bump version in schema.json
"description": "Relative or absolute time. Required for ABSOLUTE, BLOCK_RELATIVE, COMMAND_RELATIVE, and EPOCH_RELATIVE time types but not COMMAND_COMPLETE.",
483
-
"type": "string"
479
+
"oneOf": [
480
+
{
481
+
"additionalProperties": false,
482
+
"properties": {
483
+
"type": {
484
+
"description": "Allowed time types without a tag: COMMAND_COMPLETE",
485
+
"enum": ["COMMAND_COMPLETE"],
486
+
"type": "string"
487
+
}
488
+
},
489
+
"required": ["type"]
484
490
},
485
-
"type": {
486
-
"description": "Allowed time types: ABSOLUTE, BLOCK_RELATIVE, COMMAND_RELATIVE, EPOCH_RELATIVE, or COMMAND_COMPLETE.",
"description": "Relative or absolute time. Required for ABSOLUTE, BLOCK_RELATIVE, COMMAND_RELATIVE, and EPOCH_RELATIVE time types but not COMMAND_COMPLETE.",
0 commit comments