Skip to content
Open
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
155 changes: 155 additions & 0 deletions ContainerContributor.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"swagger": "2.0",
"info": {
"title": "Container Contributor",
"version": "2021-12-17",
"license": {
"name": "OCF Data Model License",
"url": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md",
"x-copyright": "copyright 2021 Open Connectivity Foundation, Inc. All rights reserved."
},
"termsOfService": "https://openconnectivityfoundation.github.io/core/DISCLAIMER.md"
},
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/ContainerContributorResURI": {
"get": {
"description": "This resource provides the last presence entity contributed to the location service.\n",
"parameters": [
{"$ref": "#/parameters/interface"}
],
"responses": {
"200": {
"description": "Success path response for the Resource",
"x-example": {
"rt": ["oic.r.location.container.contributor"],
"contributingEntity": {"entitydid": "aa:bb:cc:dd","entitydescription": "kitchen sensor"},
"containerEntity": {
"entityid":"00:11:22:33",
"entitydescription":"mom",
"isincontainer":true,
"confidence":100,
"label": "Kitchen",
"timestamp":"2015-11-05T14:30:00Z"
}
},
"schema": {"$ref": "#/definitions/ContainerContributor"}
}
}
},
"post": {
"description": "The presence entity submitted to location services\n",
"parameters": [
{"$ref": "#/parameters/interface"},
{
"name": "body",
"in": "body",
"required": true,
"schema": {"$ref": "#/definitions/ContainerContributor"},
"x-example": {
"contributingEntity": {"entitydid": "aa:bb:cc:dd","entitydescription": "kitchen sensor"},
"containerEntity": {
"entityid":"00:11:22:33",
"entitydescription":"00:00:00:00:00:00",
"isincontainer":true,
"containerId": "kitchen",
"confidence":100,
"timestamp":"2015-11-05T14:30:00Z"
}
}
}
],
"responses": {
"200": {
"description": "Success path",
"x-example": {
"contributingEntity": {"entitydid": "aa:bb:cc:dd","entitydescription": "kitchen sensor"},
"containerEntity": {
"entityid":"00:11:22:33",
"entitydescription":"Mom",
"isincontainer":true,
"confidence":100,
"timestamp":"2015-11-05T14:30:00Z"
}
},
"schema": {"$ref": "#/definitions/ContainerContributor"}
}
}
}
}
},
"parameters": {
"interface": {
"in": "query",
"name": "if",
"type": "string",
"enum": [
"oic.if.rw",
"oic.r.baseline"
]
}
},
"definitions": {
"ContainerContributor": {
"type": "object",
"properties": {
"rt": {
"description": "Resource Type",
"items": {
"maxLength": 64,
"type": "string",
"enum": ["oic.r.location.container.contributor"]
},
"minItems": 1,
"readOnly": true,
"type": "array"
},
"if": {
"description": "The OCF Interface set supported by this Resource",
"items": {
"enum": [
"oic.if.baseline",
"oic.if.s"
],
"type": "string",
"maxLength": 64
},
"minItems": 2,
"readOnly": true,
"uniqueItems": true,
"type": "array"
},
"n": {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n"
},
"id": {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/id"
},
"containerentity": {
"$ref": "https://openconnectivityfoundation.github.io/IoTDataModels/ContainerEntityResURI.swagger.json#/definitions/ContainerEntity"
},
"contributingentity": {
"description": "The entity contributing the presence entity",
"type": "object",
"properties": {
"entitydescription": {
"$ref": "https://openconnectivityfoundation.github.io/IoTDataModels/EntityResURI.swagger.json#/definitions/entity-description"
},
"entityid": {
"$ref": "https://openconnectivityfoundation.github.io/IoTDataModels/EntityResURI.swagger.json#/definitions/entity-id"
}
}
}
},
"required": ["containerentity"]
}
}
}
120 changes: 120 additions & 0 deletions ContainerEntityURI.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"swagger": "2.0",
"info": {
"title": "Container Entity",
"version": "2021-12-17",
"license": {
"name": "OCF Data Model License",
"url": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md",
"x-copyright": "copyright 2021 Open Connectivity Foundation, Inc. All rights reserved."
},
"termsOfService": "https://openconnectivityfoundation.github.io/core/DISCLAIMER.md"
},
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/ContainerEntityURI" : {
"get": {
"description": "A Container Entity is an location services entity that contains container information.\nContainer information is a boolean on whether an entity is inside or outside a container.",
"parameters": [
{"$ref": "#/parameters/interface-all"}
],
"responses": {
"200": {
"description" : "",
"x-example": {
"rt": ["oic.r.location.entity.container"],
"entity": {"entityid":"00:11:22:33","entitydescription":"Mom"},
"containerid": "MyContainer",
"confidence": 80,
"incontainer": true,
"timestamp": "2015-11-05T14:30:15Z"
},
"schema": { "$ref": "#/definitions/ContainerEntity" }
}
}
}
}
},
"parameters": {
"interface-all" : {
"in" : "query",
"name" : "if",
"type" : "string",
"enum" : ["oic.if.r","oic.if.baseline"]
}
},
"definitions": {
"ContainerEntity" : {
"properties": {
"rt" : {
"description": "Resource Type",
"items": {
"enum": ["oic.r.entity.container"],
"type": "string",
"maxLength": 64
},
"minItems": 1,
"readOnly": true,
"uniqueItems": true,
"type": "array"
},
"containerid" : {
"description": "The current container",
"readOnly": true,
"type": "string"
},
"confidence" : {
"description": "The confidence level of the reading being correct (0 - 100)",
"minimum": 0,
"readOnly": true,
"type": "number"
},
"entity" : {
"properties": {
"entitydescription": {
"$ref": "https://openconnectivityfoundation.github.io/IoTDataModels/EntityResURI.swagger.json#/definitions/entity-description"
},
"entityid": {
"$ref": "https://openconnectivityfoundation.github.io/IoTDataModels/EntityResURI.swagger.json#/definitions/entity-id"
}
},
"type": "object"
},
"incontainer" : {
"description": "Indicates whether an entity is inside the container",
"readOnly": true,
"type": "boolean"
},
"timestamp" : {
"description": "An RFC3339 formated time indicating when the data was observed (e.g.: 2016-02-15T09:19Z)",
"format": "date-time",
"readOnly": true,
"type": "string"
},
"n": {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n"
},
"id": {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/id"
},
"if" : {
"description": "The interface set supported by this resource",
"items": {
"enum": [
"oic.if.baseline",
"oic.if.r"
],
"type": "string",
"maxLength": 64
},
"minItems": 1,
"readOnly": true,
"type": "array"
}
},
"type" : "object"
}
}
}
Loading