-
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.
Merge pull request #13 from openconnectivityfoundation/Bugzilla-2666
BZ 2666 - VODList Resource Type
- Loading branch information
Showing
1 changed file
with
125 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,125 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "VOD List", | ||
"version": "2019-05-16", | ||
"license": { | ||
"name": "OCF Data Model License", | ||
"url": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md", | ||
"x-copyright": "Copyright 2019 Open Connectivity Foundation, Inc. All rights reserved." | ||
}, | ||
"termsOfService": "https://openconnectivityfoundation.github.io/core/DISCLAIMER.md" | ||
}, | ||
"schemes": ["http"], | ||
"consumes": ["application/json"], | ||
"produces": ["application/json"], | ||
"paths": { | ||
"/VODListResURI" : { | ||
"get": { | ||
"description": "This Resource describes the VODs that have been onboarded on the Bridge Platform.\n", | ||
"parameters": [ | ||
{"$ref": "#/parameters/interface"} | ||
], | ||
"responses": { | ||
"200": { | ||
"description" : "Example response payload", | ||
"x-example": | ||
{ | ||
"rt": ["oic.r.vodlist"], | ||
"vods": [ | ||
{ | ||
"n": "Smoke sensor", | ||
"di": "54919CA5-4101-4AE4-595B-353C51AA1234", | ||
"econame": "Z-Wave" | ||
}, | ||
{ | ||
"n": "Thermostat", | ||
"di": "54919CA5-4101-4AE4-595B-353C51AA5678", | ||
"econame": "Zigbee" | ||
} | ||
] | ||
}, | ||
"schema": { "$ref": "#/definitions/vodlist" } | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"interface" : { | ||
"in" : "query", | ||
"name" : "if", | ||
"type" : "string", | ||
"enum" : ["oic.if.r", "oic.if.baseline"] | ||
} | ||
}, | ||
"definitions": { | ||
"vodentry" : { | ||
"description": "Information for a VOD created by the Bridge", | ||
"type": "object", | ||
"properties": { | ||
"n": { | ||
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n" | ||
}, | ||
"di" : { | ||
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.types-schema.json#/definitions/uuid" | ||
}, | ||
"econame": { | ||
"description": "Ecosystem Name of the Bridged Device which is exposed by this VOD", | ||
"type": "string", | ||
"enum": [ "BLE", "oneM2M", "UPlus", "Zigbee", "Z-Wave" ], | ||
"readOnly": true | ||
} | ||
}, | ||
"required": ["n", "di", "econame"] | ||
}, | ||
"vodlist": { | ||
"type": "object", | ||
"properties": { | ||
"n": { | ||
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n" | ||
}, | ||
"rt" : { | ||
"description": "Resource Type", | ||
"items": { | ||
"maxLength": 64, | ||
"type": "string", | ||
"enum": ["oic.r.vodlist"] | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"readOnly": true, | ||
"type": "array" | ||
}, | ||
"id": { | ||
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/id" | ||
}, | ||
"if" : { | ||
"description": "The OCF Interface set supported by this Resource", | ||
"items": { | ||
"enum": [ | ||
"oic.if.baseline", | ||
"oic.if.r" | ||
], | ||
"type": "string" | ||
}, | ||
"minItems": 2, | ||
"uniqueItems": true, | ||
"readOnly": true, | ||
"type": "array" | ||
}, | ||
"vods": { | ||
"description": "Array of information per VOD created by the Bridge", | ||
"type": "array", | ||
"minItems": 0, | ||
"uniqueItems": true, | ||
"readOnly": true, | ||
"items": { | ||
"$ref": "#/definitions/vodentry" | ||
} | ||
} | ||
}, | ||
"required": ["vods"] | ||
} | ||
} | ||
} |