generated from AMWA-TV/is-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e0b426
commit cc2be62
Showing
28 changed files
with
601 additions
and
0 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,101 @@ | ||
#%RAML 1.0 | ||
title: NMOS Configuration API | ||
baseUri: http://api.example.com/x-nmos/configuration/{version} | ||
version: 1.0 | ||
|
||
uses: | ||
assets: assets.lib.raml | ||
|
||
annotationTypes: | ||
monitoringInterval: | ||
type: integer | ||
/: | ||
displayName: Base | ||
get: | ||
description: List of paths available from this API | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/base-get-200.json | ||
type: !include schemas/base.json | ||
/rolePaths: | ||
displayName: Role Paths | ||
get: | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/rolePaths-base-get-200.json | ||
type: !include schemas/rolePaths-base.json | ||
description: List rolePaths | ||
/{rolePath}: | ||
uriParameters: | ||
rolePath: | ||
type: string | ||
get: | ||
description: Get attributes of the object specified by rolePath | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/rolePath-get-200.json | ||
type: !include schemas/rolePath.json | ||
/properties: | ||
displayName: Properties | ||
get: | ||
description: Get properties of the object | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/properties-base-get-200.json | ||
type: !include schemas/properties-base.json | ||
/{propertyId}: | ||
uriParameters: | ||
propertyId: | ||
type: string | ||
get: | ||
description: Get attributes of a property | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/property-get-200.json | ||
type: !include schemas/property.json | ||
/value: | ||
displayName: Value of a property | ||
get: | ||
description: Get value of a property | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/property-value-get-200.json | ||
type: !include schemas/NcMethodResultPropertyValue.json | ||
put: | ||
descriptions: Set value of a property | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/property-value-get-200.json | ||
type: !include schemas/modify-property.json | ||
/descriptor: | ||
displayName: Descriptor of property | ||
get: | ||
description: Get descriptor of a property | ||
responses: | ||
200: | ||
body: | ||
example: !include ../examples/properties-descriptor-get-200.json | ||
type: !include schemas/NcDatatypeDescriptor.json | ||
/methods: | ||
displayName: Methods | ||
get: | ||
description: List Methods | ||
/{methodId}: | ||
uriParameters: | ||
propertyId: | ||
type: string | ||
patch: | ||
/members: | ||
displayName: Members | ||
get: | ||
description: List Methods | ||
/descriptor: | ||
displayName: Members | ||
get: |
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,37 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcDatatypeDescriptor", | ||
"description": "Base datatype descriptor", | ||
"allOf": [ | ||
{ | ||
"$ref": "NcDescriptor.json" | ||
} | ||
], | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"type", | ||
"constraints" | ||
], | ||
"properties": { | ||
"name": { | ||
"$ref": "NcName.json", | ||
"description": "Datatype name" | ||
}, | ||
"type": { | ||
"$ref": "NcDatatypeType.json", | ||
"description": "Type: Primitive, Typedef, Struct, Enum" | ||
}, | ||
"constraints": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "NcParameterConstraints.json" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"description": "Optional constraints on top of the underlying data type" | ||
} | ||
} | ||
} |
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,23 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcDatatypeDescriptorEnum", | ||
"description": "Enum datatype descriptor", | ||
"allOf": [ | ||
{ | ||
"$ref": "NcDatatypeDescriptor.json" | ||
} | ||
], | ||
"type": "object", | ||
"required": [ | ||
"items" | ||
], | ||
"properties": { | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "NcEnumItemDescriptor.json" | ||
}, | ||
"description": "One item descriptor per enum option" | ||
} | ||
} | ||
} |
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,10 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcDatatypeDescriptorPrimitive", | ||
"description": "Primitive datatype descriptor", | ||
"allOf": [ | ||
{ | ||
"$ref": "NcDatatypeDescriptor.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,35 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcDatatypeDescriptorStruct", | ||
"description": "Struct datatype descriptor", | ||
"allOf": [ | ||
{ | ||
"$ref": "NcDatatypeDescriptor.json" | ||
} | ||
], | ||
"type": "object", | ||
"required": [ | ||
"fields", | ||
"parentType" | ||
], | ||
"properties": { | ||
"fields": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "NcFieldDescriptor.json" | ||
}, | ||
"description": "One item descriptor per field of the struct" | ||
}, | ||
"parentType": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "NcName.json" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
], | ||
"description": "Name of the parent type if any or null if it has no parent" | ||
} | ||
} | ||
} |
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,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcDatatypeDescriptorTypeDef", | ||
"description": "Type def datatype descriptor", | ||
"allOf": [ | ||
{ | ||
"$ref": "NcDatatypeDescriptor.json" | ||
} | ||
], | ||
"type": "object", | ||
"required": [ | ||
"parentType", | ||
"isSequence" | ||
], | ||
"properties": { | ||
"parentType": { | ||
"$ref": "NcName.json", | ||
"description": "Original typedef datatype name" | ||
}, | ||
"isSequence": { | ||
"type": "boolean", | ||
"description": "TRUE iff type is a typedef sequence of another type" | ||
} | ||
} | ||
} |
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,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcDatatypeType", | ||
"description": "Datatype type", | ||
"enum": [ | ||
0, | ||
1, | ||
2, | ||
3 | ||
], | ||
"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,18 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcDescriptor", | ||
"description": "Base descriptor", | ||
"type": "object", | ||
"required": [ | ||
"description" | ||
], | ||
"properties": { | ||
"description": { | ||
"type": [ | ||
"string", | ||
"null" | ||
], | ||
"description": "Optional user facing description" | ||
} | ||
} | ||
} |
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-07/schema#", | ||
"title": "NcMethodResult", | ||
"description": "Base result of the invoked method", | ||
"type": "object", | ||
"required": [ | ||
"status" | ||
], | ||
"properties": { | ||
"status": { | ||
"$ref": "NcMethodStatus.json", | ||
"description": "Status for the invoked method" | ||
} | ||
} | ||
} |
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,27 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcMethodResultPropertyValue", | ||
"description": "Result when invoking the getter method associated with a property", | ||
"allOf": [ | ||
{ | ||
"$ref": "NcMethodResult.json" | ||
} | ||
], | ||
"type": "object", | ||
"required": [ | ||
"value" | ||
], | ||
"properties": { | ||
"value": { | ||
"type": [ | ||
"number", | ||
"string", | ||
"boolean", | ||
"object", | ||
"array", | ||
"null" | ||
], | ||
"description": "Getter method value for the associated property" | ||
} | ||
} | ||
} |
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,26 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcMethodStatus", | ||
"description": "Method invokation status", | ||
"enum": [ | ||
200, | ||
298, | ||
299, | ||
400, | ||
401, | ||
404, | ||
405, | ||
406, | ||
409, | ||
413, | ||
414, | ||
417, | ||
423, | ||
500, | ||
501, | ||
502, | ||
503, | ||
504 | ||
], | ||
"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,10 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcName", | ||
"description": "Programmatically significant name, alphanumerics + underscore, no spaces", | ||
"allOf": [ | ||
{ | ||
"$ref": "NcString.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,22 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "NcParameterConstraints", | ||
"description": "Abstract parameter constraints class", | ||
"type": "object", | ||
"required": [ | ||
"defaultValue" | ||
], | ||
"properties": { | ||
"defaultValue": { | ||
"type": [ | ||
"number", | ||
"string", | ||
"boolean", | ||
"object", | ||
"array", | ||
"null" | ||
], | ||
"description": "Default value" | ||
} | ||
} | ||
} |
Oops, something went wrong.