generated from AMWA-TV/is-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from AMWA-TV/schemas-self-contained
Make IS-11 schemas self-contained
- Loading branch information
Showing
13 changed files
with
219 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This directory is for JSON Schemas used in documentation. Some of them were copied from other AMWA NMOS specifications. | ||
|
||
[IS-04 v1.3.2][]: | ||
- [resource_core.json](https://github.com/AMWA-TV/is-04/raw/v1.3.2/APIs/schemas/resource_core.json) | ||
|
||
[BCP-004-01 v1.0.0][]: | ||
- [constraint_set.json](https://github.com/AMWA-TV/bcp-004-01/raw/v1.0.0/APIs/schemas/constraint_set.json) | ||
- [param_constraint.json](https://github.com/AMWA-TV/bcp-004-01/raw/v1.0.0/APIs/schemas/param_constraint.json) | ||
- [param_constraint_boolean.json](https://github.com/AMWA-TV/bcp-004-01/raw/v1.0.0/APIs/schemas/param_constraint_boolean.json) | ||
- [param_constraint_integer.json](https://github.com/AMWA-TV/bcp-004-01/raw/v1.0.0/APIs/schemas/param_constraint_integer.json) | ||
- [param_constraint_number.json](https://github.com/AMWA-TV/bcp-004-01/raw/v1.0.0/APIs/schemas/param_constraint_number.json) | ||
- [param_constraint_rational.json](https://github.com/AMWA-TV/bcp-004-01/raw/v1.0.0/APIs/schemas/param_constraint_rational.json) | ||
- [param_constraint_string.json](https://github.com/AMWA-TV/bcp-004-01/raw/v1.0.0/APIs/schemas/param_constraint_string.json) | ||
|
||
[IS-04 v1.3.2]: https://specs.amwa.tv/is-04/releases/v1.3.2/ | ||
[BCP-004-01 v1.0.0]: https://specs.amwa.tv/bcp-004-01/releases/v1.0.0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Describes a Constraint Set", | ||
"title": "Constraint Set", | ||
"type": "object", | ||
"minProperties": 1, | ||
"properties": { | ||
"urn:x-nmos:cap:meta:label": { | ||
"description": "Freeform string label for the Constraint Set", | ||
"type": "string" | ||
}, | ||
"urn:x-nmos:cap:meta:preference": { | ||
"description": "This value expresses the relative 'weight' that the Receiver assigns to its preference for the streams satisfied by the associated Constraint Set. The weight is an integer in the range -100 through 100, where -100 is least preferred and 100 is most preferred. When the attribute is omitted, the effective value for the associated Constraint Set is 0.", | ||
"type": "integer", | ||
"default": 0, | ||
"maximum": 100, | ||
"minimum": -100 | ||
}, | ||
"urn:x-nmos:cap:meta:enabled": { | ||
"description": "This value indicates whether a Constraint Set is available to use immediately (true) or whether this is an offline capability which can be activated via some unspecified configuration mechanism (false). When the attribute is omitted its value is assumed to be true.", | ||
"type": "boolean", | ||
"default": true | ||
} | ||
}, | ||
"patternProperties": { | ||
"^urn:x-nmos:cap:(?!meta:)": { | ||
"$ref": "param_constraint.json" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Describes a Parameter Constraint", | ||
"title": "Parameter Constraint", | ||
"type": "object", | ||
"anyOf": [ | ||
{ "$ref": "param_constraint_string.json" }, | ||
{ "$ref": "param_constraint_integer.json" }, | ||
{ "$ref": "param_constraint_number.json" }, | ||
{ "$ref": "param_constraint_boolean.json" }, | ||
{ "$ref": "param_constraint_rational.json" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Describes a Boolean Parameter Constraint", | ||
"title": "Boolean Parameter Constraint", | ||
"type": "object", | ||
"properties": { | ||
"enum": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "boolean" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Describes an Integer Parameter Constraint", | ||
"title": "Integer Parameter Constraint", | ||
"type": "object", | ||
"properties": { | ||
"enum": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "integer" | ||
} | ||
}, | ||
"minimum": { | ||
"type": "integer" | ||
}, | ||
"maximum": { | ||
"type": "integer" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Describes a Number Parameter Constraint", | ||
"title": "Number Parameter Constraint", | ||
"type": "object", | ||
"properties": { | ||
"enum": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "number" | ||
} | ||
}, | ||
"minimum": { | ||
"type": "number" | ||
}, | ||
"maximum": { | ||
"type": "number" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Describes a Rational Parameter Constraint", | ||
"title": "Rational Parameter Constraint", | ||
"type": "object", | ||
"properties": { | ||
"enum": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"$ref": "#/definitions/rational" | ||
} | ||
}, | ||
"minimum": { | ||
"$ref": "#/definitions/rational" | ||
}, | ||
"maximum": { | ||
"$ref": "#/definitions/rational" | ||
} | ||
}, | ||
"definitions": { | ||
"rational": { | ||
"type": "object", | ||
"required": [ | ||
"numerator" | ||
], | ||
"properties": { | ||
"numerator": { | ||
"type": "integer" | ||
}, | ||
"denominator": { | ||
"type": "integer", | ||
"default": 1 | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "Describes a String Parameter Constraint", | ||
"title": "String Parameter Constraint", | ||
"type": "object", | ||
"properties": { | ||
"enum": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"description": "Describes the foundations of all NMOS resources", | ||
"title": "Base resource", | ||
"required": [ | ||
"id", | ||
"version", | ||
"label", | ||
"description", | ||
"tags" | ||
], | ||
"properties": { | ||
"id": { | ||
"description": "Globally unique identifier for the resource", | ||
"type": "string", | ||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" | ||
}, | ||
"version": { | ||
"description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed", | ||
"type": "string", | ||
"pattern": "^[0-9]+:[0-9]+$" | ||
}, | ||
"label": { | ||
"description": "Freeform string label for the resource", | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "Detailed description of the resource", | ||
"type": "string" | ||
}, | ||
"tags": { | ||
"description": "Key value set of freeform string tags to aid in filtering resources. Values should be represented as an array of strings. Can be empty.", | ||
"type": "object", | ||
"patternProperties": { | ||
"": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |