Skip to content

Commit

Permalink
update json-schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Jan 15, 2025
1 parent 56f5277 commit 591f45f
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 29 deletions.
9 changes: 0 additions & 9 deletions definition/definition/RendererAPI.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/extensible.json",
"allOf": [
{
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/common-graphics-schema.json"
},
{
"type": "object",
"properties": {
"actions": {
"patternProperties": {
".": {
"type": "object",
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action.json"
}
}
},
"rendering": {
"type": "object",
"properties": {
"isStandardGraphic": {
"type": "boolean",
"const": false
}
},
"additionalProperties": true,
"required": [
"isStandardGraphic"
]
}
},
"additionalProperties": true
}
]
}
12 changes: 12 additions & 0 deletions definition/definition/json-schema/v1/graphics-manifest/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/schema.json",
"oneOf": [
{
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/standard.json"
},
{
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/extensible.json"
}
]
}
135 changes: 135 additions & 0 deletions definition/definition/json-schema/v1/graphics-manifest/standard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/schema.json",
"allOf": [
{
"type": "object",
"properties": {
"actions": {
"type": "object",
"description": "Custom Actions that can be invoked on the Graphic.",
"properties": {
"update": {
"description": "The 'update' action is called after the Graphic is loaded, and when new data is pushed to the Graphic.",
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action.json"
},
"play": {
"description": "When the 'play' action is called, the Graphic will animate in.",
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action-without-payload.json"
},
"stop": {
"description": "When the 'stop' action is called, the Graphic will animate out.",
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action-without-payload.json"
},
"step": {
"allOf": [
{
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action.json"
},
{
"type": "object",
"description": "When 'play' action is called, the Graphic will animate in",
"properties": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "object"
},
"properties": {
"type": "object",
"properties": {
"delta": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "number"
}
}
},
"goto": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "number"
}
}
},
"skipAnimation": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "boolean"
}
}
}
},
"required": [
"delta",
"goto",
"skipAnimation"
],
"patternProperties": {
"^_.*": {}
},
"additionalProperties": false
}
},
"required": [
"type",
"properties"
],
"additionalProperties": true
}
},
"required": [
"schema"
]
}
]
}
},
"patternProperties": {
".": {
"type": "object",
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action.json"
}
},
"required": [
"update",
"play",
"stop",
"step"
],
"additionalProperties": true
},
"rendering": {
"type": "object",
"description": "Properties of the Graphic related to the Renderer",
"properties": {
"isStandardGraphic": {
"type": "boolean",
"const": true
},
"stepCount": {
"type": "number"
}
},
"required": [
"isStandardGraphic",
"stepCount"
],
"additionalProperties": true
}
},
"additionalProperties": true
},
{
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/common-graphics-schema.json"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action-without-payload.json",
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "The name of the action. This is displayed to the user."
},
"description": {
"type": "string",
"description": "A longer description of the action. This is displayed to the user."
},
"schema": {
"description": "This action has no schema, simply set it to null.",
"type": "null"
}
},
"required": [
"label",
"schema"
],
"patternProperties": {
"^_.*": {}
},
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/lib/action.json",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action.json",
"type": "object",
"properties": {
"label": {
Expand All @@ -24,10 +24,12 @@
]
}
},
"required": ["label", "schema"],
"patternProperties":{
"required": [
"label",
"schema"
],
"patternProperties": {
"^_.*": {}
},
"additionalProperties": false

}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/graphics-manifest/schema.json",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/common-graphics-schema.json",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"const": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/graphics-manifest/schema.json",
"description": "Reference to the JSON-schema"
"const": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/schema.json",
"description": "Reference to the JSON-schema for this manifest"
},
"id": {
"type": "string",
Expand Down Expand Up @@ -52,12 +52,7 @@
"actions": {
"type": "object",
"description": "Custom Actions that can be invoked on the Graphic.",
"patternProperties": {
".": {
"type": "object",
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/lib/action.json"
}
}
"additionalProperties": true
},
"rendering": {
"type": "object",
Expand All @@ -70,6 +65,10 @@
"supportsNonRealTime": {
"type": "boolean",
"description": "Indicates if the Graphic supports non-real-time rendering. Note: If true, the Graphic must implement the 'goToTime()' and the 'setInvokeActionsSchedule()' methods."
},
"isStandardGraphic": {
"type": "boolean",
"description": "Indicates if the Graphic is a Standard Graphic, or an Extensible Graphic. A Standard Graphic must use certain Actions, see the Documentation."
}
},
"patternProperties": {
Expand All @@ -79,6 +78,7 @@
}
},
"required": [
"$schema",
"id",
"version",
"name",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/graphics-manifest/schema.json",
"$id": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/extensible/schema.json",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"const": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/graphics-manifest/schema.json",
"const": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/graphics-manifest/extensible/schema.json",
"description": "Reference to the JSON-schema"
},
"id": {
Expand All @@ -22,7 +22,7 @@
"patternProperties": {
".": {
"type": "object",
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/lib/action.json"
"$ref": "https://superflytv.github.io/tmp-GraphicsDefinition/definition/definition/json-schema/v1/lib/action.json"
}
}
},
Expand All @@ -42,15 +42,21 @@
"description": "A longer description of the RenderTarget. This is displayed to the User."
}
},
"required": ["name"]
"required": [
"name"
]
}
}
}
},
"required": ["id", "name", "actions", "renderTargets"],
"patternProperties":{
"required": [
"id",
"name",
"actions",
"renderTargets"
],
"patternProperties": {
"^_.*": {}
},
"additionalProperties": false

}

0 comments on commit 591f45f

Please sign in to comment.