Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft IS-13-like mechanism to update distinguishing info of Inputs and Outputs #130

Draft
wants to merge 2 commits into
base: v1.0.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions APIs/StreamCompatibilityManagementAPI.raml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,36 @@ mediaType: application/json
description: Returned when the requested Input ID does not exist.
body:
type: !include schemas/error.json
options:
description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
responses:
200:
403:
404:
patch:
description: Update core information about a single Input
body:
type: !include schemas/resource_core_patch.json
examples:
label-description: !include ../examples/properties-patch.json
tags: !include ../examples/properties-patch-tags.json
responses:
200:
body:
example: !include ../examples/input-properties-get-200.json
type: !include schemas/input.json
400:
description: Returned when the request did not meet the schema
body:
type: !include schemas/error.json
404:
description: Returned when the requested Input ID does not exist
body:
type: !include schemas/error.json
500:
description: Returned when the request did not meet the API's additional constraints
body:
type: !include schemas/error.json
/edid:
get:
description: List all the API endpoints for EDIDs associated with the Input.
Expand Down Expand Up @@ -399,6 +429,36 @@ mediaType: application/json
description: Returned when the requested Output ID does not exist.
body:
type: !include schemas/error.json
options:
description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
responses:
200:
403:
404:
patch:
description: Update core information about a single Output
body:
type: !include schemas/resource_core_patch.json
examples:
label-description: !include ../examples/properties-patch.json
tags: !include ../examples/properties-patch-tags.json
responses:
200:
body:
example: !include ../examples/output-properties-get-200.json
type: !include schemas/input.json
400:
description: Returned when the request did not meet the schema
body:
type: !include schemas/error.json
404:
description: Returned when the requested Output ID does not exist
body:
type: !include schemas/error.json
500:
description: Returned when the request did not meet the API's additional constraints
body:
type: !include schemas/error.json
/edid:
get:
description: >
Expand Down
29 changes: 29 additions & 0 deletions APIs/schemas/resource_core_patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the foundations of all NMOS resources",
"title": "Base resource",
"additionalProperties": false,
"properties": {
"label": {
"description": "Freeform string label for the resource. Set to null to restore default label.",
"type": ["null", "string"]
},
"description": {
"description": "Detailed description of the resource. Set to null to restore default description.",
"type": ["null", "string"]
},
"tags": {
"description": "Key value set of freeform string tags to aid in filtering resources. Set to null to restore default tags. Values should be represented as an array of strings. Can be empty. Set to null to delete or restore default values for a tag.",
"type": ["null", "object"],
"patternProperties": {
"": {
"type": ["null", "array"],
"items": {
"type": "string"
}
}
}
}
}
}
6 changes: 6 additions & 0 deletions examples/properties-patch-tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tags": {
"location": null,
"studio": ["HQ2"]
}
}
4 changes: 4 additions & 0 deletions examples/properties-patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "that one",
"description": "that one over there"
}