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

Combine properties into a single things property #158

Closed
wants to merge 1 commit into from
Closed
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
136 changes: 72 additions & 64 deletions directory.td.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,53 +199,45 @@
}
},
"properties": {
"retrieveTD": {
"description": "Retrieve a Thing Description",
"things": {
"@type": "ThingListProperty",
"description": "Collection of Thing Descriptions in the directory",
"uriVariables": {
"id": {
"@type": "ThingID",
"title": "Thing Description ID",
"type": "string",
"format": "iri-reference"
}
},
"forms": [
{
"href": "/td/{id}",
"htv:methodName": "GET",
"response": {
"description": "Success response",
"htv:statusCodeValue": 200,
"contentType": "application/td+json"
},
"additionalResponses": [
{
"description": "TD with the given id not found",
"contentType": "application/problem+json",
"htv:statusCodeValue": 404
}
],
"scopes": "read"
}
]
},
"retrieveTDs": {
"description": "Retrieve all Thing Descriptions",
"uriVariables": {
},
"jsonpath": {
"@type": "JSONPathExpression",
"title": "A valid JSONPath expression",
"type": "string"
},
"xpath": {
"@type": "XPathExpression",
"title": "A valid XPath expression",
"type": "string"
},
"offset": {
"@type": "PageOffset",
"title": "Number of TDs to skip before the page",
"type": "number",
"default": 0
},
"limit": {
"@type": "PageLimit",
"title": "Number of TDs in a page",
"type": "number"
},
"sort_by": {
"@type": "SortAttribute",
"title": "Comparator TD attribute for collection sorting",
"type": "string",
"default": "id"
},
"sort_order": {
"@type": "SortOrder",
"title": "Sorting order",
"type": "string",
"enum": ["asc", "desc"],
Expand All @@ -254,17 +246,17 @@
},
"forms": [
{
"href": "/td",
"href": "/things",
"htv:methodName": "GET",
"response": {
"description": "Success response",
"htv:statusCodeValue": 200,
"contentType": "application/ld+json"
"contentType": "application/td+json"
},
"scopes": "readAll"
},
{
"href": "/td{?offset,limit,sort_by,sort_order}",
"href": "/things{?offset,limit,sort_by,sort_order}",
"htv:methodName": "GET",
"response": {
"description": "Success response",
Expand All @@ -284,20 +276,26 @@
}
],
"scopes": "readAll"
}
]
},
"searchJSONPath": {
"description": "JSONPath syntactic search",
"uriVariables": {
"query": {
"title": "A valid JSONPath expression",
"type": "string"
}
},
"forms": [
},
{
"href": "/things/{id}",
"htv:methodName": "GET",
"response": {
"description": "Success response",
"htv:statusCodeValue": 200,
"contentType": "application/td+json"
},
"additionalResponses": [
{
"description": "TD with the given id not found",
"contentType": "application/problem+json",
"htv:statusCodeValue": 404
}
],
"scopes": "read"
},
{
"href": "/search/jsonpath?query={query}",
"href": "/things?jsonpath={jsonpath}",
"htv:methodName": "GET",
"response": {
"description": "Success response",
Expand All @@ -312,20 +310,9 @@
}
],
"scopes": "search"
}
]
},
"searchXPath": {
"description": "XPath syntactic search",
"uriVariables": {
"query": {
"title": "A valid XPath expression",
"type": "string"
}
},
"forms": [
},
{
"href": "/search/xpath?query={query}",
"href": "/things?xpath={xpath}",
"htv:methodName": "GET",
"response": {
"description": "Success response",
Expand All @@ -334,7 +321,7 @@
},
"additionalResponses": [
{
"description": "JSONPath expression not provided or contains syntax errors",
"description": "XPath expression not provided or contains syntax errors",
"contentType": "application/problem+json",
"htv:statusCodeValue": 400
}
Expand All @@ -343,42 +330,63 @@
}
]
},
"searchSPARQL": {
"description": "SPARQL semantic search",
"sparql": {
"@type": "SPARQLProperty",
"description": "Endpoint for querying the directory with SPARQL",
"uriVariables": {
"query": {
"@type": "SPARQLQuery",
"title": "A valid SPARQL 1.1. query",
"type": "string"
}
},
"forms": [
{
"href": "/search/sparql?query={query}",
"href": "/sparql?query={query}",
"htv:methodName": "GET",
"response": {
"description": "Success response",
"htv:statusCodeValue": 200
},
"additionalResponses": [
{
"description": "JSONPath expression not provided or contains syntax errors",
"description": "SPARQL query not provided or contains syntax errors",
"contentType": "application/problem+json",
"htv:statusCodeValue": 400
}
],
"scopes": "search"
},
{
"href": "/search/sparql",
"href": "/sparql",
"htv:methodName": "POST",
"contentType:": "application/x-www-form-urlencoded",
"response": {
"description": "Success response",
"contentType": "application/json",
"htv:statusCodeValue": 200
},
"additionalResponses": [
{
"description": "JSONPath expression not provided or contains syntax errors",
"description": "SPARQL query not provided or contains syntax errors",
"contentType": "application/problem+json",
"htv:statusCodeValue": 400
}
],
"scopes": "search"
},
{
"href": "/sparql",
"htv:methodName": "POST",
"contentType:": "application/sparql-query",
"response": {
"description": "Success response",
"contentType": "application/json",
"htv:statusCodeValue": 200
},
"additionalResponses": [
{
"description": "SPARQL query not provided or contains syntax errors",
"contentType": "application/problem+json",
"htv:statusCodeValue": 400
}
Expand Down Expand Up @@ -428,4 +436,4 @@
]
}
}
}
}