Skip to content

Commit

Permalink
Fixes #1964: Updated reference (#2014)
Browse files Browse the repository at this point in the history
Signed-off-by: philbuettner <[email protected]>
  • Loading branch information
Philippe Buettner authored and aedelmann committed Oct 10, 2019
1 parent 7f8e38e commit 51f82d0
Showing 1 changed file with 131 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class OpenAPITemplate implements IFileTemplate<InformationModel> {
- url: https://things.eu-1.bosch-iot-suite.com/api/2
description: "Bosch IoT Things Service"
tags:
- name: Things
description: List every Thing
- name: Features
description: Features of your «infomodel.name» things
- name: Messages
Expand All @@ -63,6 +65,113 @@ class OpenAPITemplate implements IFileTemplate<InformationModel> {
- bearerAuth: []
paths:
###
### Things
###
'/things':
get:
summary: List all available Things
description: >-
Returns all Things passed in by the required parameter `ids`. Optionally
you can use field selectors (see parameter `fields`) to only get the
specified fields.
tags:
- Things
responses:
'200':
description: >-
The successfully completed request contains as its result the first
200 for the user available Things, sorted by their `thingId`.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Thing'
'400':
description: >-
The request could not be completed. At least one of the defined
query parameters was invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/AdvancedError'
'401':
description: The request could not be completed due to missing authentication.
content:
application/json:
schema:
$ref: '#/components/schemas/AdvancedError'
'403':
description: >-
The request could not be completed due to a missing or invalid API
Token.
content:
application/json:
schema:
$ref: '#/components/schemas/AdvancedError'
'414':
description: >-
The request could not be completed due to an URI length exceeding 8k
characters.
'/things/{thingId}':
get:
summary: Retrieve a specific Thing
description: >-
Returns the Thing identified by the `thingId` path parameter. The
response includes details about the Thing. Note that the Thing's Policy
is not included in the response per default. Optionally you can use
field selectors (see parameter `fields`) to only get the specified
fields. E.g., you can get the Thing's Policy by using a field selector.
tags:
- Things
parameters:
- $ref: '#/components/parameters/thingIdPathParam'
responses:
'200':
description: The request successfully returned the specific Thing.
content:
application/json:
schema:
$ref: '#/components/schemas/Thing'
'304':
$ref: '#/components/responses/notModified'
'400':
description: >-
The request could not be completed. The `thingId` either
* does not contain the mandatory namespace prefix (java package notation + `:` colon)
* does not conform to RFC-2396 (URI)
Or one of the defined query parameters was invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/AdvancedError'
'401':
description: The request could not be completed due to missing authentication.
content:
application/json:
schema:
$ref: '#/components/schemas/AdvancedError'
'403':
description: >-
The request could not be completed due to a missing or invalid API
Token.
content:
application/json:
schema:
$ref: '#/components/schemas/AdvancedError'
'404':
description: >-
The request could not be completed. The Thing with the given ID was
not found.
content:
application/json:
schema:
$ref: '#/components/schemas/AdvancedError'
'412':
$ref: '#/components/responses/preconditionFailed'
###
### «infomodel.name» Features
###
'/things/{thingId}/features':
Expand Down Expand Up @@ -133,7 +242,7 @@ class OpenAPITemplate implements IFileTemplate<InformationModel> {
'304':
$ref: '#/components/responses/notModified'
'400':
description: |-
description: >-
The request could not be completed. The `thingId` either
* does not contain the mandatory namespace prefix (java package notation + `:` colon)
* does not conform to RFC-2396 (URI)
Expand Down Expand Up @@ -373,6 +482,27 @@ class OpenAPITemplate implements IFileTemplate<InformationModel> {
- status
- error
- message
Thing:
type: object
required:
- thingId
- policyId
- attributes
- features
properties:
thingId:
type: string
description: Unique identifier representing the thing
policyId:
type: string
description: The policy ID used for controlling access to this thing, managed by resource `/policies/{policyId}`
attributes:
$ref: '#/components/schemas/Attributes'
features:
$ref: '#/components/schemas/«infomodel.name»Features'
Attributes:
type: object
description: An arbitrary JSON object describing the attributes of a Thing.
FeatureDefinition:
type: array
minItems: 1
Expand Down

0 comments on commit 51f82d0

Please sign in to comment.