diff --git a/.github/workflows/prettify.yml b/.github/workflows/prettify.yml index b16d71f76..2d15c8629 100644 --- a/.github/workflows/prettify.yml +++ b/.github/workflows/prettify.yml @@ -8,7 +8,6 @@ on: - "errata.html" - "errata11.html" - "ontology/*.html" - - "index.html" - "validation/tm-json-schema-validation.json" - "context/td-context-1.1.jsonld" - "visualization/*.png" diff --git a/.prettierignore b/.prettierignore index ae62b879a..50cdfac90 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,7 +11,6 @@ errata11.html # Automatically generated files ontology/*.html -index.html validation/tm-json-schema-validation.json context/td-context-1.1.jsonld visualization/*.png diff --git a/index.html b/index.html index 59b7b7f29..114b36bb9 100644 --- a/index.html +++ b/index.html @@ -1122,1403 +1122,3095 @@

Class Definitions

Core Vocabulary Definitions

-

Thing

An abstraction of a physical or a virtual entity whose - metadata and interfaces are described by a WoT Thing - Description, whereas a virtual entity is the composition - of one or more Things.

- - - - - - - - - - - - - - - - - -
Vocabulary Terms in Thing Level
Vocabulary termDescriptionAssignmentType
@contextJSON-LD keyword to define short-hand names called terms that are used throughout a TD document.mandatoryanyURI or Array
@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring or Array of string
idIdentifier of the Thing in form of a URI [[RFC3986]] (e.g., stable URI, temporary and mutable URI, URI with local IP address, URN, etc.).optionalanyURI
titleProvides a human-readable title (e.g., display - a text for UI representation) based on a default - language.mandatoryany type
titlesProvides multi-language human-readable titles - (e.g., display a text for UI representation in - different languages). Also see MultiLanguage.optionalMap of MultiLanguage
descriptionProvides additional (human-readable) - information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) - information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage
versionProvides version information.optionalVersionInfo
createdProvides information when the TD instance was - created.optionaldateTime
modifiedProvides information when the TD instance was - last modified.optionaldateTime
supportProvides information about the TD maintainer as - URI scheme (e.g., mailto [[RFC6068]], - tel [[RFC3966]], - https [[RFC9112]]).optionalanyURI
baseDefine the base URI that is used for all - relative URI references throughout a TD document. - In TD instances, all relative URIs are resolved - relative to the base URI using the algorithm - defined in [RFC3986].
-
- base does not affect the URIs used in - @context and the IRIs used within - Linked Data [LINKED-DATA] - graphs that are relevant when semantic processing - is applied to TD instances.
optionalanyURI
propertiesAll Property-based Interaction Affordances - of the Thing.optionalMap of PropertyAffordance
actionsAll Action-based Interaction Affordances - of the Thing.optionalMap of ActionAffordance
eventsAll Event-based Interaction Affordances - of the Thing.optionalMap of EventAffordance
formsSet of form hypermedia controls that describe how - an operation can be performed. Forms are - serializations of Protocol Bindings. Thing level forms are used to describe endpoints for a group of interaction affordances.optionalArray of Form
securitySet of security definition names, chosen from - those defined in securityDefinitions. - These must all be satisfied for access to resources.mandatorystring or Array of string
securityDefinitionsSet of named security configurations - (definitions only). Not actually applied unless - names are used in a security - name-value pair.mandatoryMap of SecurityScheme
profileIndicates the WoT Profile mechanisms followed by this Thing Description and the corresponding Thing implementation.optionalanyURI or Array of anyURI
schemaDefinitionsSet of named data schemas. - To be used in a schema - name-value pair inside an - AdditionalExpectedResponse object.optionalMap of DataSchema
uriVariablesDefine URI template variables according to [[RFC6570]] as collection - based on DataSchema declarations. The Thing level uriVariables can be used in Thing level - forms or in Interaction Affordances. - The individual variables DataSchema cannot be an ObjectSchema or an ArraySchema since each variable needs - to be serialized to a string inside the href upon the execution of the operation. - If the same variable is both declared in Thing level uriVariables and in Interaction Affordance level, - the Interaction Affordance level variable takes precedence.optionalMap of DataSchema

- For @context the following rules are defined for Thing Description instances: -

- +

+ To determine the base direction of all human-readable text in Thing Description and + Thing Model instances this specification recommends to follow the [[STRING-META]] guideline about + string-specific directional information + when no built-in mechanism for associating base direction metadata is available. +

- -

To determine the base direction of all - human-readable text in Thing Description - and Thing Model instances this specification - recommends to follow the [[STRING-META]] guideline about - string-specific directional information - when no built-in mechanism for associating base direction metadata - is available. -

- -

TD Processors should be aware of - certain special cases when processing bidirectional text. - - TD Processors SHOULD take care to use bidi isolation when - presenting strings to users, particularly when embedding - in surrounding text (e.g., for Web user interface). - Mixed direction text can occur in any language, even when the - language is properly identified.

-

- TD producers SHOULD attempt to provide mixed direction - strings in a way that can be displayed successfully by a - naive user agent. - For example, if an RTL string begins - with an LTR run (such as a number or a brand or trade - name in Latin script), including an RLM character at the - start of the string or wrapping opposite direction runs - in bidi controls can assist in proper display.

-

Strings on the Web: Language and Direction - Metadata [string-meta] - provides some guidance and illustrates a number of - pitfalls when using bidirectional text.

-

In addition to the - explicitly provided Interaction - Affordances in the properties, - actions, and events Maps, a Thing can also - provide meta-interactions, which are indicated by - Form instances in its optional - forms Array. - When - the forms Array of a - Thing instance contains Form - instances, it MUST contain op member with the string values assigned - to the name op, either directly or within an Array, MUST be one of the following operation - types: readallproperties, - writeallproperties, - readmultipleproperties, - writemultipleproperties, observeallproperties, - unobserveallproperties, queryallactions, - subscribeallevents, or - unsubscribeallevents. (See - an example for an - usage of form in a Thing instance.)

-

The data schema for each of the property meta-interactions is - constructed by combining the data schemas of each - PropertyAffordance instance in a single - ObjectSchema instance, where the - properties Map of the - ObjectSchema instance contains each data - schema of the PropertyAffordances identified - by the name of the corresponding - PropertyAffordances instance.

-

If not specified otherwise (e.g., through a TD Context Extension), the request data of the - readmultipleproperties operation is an - Array that contains the intended - PropertyAffordances instance names, which is - serialized to the content type specified by the - Form instance.

-

InteractionAffordance

Metadata of a Thing that shows the possible choices to - Consumers, thereby suggesting - how Consumers may interact with the - Thing. There are many types of potential affordances, but - W3C WoT - defines three types of Interaction Affordances: - Properties, Actions, and Events.

- - - - -
Vocabulary Terms in InteractionAffordance Level
Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring or Array of string
titleProvides a human-readable title (e.g., display - a text for UI representation) based on a default - language.optionalstring
titlesProvides multi-language human-readable titles - (e.g., display a text for UI representation in - different languages). Also see MultiLanguage.optionalMap of MultiLanguage
descriptionProvides additional (human-readable) - information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) - information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage
formsSet of form hypermedia controls that describe - how an operation can be performed. Forms are - serializations of Protocol Bindings. The array cannot be empty.mandatoryArray of Form
uriVariablesDefine URI template variables according to [[RFC6570]] as collection - based on DataSchema declarations. The individual variables DataSchema cannot be an ObjectSchema or an ArraySchema since each variable needs - to be serialized to a string inside the href upon the execution of the operation. - If the same variable is both declared in Thing level uriVariablesand in Interaction Affordance level, - the Interaction Affordance level variable takes precedence.optionalMap of DataSchema

The class InteractionAffordance has the following subclasses:

-

PropertyAffordance

An Interaction Affordance that exposes state of the - Thing. This state can then be retrieved (read) and/or updated (write). - Things can also choose to - make Properties observable by pushing the new state after - a change.

Vocabulary Terms in PropertyAffordance Level
Vocabulary termDescriptionAssignmentType
observableA hint that indicates whether Servients hosting - the Thing and Intermediaries should provide a - Protocol Binding that supports the observeproperty and unobserveproperty operations - for this Property.with defaultboolean

Property instances are also instances of - the class DataSchema. Therefore, it can contain the - type, unit, - readOnly and writeOnly - members, among others.

PropertyAffordance is a Subclass of the - InteractionAffordance Class and - the DataSchema Class. - When a Form instance is within a - PropertyAffordance instance, the value - assigned to op MUST be one of readproperty, - writeproperty, observeproperty, - unobserveproperty or an Array - containing a combination of these terms.

- It is considered to be good practice that each observeproperty has a corresponding - unobserveproperty unless the protocol supports implicit unsubscription mechanisms - (e.g., heartbeat to detect connection loss).

- The observation mechanism depends on the underlying protocol or sub-protocol. Having said that, it is not - guaranteed that the current Property value will be provided once the subscription is initiated. Hence, it may be - necessary to read the current Property value before/after the subscription to get a first value. -

-

ActionAffordance

An Interaction Affordance that allows to invoke a - function of the Thing, which manipulates state (e.g., - toggling a lamp on or off) or triggers a process on the - Thing (e.g., dim a lamp over time).

- - - -
Vocabulary Terms in ActionAffordance Level
Vocabulary termDescriptionAssignmentType
inputUsed to define the input data schema of the - Action.optionalDataSchema
outputUsed to define the output data schema of the - Action.optionalDataSchema
safeSignals if the Action is safe (=true) or not. - Used to signal if there is no internal state (cf. - resource state) is changed when invoking an Action. - In that case responses can be cached as - example.with defaultboolean
idempotentIndicates whether the Action is idempotent - (=true) or not. Informs whether the Action can be - called repeatedly with the same result, if present, - based on the same input.with defaultboolean
synchronousIndicates whether the action is synchronous (=true) or not. - A synchronous action means that the response of action contains all the information - about the result of the action and no further querying about the status of the action - is needed. Lack of this keyword means that no claim on the synchronicity of the - action can be made.optionalboolean

ActionAffordance is a Subclass of the - InteractionAffordance Class. - When a Form instance is within an - ActionAffordance instance, the value - assigned to op MUST - either be invokeaction, queryaction, - cancelaction or an - Array - containing a combination of these terms. -

-

EventAffordance

An Interaction Affordance that describes an event - source, which asynchronously pushes event data to - Consumers (e.g., overheating - alerts).

- - -
Vocabulary Terms in EventAffordance Level
Vocabulary termDescriptionAssignmentType
subscriptionDefines data that needs to be passed upon - subscription, e.g., filters or message format for - setting up Webhooks.optionalDataSchema
dataDefines the data schema of the Event instance - messages pushed by the Thing.optionalDataSchema
dataResponseDefines the data schema of the Event response messages sent by the consumer in a response to a data message.optionalDataSchema
cancellationDefines any data that needs to be passed to - cancel a subscription, e.g., a specific message to - remove a Webhook.optionalDataSchema

EventAffordance is a Subclass of the - InteractionAffordance Class. - When - a Form instance is within an EventAffordance - instance, the value assigned to op - MUST be either - subscribeevent, - unsubscribeevent, or both terms within an - Array.

- It is considered to be good practice that each subscribeevent has a corresponding unsubscribeevent unless the protocol - supports implicit unsubscription mechanisms (e.g., heartbeat to detect connection loss).

-

VersionInfo

Metadata of a Thing that provides version information - about the TD document. If required, additional version - information such as firmware and hardware version (term - definitions outside of the TD namespace) can be extended - via the TD Context Extension - mechanism.

-
Vocabulary Terms in VersionInfo Level
Vocabulary termDescriptionAssignmentType
instanceProvides a version indicator of this TD. - mandatorystring
modelProvides a version indicator of the underlying TM. - optionalstring

It is recommended that the values within instances and model of - the VersionInfo Class follow the - semantic versioning pattern, where a sequence of three - numbers separated by a dot indicates the major version, - minor version, and patch version, respectively. See - [SEMVER] for - details.

-

MultiLanguage

A Map providing a set of human-readable texts in different languages identified by language tags described in [[BCP47]]. See for example usages of this container in a Thing Description instance.

-

Each name of the MultiLanguage Map MUST be a language tag as defined in [[!BCP47]]. - Each value of the MultiLanguage Map MUST be of type string. -

+

+ TD Processors should be aware of + certain special cases when processing bidirectional text. + + TD Processors SHOULD take care + to use bidi isolation when presenting strings to users, particularly when embedding in surrounding text + (e.g., for Web user interface). Mixed direction text can occur in any language, even when the language is properly identified. +

+

+ + TD producers SHOULD attempt to provide mixed direction strings in a way that can be displayed + successfully by a naive user agent. + + For example, if an RTL string begins with an LTR run (such as a number or a brand or trade name in Latin + script), including an RLM character at the start of the string or wrapping opposite direction runs in bidi + controls can assist in proper display. +

+

+ Strings on the Web: Language and Direction Metadata [string-meta] provides some guidance and illustrates a number of pitfalls when using bidirectional text. +

+

+ In addition to the explicitly provided + Interaction Affordances + in the properties, actions, and events + Maps, a + Thing can also provide + meta-interactions, which are indicated by Form instances in its optional forms + Array. + When the forms Array of + a Thing instance contains + Form instances, it MUST contain op member with the string values assigned to + the name op, either directly or within an + Array, MUST be one of the following + operation types: readallproperties, writeallproperties, + readmultipleproperties, writemultipleproperties, + observeallproperties, unobserveallproperties, queryallactions, + subscribeallevents, or unsubscribeallevents. + (See an example for an usage of form in a Thing + instance.) +

+

+ The data schema for each of the property meta-interactions is constructed by combining the data schemas of + each PropertyAffordance instance in a single ObjectSchema instance, where the + properties Map of the + ObjectSchema instance contains each data schema of the + PropertyAffordances identified by the name of the corresponding + PropertyAffordances instance. +

+

+ If not specified otherwise (e.g., through a + TD Context Extension), the request + data of the readmultipleproperties operation is an + Array that contains the intended + PropertyAffordances instance names, which is serialized to the content type specified by the + Form instance. +

+ +
+

InteractionAffordance

+

+ Metadata of a Thing that shows the possible choices to + Consumers, thereby suggesting how + Consumers may interact with the + Thing. There are many types of potential affordances, but + W3C WoT defines three types of Interaction Affordances: + Properties, Actions, and Events. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in InteractionAffordance Level +
Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types).optional + string or + Array of + string +
title + Provides a human-readable title (e.g., display a text for UI representation) based on a default + language. + optional + string +
titles + Provides multi-language human-readable titles (e.g., display a text for UI representation in + different languages). Also see MultiLanguage. + optional + Map of MultiLanguage +
descriptionProvides additional (human-readable) information based on a default language.optional + string +
descriptions + Can be used to support (human-readable) information in different languages. Also see + MultiLanguage. + optional + Map of MultiLanguage +
forms + Set of form hypermedia controls that describe how an operation can be performed. Forms are + serializations of Protocol Bindings. The array cannot be empty. + mandatory + Array of Form +
uriVariables + Define URI template variables according to [[RFC6570]] as collection based on DataSchema + declarations. The individual variables DataSchema cannot be an ObjectSchema or an ArraySchema since + each variable needs to be serialized to a string inside the href upon the execution of + the operation. If the same variable is both declared in Thing level + uriVariablesand in Interaction Affordance level, the Interaction Affordance level + variable takes precedence. + optional + Map of DataSchema +
+

The class InteractionAffordance has the following subclasses:

+ +
+
+

PropertyAffordance

+

+ An Interaction Affordance that exposes state of the Thing. This state can then be retrieved (read) and/or + updated (write). Things can also choose to make Properties observable by pushing the new state after a + change. +

+ + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in PropertyAffordance Level +
Vocabulary termDescriptionAssignmentType
observable + A hint that indicates whether Servients hosting the Thing and Intermediaries should provide a + Protocol Binding that supports the observeproperty and + unobserveproperty operations for this Property. + with default + boolean +
+

+ Property instances are also instances of the class DataSchema. + Therefore, it can contain the type, unit, readOnly and + writeOnly members, among others. +

+

+ PropertyAffordance is a + Subclass of the + InteractionAffordance + Class and the DataSchema + Class. + When a Form instance is within a PropertyAffordance instance, the value assigned to + op MUST be one of readproperty, writeproperty, + observeproperty, unobserveproperty or an + Array containing a combination of + these terms. +

+

+ It is considered to be good practice that each observeproperty has a corresponding + unobserveproperty unless the protocol supports implicit unsubscription mechanisms (e.g., + heartbeat to detect connection loss). +

+

+ The observation mechanism depends on the underlying protocol or sub-protocol. Having said that, it is not + guaranteed that the current Property value will be provided once the subscription is initiated. + Hence, it may be necessary to read the current Property value before/after the subscription to get + a first value. +

+
+
+

ActionAffordance

+

+ An Interaction Affordance that allows to invoke a function of the Thing, which manipulates state (e.g., + toggling a lamp on or off) or triggers a process on the Thing (e.g., dim a lamp over time). +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in ActionAffordance Level +
Vocabulary termDescriptionAssignmentType
inputUsed to define the input data schema of the Action.optional + DataSchema +
outputUsed to define the output data schema of the Action.optional + DataSchema +
safe + Signals if the Action is safe (=true) or not. Used to signal if there is no internal state (cf. + resource state) is changed when invoking an Action. In that case responses can be cached as example. + with default + boolean +
idempotent + Indicates whether the Action is idempotent (=true) or not. Informs whether the Action can be called + repeatedly with the same result, if present, based on the same input. + with default + boolean +
synchronous + Indicates whether the action is synchronous (=true) or not. A synchronous action means that the + response of action contains all the information about the result of the action and no further + querying about the status of the action is needed. Lack of this keyword means that no claim on the + synchronicity of the action can be made. + optional + boolean +
+

+ ActionAffordance is a + Subclass of the + InteractionAffordance + Class. + When a Form instance is within an ActionAffordance instance, the value assigned to op MUST + either be invokeaction, queryaction, cancelaction or an + Array + containing a combination of these terms. + +

+
+
+

EventAffordance

+

+ An Interaction Affordance that describes an event source, which asynchronously pushes event data to + Consumers (e.g., overheating alerts). +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in EventAffordance Level +
Vocabulary termDescriptionAssignmentType
subscription + Defines data that needs to be passed upon subscription, e.g., filters or message format for setting + up Webhooks. + optional + DataSchema +
dataDefines the data schema of the Event instance messages pushed by the Thing.optional + DataSchema +
dataResponse + Defines the data schema of the Event response messages sent by the consumer in a response to a data + message. + optional + DataSchema +
cancellation + Defines any data that needs to be passed to cancel a subscription, e.g., a specific message to + remove a Webhook. + optional + DataSchema +
+

+ EventAffordance is a + Subclass of the + InteractionAffordance + Class. + When a Form instance is within an EventAffordance instance, the value assigned to + op + MUST be either + subscribeevent, unsubscribeevent, or both terms within an + Array. +

+

+ It is considered to be good practice that each subscribeevent has a corresponding + unsubscribeevent unless the protocol supports implicit unsubscription mechanisms (e.g., + heartbeat to detect connection loss). +

+
+
+

VersionInfo

+

+ Metadata of a Thing that provides version information about the TD document. If required, additional + version information such as firmware and hardware version (term definitions outside of the TD namespace) + can be extended via the + TD Context Extension mechanism. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in VersionInfo Level +
Vocabulary termDescriptionAssignmentType
instanceProvides a version indicator of this TD.mandatory + string +
modelProvides a version indicator of the underlying TM.optional + string +
+

+ It is recommended that the values within instances and model of the + VersionInfo Class follow + the semantic versioning pattern, where a sequence of three numbers separated by a dot indicates the major + version, minor version, and patch version, respectively. See [SEMVER] for details. +

+
+
+

MultiLanguage

+

+

+ A Map providing a set of human-readable texts in different languages identified by language tags + described in [[BCP47]]. See for example usages of + this container in a Thing Description instance. +

+

+ Each name of the MultiLanguage Map MUST be a language tag as defined in + [[!BCP47]]. + + Each value of the MultiLanguage Map MUST be of type string. + +

+
+ + +
+

Data Schema Vocabulary Definitions

+

A data schema is an abstract notation for data contained in data formats.

+

+ The data schema vocabulary definition reflects a very common subset of the terms defined by JSON Schema + [[?JSON-SCHEMA]]. A JSON Schema [[?JSON-SCHEMA]] processor for + JSON Schema draft 7 can consume a data + schema. It is noted that data schema definitions within Thing Description instances are not limited to this + defined subset and may use additional terms found in JSON Schema using a TD Context Extension for the + additional terms as described in , otherwise these terms are + semantically ignored by TD Processors + (for details about semantic processing, please refer to + and the documentation under the namespace IRIs, e.g., + https://www.w3.org/2019/wot/td). +

+

+ In a TD, concrete data formats are specified in Forms (see ) using content types. When + the value of a content type in an instance of the Form is application/json, the data schema can + be processed directly by JSON Schema processors. Otherwise, Web of Things (WoT) Binding Templates + [[?WOT-BINDING-TEMPLATES]] defines data schema's available mappings to other content types such as XML + [[?xml]]. If the content type in an instance of the Form is not application/json and if no + mapping is defined for the content type, specifying a data schema does not make sense for the content type. +

+

+ The following table contains content types which MAY use data schema to describe the structure of their + payloads. +

+ + + + + + + + + + + + + + + + + + +
+ Content types that can use a Data Schema +
FormatContent Type
JSON/CBOR + application/json
+ application/ld+json
+ application/senml+json
+ application/cbor
+ application/senml+cbor
+
XML/EXI + application/xml
+ application/senml+xml
+ application/exi
+ application/senml-exi
+
+ + +
+

DataSchema

+

Metadata that describes the data format used. It can be used for validation.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in DataSchema Level +
Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types)optional + string or + Array of + string +
title + Provides a human-readable title (e.g., display a text for UI representation) based on a default + language. + optional + string +
titles + Provides multi-language human-readable titles (e.g., display a text for UI representation in + different languages). Also see MultiLanguage. + optional + Map of MultiLanguage +
descriptionProvides additional (human-readable) information based on a default language.optional + string +
descriptions + Can be used to support (human-readable) information in different languages. Also see + MultiLanguage. + optional + Map of MultiLanguage +
constProvides a constant value.optionalany type
default + Supply a default value. The value SHOULD validate against the data schema in which it resides. + optionalany type
unit + Provides unit information that is used, e.g., in international science, engineering, and business. + To preserve uniqueness, it is recommended that the value of the unit points to a semantic definition + (also see Section + Semantic Annotations). + optional + string +
oneOf + Used to ensure that the data is valid against one of the specified schemas in the array. This can be + used to describe multiple input or output schemas. + optional + Array of DataSchema +
enumRestricted set of values provided as an array.optionalArray of any type
readOnly + Boolean value that is a hint to indicate whether a property interaction / value is read only (=true) + or not (=false). + with default + boolean +
writeOnly + Boolean value that is a hint to indicate whether a property interaction / value is write only + (=true) or not (=false). + with default + boolean +
format + Allows validation based on a format pattern such as "date-time", "email", "uri", etc. (Also see + below.) + optional + string +
type + Assignment of JSON-based data types compatible with JSON Schema (one of boolean, integer, number, + string, object, array, or null). + optional + anyURI (one + of object, array, string, number, + integer, boolean, or null) +
+

The class DataSchema has the following subclasses:

+ +

+ The format string values are known from a fixed set of values and their corresponding format + rules defined in [JSON-SCHEMA] (Section 7.3 Defined Formats in particular). + Servients MAY use the format value to perform additional validation accordingly. + When a value that is not found in the known set of values is assigned to format, such a + validation SHOULD succeed. +

+ Vocabulary terms typed as any type (e.g., const, + default) follow data types compatible with JSON Schema (boolean, integer, number, string, + object, array, or null). +

+ The format term is not widely implemented by JSON Schema tools. In addition, the term + format is being discussed by the JSON Schema standardisation community and may be replaced by + another mechanism or removed in a future JSON Schema version. +

+
+
+

ArraySchema

+

+ Metadata describing data of type Array. + This Subclass is indicated by the + value array assigned to type in DataSchema instances. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in ArraySchema Level +
Vocabulary termDescriptionAssignmentType
itemsUsed to define the characteristics of an array.optional + DataSchema or Array of + DataSchema +
minItemsDefines the minimum number of items that have to be in the array.optional + unsignedInt +
maxItemsDefines the maximum number of items that have to be in the array.optional + unsignedInt +
+
+
+

BooleanSchema

+

+ Metadata describing data of type boolean. This + Subclass is indicated by the value + boolean assigned to type in DataSchema instances. +

+
+
+

NumberSchema

+

+ Metadata describing data of type number. This + Subclass is indicated by the value + number assigned to type in DataSchema instances. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in NumberSchema Level +
Vocabulary termDescriptionAssignmentType
minimum + Specifies a minimum numeric value, representing an inclusive lower limit. Only applicable for + associated number or integer types. + optional + double +
exclusiveMinimum + Specifies a minimum numeric value, representing an exclusive lower limit. Only applicable for + associated number or integer types. + optional + double +
maximum + Specifies a maximum numeric value, representing an inclusive upper limit. Only applicable for + associated number or integer types. + optional + double +
exclusiveMaximum + Specifies a maximum numeric value, representing an exclusive upper limit. Only applicable for + associated number or integer types. + optional + double +
multipleOf + Specifies the multipleOf value number. The value must strictly greater than 0. Only applicable for + associated number or integer types. + optional + double +
+
+
+

IntegerSchema

+

+ Metadata describing data of type integer. This + Subclass is indicated by the value + integer assigned to type in DataSchema instances. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in IntegerSchema Level +
Vocabulary termDescriptionAssignmentType
minimum + Specifies a minimum numeric value, representing an inclusive lower limit. Only applicable for + associated number or integer types. + optional + integer +
exclusiveMinimum + Specifies a minimum numeric value, representing an exclusive lower limit. Only applicable for + associated number or integer types. + optional + integer +
maximum + Specifies a maximum numeric value, representing an inclusive upper limit. Only applicable for + associated number or integer types. + optional + integer +
exclusiveMaximum + Specifies a maximum numeric value, representing an exclusive upper limit. Only applicable for + associated number or integer types. + optional + integer +
multipleOf + Specifies the multipleOf value number. The value must strictly greater than 0. Only applicable for + associated number or integer types. + optional + integer +
+
+
+

ObjectSchema

+

+ Metadata describing data of type + Object. This + Subclass is indicated by the value + object assigned to type in DataSchema instances. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in ObjectSchema Level +
Vocabulary termDescriptionAssignmentType
propertiesData schema nested definitions.optional + Map of DataSchema +
required + Defines which members of the object type are mandatory, i.e. which members are mandatory in the + payload that is to be sent (e.g. input of invokeaction, writeproperty) and + what members will be definitely delivered in the payload that is being received (e.g. output of + invokeaction, readproperty) + optional + Array of + string +
+
+
+

StringSchema

+

+ Metadata describing data of type string. This + Subclass is indicated by the value + string assigned to type in DataSchema instances. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in StringSchema Level +
Vocabulary termDescriptionAssignmentType
minLengthSpecifies the minimum length of a string. Only applicable for associated string types.optional + unsignedInt +
maxLengthSpecifies the maximum length of a string. Only applicable for associated string types.optional + unsignedInt +
pattern + Provides a regular expression to express constraints of the string value. The regular expression + must follow the [[ECMA-262]] dialect. + optional + string +
contentEncoding + Specifies the encoding used to store the contents, as specified in [[RFC2045]] (Section 6.1) and + [[RFC4648]]. + optional + string + (e.g., 7bit, 8bit, binary, quoted-printable, + base16, base32, or base64) +
contentMediaTypeSpecifies the MIME type of the contents of a string value, as described in [[RFC2046]].optional + string + (e.g., image/png, or audio/mpeg) +
+

+ The length of a string (i.e., minLength and maxLength) is defined as the number + of Unicode code points, as defined by [[RFC8259]]. Note that some + user-perceived characters + are composed of more than one Unicode code point. Arbitrary index values might not fall on these grapheme + boundaries, so truncation according to maxLength might alter the appearance or meaning of the + string. +

+
+
+

NullSchema

+

+ Metadata describing data of type null. This subclass is indicated by the value + null assigned to type in DataSchema instances. This Subclass + describes only one acceptable value, namely null. It is important to note that + null does not mean the absence of a value. It is analogous to null in + JavaScript, None in Python, null in Java and nil in Ruby + programming languages. It can be used as part of a oneOf declaration, where it is used to + indicate, that the data can also be null. +

+
-
-

Data Schema Vocabulary Definitions

-

A data schema is an abstract notation for data contained in data formats.

-

- The data schema vocabulary definition reflects a very common subset of the terms defined by JSON Schema - [[?JSON-SCHEMA]]. A JSON Schema [[?JSON-SCHEMA]] processor for - JSON Schema draft 7 can consume a data - schema. It is noted that data schema definitions within Thing Description instances are not limited to this - defined subset and may use additional terms found in JSON Schema using a TD Context Extension for the - additional terms as described in , otherwise these terms are - semantically ignored by TD Processors - (for details about semantic processing, please refer to - and the documentation under the namespace IRIs, e.g., - https://www.w3.org/2019/wot/td). -

+
+

Security Vocabulary Definitions

+

- In a TD, concrete data formats are specified in Forms (see ) using content types. When - the value of a content type in an instance of the Form is application/json, the data schema can - be processed directly by JSON Schema processors. Otherwise, Web of Things (WoT) Binding Templates - [[?WOT-BINDING-TEMPLATES]] defines data schema's available mappings to other content types such as XML - [[?xml]]. If the content type in an instance of the Form is not application/json and if no - mapping is defined for the content type, specifying a data schema does not make sense for the content type. + This specification provides a selection of well-established security mechanisms that are directly built into + protocols eligible as Protocol Bindings for W3C WoT or are widely in use with those protocols. The + current set of HTTP security schemes is partly based on + OpenAPI 3.0.1 + (see also [[?OPENAPI]]). However while the HTTP security schemes, Vocabulary, and syntax given in + this specification share many similarities with OpenAPI, they are not compatible.

+

- The following table contains content types which MAY use data schema to describe the structure of their - payloads. + Generally, security schemes require some form of secure transport to be effective, such as TLS or DTLS. + Requirements for the use of secure transport are given in Section + in this document and in the Security Considerations section of [[wot-architecture11]].

- - - + + +
+

SecurityScheme

+

+

+ Metadata describing the configuration of a security mechanism. + The value assigned to the name scheme MUST be defined within a + Vocabulary + included in the + Thing Description, either + in the standard + Vocabulary defined in + § 5. TD Information Model + or in a + TD Context Extension. +

+

+ For all security schemes, any keys, passwords, or other sensitive information directly providing access + MUST NOT be stored in the TD and should instead be shared and stored out-of-band via other + mechanisms. + The purpose of a TD is to describe how to access a Thing if and only if a Consumer already has + authorization, and is not meant be used to grant that authorization. +

+

+ Each security scheme object used in a TD defines a set of requirements to be met before access can be + granted. We say a security scheme is satisfied when all its requirements are met. In some cases + requirements from multiple security schemes will have to be met before access can be granted. +

+

+ Security schemes generally may require additional authentication parameters, such as a password or key. + The location of this information is indicated by the value associated with the name in, often + in combination with the value associated with name. The value associated with + in can take one of the following values: +

+
+
header:
+
+ The parameter will be given in a header provided by the protocol, with the name of the header provided + by the value of name. +
+
query:
+
+ The parameter will be appended to the URI as a query parameter, with the name of the query parameter + provided by name. +
+
body:
+
+ The parameter will be provided in the body of the request payload, with the data schema element used + provided by name. + When used in the context of a body security information location, the value of + name MUST be in the form of a JSON pointer [[!RFC6901]] relative to the root of the input + DataSchema for each interaction it is used with. + Since this value is not a fragment identifier, and is not relative to the root of the TD but to + whichever data schemas the security scheme is bound to, this value should not start with #; + it is a "pure" JSON pointer. Since this value is not a fragment identifier, it also does not need to + URL-encode special characters. The targeted element may or may not already exist at the specified + location in the referenced object or array schema (consequently the mechanism is not applicable to + simple types). If it does not, it will be inserted. This avoids having to duplicate definitions in the + data schemas of every interaction. + When an element of a data schema indicated by a JSON pointer indicated in a body locator + does not already exist in the indicated schema, it MUST be possible to insert the indicated element at + the location indicated by the pointer. + The JSON pointer used in the body locator MAY use the "-" character to + indicate a non-existent array element when it is necessary to insert an element after the last element + of an existing array. + + The element referenced (or created) by a body security information location MUST be + required and of type "string". + If name is not given, it is assumed the entire body is to be used as the security + parameter. +
+
cookie:
+
The parameter is stored in a cookie identified by the value of name.
+
uri:
+
+ The parameter is embedded in the URI itself, which is encoded in the relevant interaction using a URI + template variable defined by the value of name. This is more general than the + query mechanism but more complex. + The value uri SHOULD be specified for the name in in a security scheme only + if query is not applicable. + The URIs provided in interactions where a security scheme using uri as the value for + in + MUST be a URI template including the defined variable. + +
+
auto:
+
+ The location is determined as part of the protocol, or negotiated. + If a value of auto is set for the in field of a + SecurityScheme, then the name field SHOULD NOT be set. + In this case, the application of the SecurityScheme is subject to the respective + specification for the given protocol (e.g. [[!RFC8288]] when using the + BasicSecurityScheme with HTTP). +
+
+

+ If multiple parameters are needed for a security scheme, repeat the security scheme definition for each + parameter and combine them using a combo security scheme and allOf. In some + cases parameters may not actually be secret but a user may wish to leave them out of the TD to help + protect privacy. As an example of this, some security mechanisms require both a client identifier and a + secret key. In theory, the client identifier is public however it may be hard to update and pose a + tracking risk. In such a case it can be provided as an additional security parameter so it does not appear + in the TD. +

+

+ The names of URI variables declared in a SecurityScheme MUST be distinct from all other + URI variables declared in the TD. +

+
- Content types that can use a Data Schema -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in SecurityScheme Level +
Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types).optional + string or + Array of + string +
descriptionProvides additional (human-readable) information based on a default language.optional + string +
descriptions + Can be used to support (human-readable) information in different languages. Also see + MultiLanguage. + optional + Map of MultiLanguage +
proxy + URI of the proxy server this security configuration provides access to. If not given, the + corresponding security configuration is for the endpoint. + optional + anyURI +
schemeIdentification of the security mechanism being configured.mandatory + string + (e.g., nosec, combo, basic, digest, + bearer, psk, oauth2, apikey, or + auto) +
+

The class SecurityScheme has the following subclasses:

+ +
+
+

NoSecurityScheme

+

+ A security configuration corresponding to identified by the + Vocabulary Term + nosec (i.e., "scheme": "nosec"), indicating there is no authentication or other + mechanism required to access the resource. +

+
+
+

AutoSecurityScheme

+

+ An automatic authentication security configuration identified by the term auto (i.e., + "scheme": "auto"). This scheme indicates that the security parameters are going to be + negotiated by the underlying protocols at runtime, subject to the respective specifications for the + protocol (e.g. [[!RFC8288]] for Basic Authentication when using HTTP). +

+
+
+

ComboSecurityScheme

+

+ A combination of other security schemes identified by the Vocabulary Term combo (i.e., + "scheme": "combo"). Elements of this scheme define various ways in which other named schemes + defined in securityDefinitions, including other + ComboSecurityScheme definitions, are to be combined to + create a new scheme definition. + Exactly one of either oneOf or allOf vocabulary terms MUST be + included. + + Only security scheme definitions which can be used together can be combined with allOf. For + example, it is not possible in general to combine different OAuth 2.0 flows together using + allOf unless one applies to a proxy and one to the endpoint. Note that when multiple named + security scheme definitions are listed in a security field the same semantics apply as in an + allOf combination (and the same limitations on allowable combinations). The + oneOf combination is equivalent to using different security schemes on forms that are + otherwise identical. In this sense a oneOf scheme is not an essential feature but it does + avoid redundancy in such cases. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in ComboSecurityScheme Level +
Vocabulary termDescriptionAssignmentType
oneOf + Array of two or more strings identifying other named security scheme definitions, any one of which, + when satisfied, will allow access. Only one may be chosen for use. + mandatory + Array of + string +
allOf + Array of two or more strings identifying other named security scheme definitions, all of which must + be satisfied for access. + mandatory + Array of + string +
+ +
+
+

BasicSecurityScheme

+

+ Basic Authentication [RFC7617] security configuration identified by the + Vocabulary Term + basic (i.e., "scheme": "basic"), using an unencrypted username and password. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in BasicSecurityScheme Level +
Vocabulary termDescriptionAssignmentType
nameName for query, header, cookie, or uri parameters.optional + string +
inSpecifies the location of security authentication information.with default + string (one + of header, query, body, cookie, or + auto) +
+
+
+

DigestSecurityScheme

+

+ Digest Access Authentication [RFC7616] security configuration identified by the + Vocabulary Term + digest (i.e., "scheme": "digest"). This scheme is similar to basic + authentication but with added features to avoid man-in-the-middle attacks. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in DigestSecurityScheme Level +
Vocabulary termDescriptionAssignmentType
nameName for query, header, cookie, or uri parameters.optional + string +
inSpecifies the location of security authentication information.with default + string (one + of header, query, body, cookie, or + auto) +
qopQuality of protection.with default + string (one + of auth, or auth-int) +
+
+
+

APIKeySecurityScheme

+

+ API key authentication security configuration identified by the + Vocabulary Term + apikey (i.e., "scheme": "apikey"). This scheme is to be used when the access + token is opaque, for example when a key in an unknown or proprietary format is provided by a cloud service + provider. In this case the key may not be using a standard token format. This scheme indicates that the + key provided by the service provider needs to be supplied as part of service requests using the mechanism + indicated by the "in" field. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in APIKeySecurityScheme Level +
Vocabulary termDescriptionAssignmentType
nameName for query, header, cookie, or uri parameters.optional + string +
inSpecifies the location of security authentication information.with default + string (one + of header, query, body, cookie, + uri, or auto) +
+
+
+

BearerSecurityScheme

+

+ Bearer Token [RFC6750] security configuration identified by the + Vocabulary Term + bearer (i.e., "scheme": "bearer") for situations where bearer tokens are used + independently of OAuth2. If the oauth2 scheme is specified it is not generally necessary to + specify this scheme as well as it is implied. For format, the value + jwt indicates conformance with [RFC7519], jws indicates conformance with [RFC7797], cwt indicates conformance with [RFC8392], and jwe indicates conformance with [RFC7516], with values for alg interpreted consistently with those standards. + Other formats and algorithms for bearer tokens MAY be specified in vocabulary extensions. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in BearerSecurityScheme Level +
Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optional + anyURI +
nameName for query, header, cookie, or uri parameters.optional + string +
inSpecifies the location of security authentication information.with default + string (one + of header, query, body, cookie, or + auto) +
algEncoding, encryption, or digest algorithm.with default + string + (e.g., ES256, or ES512-256) +
formatSpecifies format of security authentication information.with default + string + (e.g., jwt, cwt, jwe, or jws) +
+
+
+

PSKSecurityScheme

+

+ Pre-shared key authentication security configuration identified by the + Vocabulary Term + psk (i.e., "scheme": "psk"). This is meant to identify that a standard is used + for pre-shared keys such as TLS-PSK [[RFC4279]], and that the ciphersuite used for keys will be + established during protocol negotiation. +

+ + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in PSKSecurityScheme Level +
Vocabulary termDescriptionAssignmentType
identityIdentifier providing information which can be used for selection or confirmation.optional + string +
+
+
+

OAuth2SecurityScheme

+

+ OAuth 2.0 authentication security configuration for systems conformant with [[!RFC6749]] and [[!RFC8252]], + + identified by the Vocabulary Term oauth2 (i.e., "scheme": "oauth2"). +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in OAuth2SecurityScheme Level +
Vocabulary termDescriptionAssignmentType
authorization + URI of the authorization server. + optional + anyURI +
tokenURI of the token server.optional + anyURI +
refreshURI of the refresh server.optional + anyURI +
scopes + Set of authorization scope identifiers provided as an array. These are provided in tokens returned + by an authorization server and associated with forms in order to identify what resources a client + may access and how. The values associated with a form SHOULD be chosen from those defined in an + OAuth2SecurityScheme active on that form. + optional + string or + Array of + string +
flowAuthorization flow.mandatory + string + (e.g., code, or client) +
+

+ For the code flow both authorization and token + vocabulary terms MUST be included. + For the client flow token vocabulary term MUST be included. + For the client flow authorization vocabulary term MUST NOT be + included. + + The mandatory elements for each flow are summarized in the following table: +

+ - - + + + - - - - + + + + - - + + + + - -
FormatContent TypeElementcodeclient
JSON/CBOR - application/json
- application/ld+json
- application/senml+json
- application/cbor
- application/senml+cbor
-
authorizationmandatoryomit
XML/EXI - application/xml
- application/senml+xml
- application/exi
- application/senml-exi
-
tokenmandatorymandatory
- - -

DataSchema

Metadata that describes the data format used. It can - be used for validation.

- - - - - - - - - - - -
Vocabulary Terms in DataSchema Level
Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types)optionalstring or Array of string
titleProvides a human-readable title (e.g., display - a text for UI representation) based on a default - language.optionalstring
titlesProvides multi-language human-readable titles - (e.g., display a text for UI representation in - different languages). Also see MultiLanguage.optionalMap of MultiLanguage
descriptionProvides additional (human-readable) - information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) - information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage
constProvides a constant value.optionalany type
defaultSupply a default value. The value SHOULD validate against the data schema in which it resides.optionalany type
unitProvides unit information that is used, e.g., - in international science, engineering, and - business. To preserve uniqueness, it is recommended that - the value of the unit points to a semantic definition (also see Section Semantic Annotations).optionalstring
oneOfUsed to ensure that the data is valid against - one of the specified schemas in the array. This can be used to describe multiple input or output schemas.optionalArray of DataSchema
enumRestricted set of values provided as an - array.optionalArray of any type
readOnlyBoolean value that is a hint to indicate - whether a property interaction / value is read only - (=true) or not (=false).with defaultboolean
writeOnlyBoolean value that is a hint to indicate - whether a property interaction / value is write - only (=true) or not (=false).with defaultboolean
formatAllows validation based on a format pattern - such as "date-time", "email", "uri", etc. (Also see - below.)optionalstring
typeAssignment of JSON-based data types compatible - with JSON Schema (one of boolean, integer, number, - string, object, array, or null).optionalanyURI (one of object, array, string, number, integer, boolean, or null)

The class DataSchema has the following subclasses:

The format string values are known from a - fixed set of values and their corresponding format rules - defined in [JSON-SCHEMA] - (Section 7.3 Defined Formats in particular). Servients MAY use the - format value to perform additional - validation accordingly. When a value that is - not found in the known set of values is assigned to - format, such a validation SHOULD succeed.

- Vocabulary terms typed as any type (e.g., const, default) follow data types compatible with JSON Schema (boolean, integer, number, string, object, array, or null). -

The format term is not widely implemented by JSON Schema tools. - In addition, the term format is being discussed by the JSON Schema standardisation community and may be replaced by another mechanism or removed in a future JSON Schema version.

-

ArraySchema

Metadata describing data of type Array. This - Subclass is indicated by the - value array assigned to type in - DataSchema instances.

- -
Vocabulary Terms in ArraySchema Level
Vocabulary termDescriptionAssignmentType
itemsUsed to define the characteristics of an - array.optionalDataSchema or Array of DataSchema
minItemsDefines the minimum number of items that have - to be in the array.optionalunsignedInt
maxItemsDefines the maximum number of items that have - to be in the array.optionalunsignedInt
-

BooleanSchema

Metadata describing data of type boolean. - This Subclass is indicated by the - value boolean assigned to type - in DataSchema instances.

-

NumberSchema

Metadata describing data of type number. - This Subclass is indicated by the - value number assigned to type - in DataSchema instances.

- - - -
Vocabulary Terms in NumberSchema Level
Vocabulary termDescriptionAssignmentType
minimumSpecifies a minimum numeric value, representing an inclusive lower limit. Only - applicable for associated number or integer - types.optionaldouble
exclusiveMinimumSpecifies a minimum numeric value, representing an exclusive lower limit. Only - applicable for associated number or integer - types.optionaldouble
maximumSpecifies a maximum numeric value, representing an inclusive upper limit. Only - applicable for associated number or integer - types.optionaldouble
exclusiveMaximumSpecifies a maximum numeric value, representing an exclusive upper limit. Only - applicable for associated number or integer - types.optionaldouble
multipleOfSpecifies the multipleOf value number. The value must strictly greater than 0. Only applicable for associated number or integer types.optionaldouble
-

IntegerSchema

Metadata describing data of type integer. - This Subclass is indicated by the - value integer assigned to type - in DataSchema instances.

- - - -
Vocabulary Terms in IntegerSchema Level
Vocabulary termDescriptionAssignmentType
minimumSpecifies a minimum numeric value, representing an inclusive lower limit. Only - applicable for associated number or integer - types.optionalinteger
exclusiveMinimumSpecifies a minimum numeric value, representing an exclusive lower limit. Only - applicable for associated number or integer - types.optionalinteger
maximumSpecifies a maximum numeric value, representing an inclusive upper limit. Only - applicable for associated number or integer - types.optionalinteger
exclusiveMaximumSpecifies a maximum numeric value, representing an exclusive upper limit. Only - applicable for associated number or integer - types.optionalinteger
multipleOfSpecifies the multipleOf value number. The value must strictly greater than 0. Only applicable for associated number or integer types.optionalinteger
-

ObjectSchema

Metadata describing data of type Object. - This Subclass is indicated by the - value object assigned to type - in DataSchema instances.

-
Vocabulary Terms in ObjectSchema Level
Vocabulary termDescriptionAssignmentType
propertiesData schema nested definitions.optionalMap of DataSchema
requiredDefines which members of the object type are mandatory, i.e. which members are mandatory in the payload that is to be sent (e.g. input of invokeaction, writeproperty) and what members will be definitely delivered in the payload that is being received (e.g. output of invokeaction, readproperty)optionalArray of string
-

StringSchema

Metadata describing data of type string. - This Subclass is indicated by the - value string assigned to type - in DataSchema instances.

- - - -
Vocabulary Terms in StringSchema Level
Vocabulary termDescriptionAssignmentType
minLengthSpecifies the minimum length of a string. Only applicable for associated string types.optionalunsignedInt
maxLengthSpecifies the maximum length of a string. Only applicable for associated string types.optionalunsignedInt
patternProvides a regular expression to express constraints of the string value. The regular expression must follow the [[ECMA-262]] dialect.optionalstring
contentEncodingSpecifies the encoding used to store the contents, as specified in [[RFC2045]] (Section 6.1) and [[RFC4648]].optionalstring (e.g., 7bit, 8bit, binary, quoted-printable, base16, base32, or base64)
contentMediaTypeSpecifies the MIME type of the contents of a string value, as described in [[RFC2046]].optionalstring (e.g., image/png, or audio/mpeg)

The length of a string (i.e., minLength and - maxLength) is defined as the number - of Unicode code points, as defined by [[RFC8259]]. - Note that some user-perceived characters are composed of more than one Unicode code point. Arbitrary index values might not fall on these grapheme boundaries, so truncation according to maxLength might alter the appearance or meaning of the string. -

-

NullSchema

Metadata describing data of type null. This subclass is indicated by the value null assigned to type in DataSchema instances. - This Subclass describes only one acceptable value, namely null. - It is important to note that null does not mean the absence of a value. It is analogous to null in JavaScript, None in Python, null in Java and nil in Ruby programming languages. - It can be used as part of a oneOf declaration, where it is used to indicate, that the data can also be null.

+ + refresh + optional + optional + + + + +
-
-

Security Vocabulary Definitions

- -

- This specification provides a selection of well-established security mechanisms that are directly built into - protocols eligible as Protocol Bindings for W3C WoT or are widely in use with those protocols. The - current set of HTTP security schemes is partly based on - OpenAPI 3.0.1 - (see also [[?OPENAPI]]). However while the HTTP security schemes, Vocabulary, and syntax given in - this specification share many similarities with OpenAPI, they are not compatible. -

+
+

Hypermedia Controls Vocabulary Definitions

- Generally, security schemes require some form of secure transport to be effective, such as TLS or DTLS. - Requirements for the use of secure transport are given in Section - in this document and in the Security Considerations section of [[wot-architecture11]]. + The present model provides a representation for (typed) Web links and Web forms exposed by a Thing. + The Link class definition reflects a very common subset of the terms defined in Web Linking + [[!RFC8288]]. The defined terms can be used, e.g., to describe the relation to another Thing such as + a Lamp Thing is controlled by a Switch Thing. The Form class corresponds to a + newly introduced form of hypermedia control to manipulate the state of Things (and other Web + resources).

-

SecurityScheme

Metadata describing the configuration of a security - mechanism. The value assigned to the name - scheme MUST be defined within a - Vocabulary - included in the Thing Description, - either in the standard Vocabulary defined - in § 5. TD - Information Model or in a TD Context - Extension. -

- For all security schemes, - any keys, passwords, or other sensitive information directly providing access - MUST NOT be stored in the TD and should instead - be shared and stored out-of-band via other mechanisms. - The purpose of a TD is to describe how to access a Thing if and only if a Consumer - already has authorization, and is not meant be used to grant that authorization. -

Each security scheme object used in a TD defines a set of requirements to be met before access can be granted. - We say a security scheme is satisfied when all its requirements are met. - In some cases requirements from multiple security schemes will have to be met before access can be granted. -

- Security schemes generally may require additional authentication - parameters, such as a password or key. - The location of this information is indicated by the - value associated with the name in, often in combination with the value associated with name. - The value associated with in can take one of the following values: -

-
-
header:
-
The parameter will be given - in a header provided by the protocol, with the name of the header - provided by the value of name.
-
query:
-
The parameter will be appended to the URI as a query parameter, with the name of the - query parameter provided by name.
-
body:
-
The parameter will be provided in the body of the request payload, with the data schema element - used provided by name. - When used in the context of a - body security information location, the value of name - MUST be in the form of a JSON pointer [[!RFC6901]] relative to - the root of the input DataSchema for each interaction it is used with. - Since this value is not a fragment identifier, and is not relative to the root of the TD but - to whichever data schemas the security scheme is bound to, this value should not start with #; - it is a "pure" JSON pointer. - Since this value is not a fragment identifier, it also does not - need to URL-encode special characters. - The targeted element may or may not already exist at the specified location in the referenced object or array schema (consequently the mechanism is not applicable to simple types). - If it does not, it will be inserted. This avoids having to duplicate definitions in the data schemas of - every interaction. - When an element - of a data schema indicated by a JSON pointer indicated in a body locator - does not already exist in the indicated schema, it MUST - be possible to insert the indicated element - at the location indicated by the pointer. - The JSON pointer - used in the body locator MAY - use the "-" character to indicate a non-existent array element when - it is necessary to insert an element after the last element of an existing array. - - The element referenced - (or created) by a - body security information location - MUST be required and of type "string". - If name is not given, it is assumed the entire body - is to be used as the security parameter. -
-
cookie:
-
The parameter is stored in a cookie identified by the value of - name. -
-
uri:
-
The parameter is embedded in the URI itself, which is encoded in the - relevant interaction using a URI template variable defined by the value of name. - This is more general than the query mechanism but more complex. - The value uri - SHOULD be specified - for the name in in a security scheme only if - query is not applicable. - The URIs provided - in interactions where a security scheme using uri as the value for in - MUST be a URI template including the defined variable. - -
-
auto:
-
The location is determined as part of the protocol, or negotiated. - If a value of auto - is set for the in field of a SecurityScheme, - then the name field SHOULD NOT be set. - In this case, the application of the SecurityScheme is subject to - the respective specification for the given protocol (e.g. [[!RFC8288]] when using the - BasicSecurityScheme with HTTP). -
-
-

- If multiple parameters are needed for a security scheme, repeat the security scheme definition for - each parameter and combine them using a combo security scheme and allOf. - In some cases parameters may not actually be secret but a user may wish to leave them - out of the TD to help protect privacy. As an example of this, some security mechanisms - require both a client identifier and a secret key. In theory, the client identifier is - public however it may be hard to update and pose a tracking risk. In such a case it can - be provided as an additional security parameter so it does not appear in the TD. -

- The names of URI variables - declared in a SecurityScheme - MUST be distinct from all other URI variables - declared in the TD.

- - -
Vocabulary Terms in SecurityScheme Level
Vocabulary termDescriptionAssignmentType
@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring or Array of string
descriptionProvides additional (human-readable) - information based on a default language.optionalstring
descriptionsCan be used to support (human-readable) - information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage
proxyURI of the proxy server this security - configuration provides access to. If not given, the - corresponding security configuration is for the - endpoint.optionalanyURI
schemeIdentification of the security mechanism being - configured.mandatorystring (e.g., nosec, combo, basic, digest, bearer, psk, oauth2, apikey, or auto)

The class SecurityScheme has the following subclasses:

-

NoSecurityScheme

A security configuration corresponding to identified - by the Vocabulary Term - nosec (i.e., "scheme": - "nosec"), indicating there is no authentication or - other mechanism required to access the resource.

-

AutoSecurityScheme

An automatic authentication security configuration identified by the term auto (i.e., "scheme": "auto"). This scheme indicates that the security parameters are going to be negotiated by the underlying protocols at runtime, subject to the respective specifications for the protocol (e.g. [[!RFC8288]] for Basic Authentication when using HTTP).

-

ComboSecurityScheme

A combination of other security schemes identified by the Vocabulary Term combo (i.e., "scheme": "combo"). Elements of this scheme define various ways in which other named schemes defined in securityDefinitions, including other ComboSecurityScheme definitions, are to be combined to create a new scheme definition. Exactly one of either oneOf or allOf vocabulary terms MUST be included. Only security scheme definitions which can be used together can be combined with allOf. For example, it is not possible in general to combine different OAuth 2.0 flows together using allOf unless one applies to a proxy and one to the endpoint. Note that when multiple named security scheme definitions are listed in a security field the same semantics apply as in an allOf combination (and the same limitations on allowable combinations). The oneOf combination is equivalent to using different security schemes on forms that are otherwise identical. In this sense a oneOf scheme is not an essential feature but it does avoid redundancy in such cases.

-
Vocabulary Terms in ComboSecurityScheme Level
Vocabulary termDescriptionAssignmentType
oneOfArray of two or more strings identifying other named security scheme definitions, any one of which, when satisfied, will allow access. Only one may be chosen for use.mandatoryArray of string
allOfArray of two or more strings identifying other named security scheme definitions, all of which must be satisfied for access.mandatoryArray of string
-

BasicSecurityScheme

Basic Authentication [RFC7617] - security configuration identified by the Vocabulary Term basic (i.e., - "scheme": "basic"), using an unencrypted - username and password.

-
Vocabulary Terms in BasicSecurityScheme Level
Vocabulary termDescriptionAssignmentType
nameName for query, header, cookie, or uri - parameters.optionalstring
inSpecifies the location of security - authentication information. with defaultstring (one of header, query, body, cookie, or auto)
-

DigestSecurityScheme

Digest Access Authentication [RFC7616] - security configuration identified by the Vocabulary Term digest (i.e., - "scheme": "digest"). This scheme is similar - to basic authentication but with added features to avoid - man-in-the-middle attacks.

- -
Vocabulary Terms in DigestSecurityScheme Level
Vocabulary termDescriptionAssignmentType
nameName for query, header, cookie, or uri - parameters.optionalstring
inSpecifies the location of security - authentication information. with defaultstring (one of header, query, body, cookie, or auto)
qopQuality of protection.with defaultstring (one of auth, or auth-int)
-

APIKeySecurityScheme

API key authentication security configuration - identified by the Vocabulary Term - apikey (i.e., "scheme": - "apikey"). - This scheme is to be used when the access token is opaque, - for example when a key in an unknown or proprietary format is provided by a cloud service provider. - In this case the key may not be using a standard token format. - This scheme indicates that the key provided by the service provider - needs to be supplied as part - of service requests using the mechanism indicated by the "in" field.

-
Vocabulary Terms in APIKeySecurityScheme Level
Vocabulary termDescriptionAssignmentType
nameName for query, header, cookie, or uri - parameters.optionalstring
inSpecifies the location of security - authentication information. with defaultstring (one of header, query, body, cookie, uri, or auto)
-

BearerSecurityScheme

Bearer Token [RFC6750] - security configuration identified by the Vocabulary Term bearer (i.e., - "scheme": "bearer") for situations where - bearer tokens are used independently of OAuth2. If the - oauth2 scheme is specified it is not - generally necessary to specify this scheme as well as it - is implied. For format, the value - jwt indicates conformance with - [RFC7519], - jws indicates conformance with - [RFC7797], - cwt indicates conformance with - [RFC8392], and - jwe indicates conformance with - [RFC7516], with - values for alg interpreted consistently with - those standards. Other formats and - algorithms for bearer tokens MAY be specified in vocabulary - extensions.

- - - -
Vocabulary Terms in BearerSecurityScheme Level
Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
nameName for query, header, cookie, or uri - parameters.optionalstring
inSpecifies the location of security - authentication information. with defaultstring (one of header, query, body, cookie, or auto)
algEncoding, encryption, or digest algorithm.with defaultstring (e.g., ES256, or ES512-256)
formatSpecifies format of security authentication - information.with defaultstring (e.g., jwt, cwt, jwe, or jws)
-

PSKSecurityScheme

Pre-shared key authentication security configuration - identified by the Vocabulary Term - psk (i.e., "scheme": - "psk"). - This is meant to identify that a standard is used for pre-shared keys such as TLS-PSK [[RFC4279]], - and that the ciphersuite used for keys will be established during protocol negotiation.

Vocabulary Terms in PSKSecurityScheme Level
Vocabulary termDescriptionAssignmentType
identityIdentifier providing information which can be - used for selection or confirmation.optionalstring
-

OAuth2SecurityScheme

OAuth 2.0 authentication security configuration - for systems conformant with [[!RFC6749]] and [[!RFC8252]], identified - by the Vocabulary Term oauth2 (i.e., - "scheme": "oauth2").

- - - -
Vocabulary Terms in OAuth2SecurityScheme Level
Vocabulary termDescriptionAssignmentType
authorizationURI of the authorization server.optionalanyURI
tokenURI of the token server.optionalanyURI
refreshURI of the refresh server.optionalanyURI
scopesSet of authorization scope identifiers provided - as an array. These are provided in tokens returned - by an authorization server and associated with - forms in order to identify what resources a client - may access and how. The values associated with a - form SHOULD be chosen from those defined in an - OAuth2SecurityScheme active on that - form.optionalstring or Array of string
flowAuthorization flow.mandatorystring (e.g., code, or client)

For - the code flow both authorization and token vocabulary terms - MUST be included. For - the client flow token vocabulary term MUST be included. - For the - client flow authorization vocabulary term MUST NOT be included. - The mandatory elements for each flow are summarized in the - following table: +

+

Link

+

+ A link can be viewed as a statement of the form "link context has a + relation type resource at link target", where the optional target attributes may further describe the resource. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in Link Level +
Vocabulary termDescriptionAssignmentType
+

+ The hreflang attribute is allowed to be a string or array in this + version of the spec. Depending on the result of [[LINKSET-MEDIA-TYPES]] the values of + hrefLang can be restricted to array only.

-
Elementcodeclient
authorizationmandatoryomit
tokenmandatorymandatory
refreshoptionaloptional
-
-
- -
-

Hypermedia Controls Vocabulary Definitions

- -

- The present model provides a representation for (typed) Web links and Web forms exposed by a Thing. - The Link class definition reflects a very common subset of the terms defined in Web Linking - [[!RFC8288]]. The defined terms can be used, e.g., to describe the relation to another Thing such as - a Lamp Thing is controlled by a Switch Thing. The Form class corresponds to a - newly introduced form of hypermedia control to manipulate the state of Things (and other Web - resources). -

- - -

Link

A link can be viewed as a statement of the form - "link context has a relation - type resource at link target", - where the optional target attributes may - further describe the resource.

- - - - -
Vocabulary Terms in Link Level
Vocabulary termDescriptionAssignmentType

- The hreflang attribute is allowed to be a string or array in this version of the spec. Depending on the result of [[LINKSET-MEDIA-TYPES]] the values of hrefLang can be restricted to array only. -

-

Link relations can be used to describe relations such as to other Things (e.g., a Switch Thing controls a Lamp Thing), to a specific kind of Thing Models (e.g., a Thing Description - is an instance of a specific Thing Model), or to further documentations information (e.g., device manual of a Thing). It is recommended to reuse existing and established - Link Relation definitions from IANA. -

-

In the following a best practice relation type table is introduced that is recommended to use within WoT Thing Description - or Thing Model instances. -

- - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
Best practice relation type table
ValueOccurrenceExplanationSource of value origin
+

+ Link relations can be used to describe relations such as to other Things (e.g., a Switch Thing controls a + Lamp Thing), to a specific kind of Thing Models (e.g., a Thing Description is an instance of a specific + Thing Model), or to further documentations information (e.g., device manual of a Thing). It is recommended + to reuse existing and established + Link Relation definitions from IANA. +

+

+ In the following a best practice relation type table is introduced that is recommended to use within WoT + Thing Description or Thing Model instances. +

+ + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - -
+ Best practice relation type table +
ValueOccurrenceExplanationSource of value origin
icon - - 0..* - Imports an icon associated to the Thing (e.g., for UI purposes). + 0..*Imports an icon associated to the Thing (e.g., for UI purposes). IANA Link Relation -
+
service-doc - - 0..* - Relation to a resource that provide (human-readable) documentation or descriptions. + 0..*Relation to a resource that provide (human-readable) documentation or descriptions. IANA Link Relation -
+
alternate - - 0..* - Point to alternative representation of the Thing (i.e. RDF-Turtle, human-readable HTML document, ...). + 0..* + Point to alternative representation of the Thing (i.e. RDF-Turtle, human-readable HTML + document, ...). + IANA Link Relation -
+
type - - 0..1 - Indicate that the Thing is an instance of the target resource such as to a Thing Model. + 0..1 + Indicate that the Thing is an instance of the target resource such as to a + Thing Model. + IANA Link Relation -
+
tm:extends - - 0..1 - Extends an existing definition of the target resource such as a Thing Model. Only applicable for Thing Model definitions. - W3C WoT Thing Model -
+ 0..1 + Extends an existing definition of the target resource such as a Thing Model. Only applicable + for Thing Model definitions. + W3C WoT Thing Model
tm:submodel - - 0..* - Used to compose one or multiple Thing Models. Only applicable for Thing Model definitions. - W3C WoT Thing Model -
+ 0..* + Used to compose one or multiple Thing Models. Only applicable for Thing Model definitions. + W3C WoT Thing Model
manifest - - 0..* - Point to the web app manifest of a web application which provides, e.g., a user interface with which a user can interact with the Thing (also see [[APPMANIFEST]]). + 0..* + Point to the web app manifest of a web application which provides, e.g., a user interface with which + a user can interact with the Thing (also see [[APPMANIFEST]]). + IANA Link Relation -
+
proxy-to - - 0..* - Target resource provide the address of a proxy. Additional security metadata can be provided using the proxy field in a SecurityScheme. - W3C WoT Security and WoT Binding Template -
+ 0..* + Target resource provide the address of a proxy. Additional security metadata can be provided using + the proxy field in a SecurityScheme. + W3C WoT Security and WoT Binding Template
collection - - 0..1 - Points to a collections of Things. - IANA Link Relation -
- item - - 0..* - Points to a Thing that is member of the current Thing collections. - IANA Link Relation -
- predecessor-version - - 0..1 - Points to a previous Thing Description or Thing Model version. - IANA Link Relation -
- controlledBy - - 0..* - Refers to a Thing that controls the context Thing. - W3C Thing Description -
- -

Form

A form can be viewed as a statement of "To perform an - operation type operation on form - context, make a request method - request to submission target" where the - optional form fields may further describe - the required request. In Thing Descriptions, the - form context is the surrounding Object, - such as Properties, Actions, and Events or the Thing - itself for meta-interactions.

- - - - - - - -
Vocabulary Terms in Form Level
Vocabulary termDescriptionAssignmentType
hrefTarget IRI of a link or submission target of a - form.mandatoryanyURI
contentTypeAssign a content type based on a media type - (e.g., text/plain) and potential - parameters (e.g., charset=utf-8) for - the media type [RFC2046].with defaultstring
contentCodingContent coding values indicate an encoding - transformation that has been or can be applied to a - representation. Content codings are primarily used - to allow a representation to be compressed or - otherwise usefully transformed without losing the - identity of its underlying media type and without - loss of information. Examples of content coding - include "gzip", "deflate", etc. .optionalstring
securitySet of security definition names, chosen from - those defined in securityDefinitions. - These must all be satisfied for access to resources.optionalstring or Array of string
scopesSet of authorization scope identifiers provided - as an array. These are provided in tokens returned - by an authorization server and associated with - forms in order to identify what resources a client - may access and how. The values associated with a - form SHOULD be chosen from those defined in an - OAuth2SecurityScheme active on that - form.optionalstring or Array of string
responseThis optional term can be used if, e.g., the - output communication metadata differ from input - metadata (e.g., output contentType differ from the - input contentType). The response name contains - metadata that is only valid for the primary response - messages.optionalExpectedResponse
additionalResponsesThis optional term can be used if additional expected responses - are possible, e.g. for error reporting. Each additional response needs to be - distinguished from others in some way (for example, by specifying - a protocol-specific error code), and may also have its own data schema.optionalArray of AdditionalExpectedResponse
subprotocolIndicates the exact mechanism by which an - interaction will be accomplished for a given - protocol when there are multiple options. For - example, for HTTP and Events, it indicates which of - several available mechanisms should be used for - asynchronous notifications such as long polling - (longpoll), WebSub [websub] - (websub), Server-Sent Events - (sse) [html] (also known as - EventSource). Please note that there is no - restriction on the subprotocol selection and other - mechanisms can also be announced by this - subprotocol term.optionalstring (e.g., longpoll, websub, or sse)
opIndicates the semantic intention of performing - the operation(s) described by the form. For - example, the Property interaction allows get and - set operations. The protocol binding may contain a - form for the get operation and a different form for - the set operation. The op attribute indicates which - form is for which and allows the client to select - the correct form for the operation required. op can - be assigned one or more interaction verb(s) each - representing a semantic intention of an - operation.with defaultstring or Array of string (one of readproperty, writeproperty, observeproperty, unobserveproperty, invokeaction, queryaction, cancelaction, subscribeevent, unsubscribeevent, readallproperties, writeallproperties, readmultipleproperties, writemultipleproperties, observeallproperties, unobserveallproperties, subscribeallevents, unsubscribeallevents, or queryallactions)

Possible values for the contentCoding - property can be found, e.g., in the - IANA HTTP content coding registry.

-

The list of possible operation types of a form is - fixed. As of this version of the specification, it only - includes the well-known types necessary to implement the - WoT interaction model described in [wot-architecture11]. - Future versions of the standard may extend this list but - operations types - MUST be restricted to the values in the - table below.

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Well-known operation types
Operation TypeDescription
readpropertyIdentifies the read operation on - Property Affordances to retrieve the - corresponding data.
writepropertyIdentifies the write operation on - Property Affordances to update the - corresponding data.
observepropertyIdentifies the observe operation on - Property Affordances to be notified with - the new data when the Property is - updated.
unobservepropertyIdentifies the unobserve - operation on Property Affordances to stop - the corresponding notifications.
invokeactionIdentifies the invoke operation on - Action Affordances to perform the - corresponding action.
queryactionIdentifies the querying operation on - Action Affordances to get the status of the - corresponding action.
cancelactionIdentifies the cancel operation on - Action Affordances to cancel the ongoing - corresponding action.
subscribeeventIdentifies the subscribe operation - on Event Affordances to be notified by - the Thing when the event occurs.
unsubscribeeventIdentifies the unsubscribe - operation on Event Affordances to stop - the corresponding notifications.
readallpropertiesIdentifies the readallproperties - operation on a Thing to retrieve the - data of all Properties in a single interaction.
writeallpropertiesIdentifies the writeallproperties - operation on a Thing to update the - data of all writable Properties in a single interaction.
readmultiplepropertiesIdentifies the readmultipleproperties - operation on a Thing to retrieve the - data of selected Properties in a single interaction.
writemultiplepropertiesIdentifies the writemultipleproperties - operation on a Thing to update the - data of selected writable Properties in a single interaction.
observeallpropertiesIdentifies the observeallproperties operation on - Properties to be notified with new data when any Property is - updated.
unobserveallpropertiesIdentifies the unobserveallproperties operation on - Properties to stop notifications from all Properties in a - single interaction.
queryallactionsIdentifies the queryallactions operation on a Thing to get the status of - all Actions in a single interaction.
subscribealleventsIdentifies the subscribeallevents operation on Events to subscribe - to notifications from all Events in a single interaction.
unsubscribealleventsIdentifies the unsubscribeallevents operation on Events to unsubscribe - from notifications from all Events in a single interaction.
-
+
0..1Points to a collections of Things. + IANA Link Relation +
+ item + 0..*Points to a Thing that is member of the current Thing collections. + IANA Link Relation +
+ predecessor-version + 0..1Points to a previous Thing Description or Thing Model version. + IANA Link Relation +
+ controlledBy + 0..*Refers to a Thing that controls the context Thing.W3C Thing Description
+
+
+

Form

+

+ A form can be viewed as a statement of "To perform an operation type operation on + form context, make a request method request to submission target" where the optional form fields may further describe the required request. In Thing + Descriptions, the form context is the surrounding Object, such as Properties, Actions, and + Events or the Thing itself for meta-interactions. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in Form Level +
Vocabulary termDescriptionAssignmentType
hrefTarget IRI of a link or submission target of a form.mandatory + anyURI +
contentType + Assign a content type based on a media type (e.g., text/plain) and potential parameters + (e.g., charset=utf-8) for the media type [RFC2046]. + with default + string +
contentCoding + Content coding values indicate an encoding transformation that has been or can be applied to a + representation. Content codings are primarily used to allow a representation to be compressed or + otherwise usefully transformed without losing the identity of its underlying media type and without + loss of information. Examples of content coding include "gzip", "deflate", etc. . + optional + string +
security + Set of security definition names, chosen from those defined in securityDefinitions. + These must all be satisfied for access to resources. + optional + string or + Array of + string +
scopes + Set of authorization scope identifiers provided as an array. These are provided in tokens returned + by an authorization server and associated with forms in order to identify what resources a client + may access and how. The values associated with a form SHOULD be chosen from those defined in an + OAuth2SecurityScheme active on that form. + optional + string or + Array of + string +
response + This optional term can be used if, e.g., the output communication metadata differ from input + metadata (e.g., output contentType differ from the input contentType). The response name contains + metadata that is only valid for the primary response messages. + optional + ExpectedResponse +
additionalResponses + This optional term can be used if additional expected responses are possible, e.g. for error + reporting. Each additional response needs to be distinguished from others in some way (for example, + by specifying a protocol-specific error code), and may also have its own data schema. + optional + Array of AdditionalExpectedResponse +
subprotocol + Indicates the exact mechanism by which an interaction will be accomplished for a given protocol when + there are multiple options. For example, for HTTP and Events, it indicates which of several + available mechanisms should be used for asynchronous notifications such as long polling + (longpoll), WebSub [websub] (websub), Server-Sent Events (sse) [html] (also known as EventSource). Please note that there is no restriction on the subprotocol + selection and other mechanisms can also be announced by this subprotocol term. + optional + string + (e.g., longpoll, websub, or sse) +
op + Indicates the semantic intention of performing the operation(s) described by the form. For example, + the Property interaction allows get and set operations. The protocol binding may contain a form for + the get operation and a different form for the set operation. The op attribute indicates which form + is for which and allows the client to select the correct form for the operation required. op can be + assigned one or more interaction verb(s) each representing a semantic intention of an operation. + with default + string or + Array of + string (one + of readproperty, writeproperty, observeproperty, + unobserveproperty, invokeaction, queryaction, + cancelaction, subscribeevent, unsubscribeevent, + readallproperties, writeallproperties, + readmultipleproperties, writemultipleproperties, + observeallproperties, unobserveallproperties, + subscribeallevents, unsubscribeallevents, or queryallactions) +
+

+ Possible values for the contentCoding property can be found, e.g., in the + + IANA HTTP content coding registry. +

+

+ The list of possible operation types of a form is fixed. As of this version of the specification, it only + includes the well-known types necessary to implement the WoT interaction model described in [wot-architecture11]. Future versions of the standard may extend this list but + operations types MUST be restricted to the values in the table below. +

-

- A Thing Description of a WoT producer may have multiple forms entries with, e.g., different - protocol and/or content types declarations that a Consumer could possibly support. In that case - the Consumer may choose any form entry that works (e.g., the protocol and content type is supported) for them. - When one form is chosen, it is expected that the Consumer will continue to use it as long as possible - for every new interaction with the WoT producer. -

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Well-known operation types +
Operation TypeDescription
readpropertyIdentifies the read operation on Property Affordances to retrieve the corresponding data.
writepropertyIdentifies the write operation on Property Affordances to update the corresponding data.
observeproperty + Identifies the observe operation on Property Affordances to be notified with the new data when the + Property is updated. +
unobserveproperty + Identifies the unobserve operation on Property Affordances to stop the corresponding + notifications. +
invokeactionIdentifies the invoke operation on Action Affordances to perform the corresponding action.
queryaction + Identifies the querying operation on Action Affordances to get the status of the corresponding + action. +
cancelaction + Identifies the cancel operation on Action Affordances to cancel the ongoing corresponding action. +
subscribeevent + Identifies the subscribe operation on Event Affordances to be notified by the Thing when the event + occurs. +
unsubscribeevent + Identifies the unsubscribe operation on Event Affordances to stop the corresponding notifications. +
readallproperties + Identifies the readallproperties operation on a Thing to retrieve the data of all Properties in a + single interaction. +
writeallproperties + Identifies the writeallproperties operation on a Thing to update the data of all writable + Properties in a single interaction. +
readmultipleproperties + Identifies the readmultipleproperties operation on a Thing to retrieve the data of selected + Properties in a single interaction. +
writemultipleproperties + Identifies the writemultipleproperties operation on a Thing to update the data of selected + writable Properties in a single interaction. +
observeallproperties + Identifies the observeallproperties operation on Properties to be notified with new data when any + Property is updated. +
unobserveallproperties + Identifies the unobserveallproperties operation on Properties to stop notifications from all + Properties in a single interaction. +
queryallactions + Identifies the queryallactions operation on a Thing to get the status of all Actions in a single + interaction. +
subscribeallevents + Identifies the subscribeallevents operation on Events to subscribe to notifications from all + Events in a single interaction. +
unsubscribeallevents + Identifies the unsubscribeallevents operation on Events to unsubscribe from notifications from all + Events in a single interaction. +
+
-
-

Mapping op Values to Data Schemas

+

+ A Thing Description of a WoT producer may have multiple forms entries with, e.g., different + protocol and/or content types declarations that a Consumer could possibly support. In that case the + Consumer may choose any form entry that works (e.g., the protocol and content type is supported) for them. + When one form is chosen, it is expected that the Consumer will continue to use it as long as + possible for every new interaction with the WoT producer. +

-

- Protocols that can be used with TDs follow request-response or eventing mechanisms. - The Data Schema of an affordance generally correlates with the op keywords used in forms. - The table below informatively summarizes the available data schema related terms with the op keywords. -

-
    -
  • Consumer to Thing applies for messages sent by the Consumer to the Thing, such as the value for writing a property.
  • -
  • Thing to Consumer applies for messages sent by the Thing to the Consumer, such as the value of a property value as the result of reading a property.
  • -
  • In case that there is no correlation with the data schema and the operation, it implies that no payload is required for executing the operation or no - payload is expected as a result of the operation.
  • -
+
+

Mapping op Values to Data Schemas

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mapping op Values to Data Schemas
Operation TypeConsumer to Thing DataSchema CorrelationThing to Consumer DataSchema Correlation
readpropertyNo correlation.All fields in the Property Affordance without "writeOnly":true.
writepropertyAll fields in the Property Affordance without "readOnly":true.No correlation. additionalResponses can be used in the form level.
observepropertyNo correlation.All fields in the Property Affordance without "writeOnly":true.
unobservepropertyNo correlation.No correlation.
invokeactionValue of the input key.Value of the output key.
queryactionNo correlation.No correlation. additionalResponses can be used in the form level.
cancelactionNo correlation.No correlation. additionalResponses can be used in the form level.
subscribeeventValue of the subscription key with all fields without "readOnly":trueValue of the subscription key with all fields without "writeOnly":true
unsubscribeeventValue of the subscription key with all fields without "readOnly":trueValue of the subscription key with all fields without "writeOnly":true
-

- Writing to a property does not necessarily mean that a new value will be sent to the Consumer observing the property. - It depends on the protocol and implementation. -

-

- Further specification of how to map operations to data schemas, as well as mapping meta operations such as readallproperties - can be found in the respective protocol specification of the [[WOT-BINDING-TEMPLATES]]. -

-
+

+ Protocols that can be used with TDs follow request-response or eventing mechanisms. The Data Schema of + an affordance generally correlates with the op keywords used in forms. The + table below informatively summarizes the available data schema related terms with the + op keywords. +

+
    +
  • + Consumer to Thing applies for messages sent by the Consumer to the Thing, such as the value for + writing a property. +
  • +
  • + Thing to Consumer applies for messages sent by the Thing to the Consumer, such as the value of a + property value as the result of reading a property. +
  • +
  • + In case that there is no correlation with the data schema and the operation, it implies that no + payload is required for executing the operation or no payload is expected as a result of the + operation. +
  • +
-
-

Response-related Terms Usage

- -

The optional response name-value pair can - be used to provide metadata for the expected response - message. - With the core vocabulary, it only includes - content type information, but TD Context Extensions could - be applied. If no - response name-value pair is provided, it - MUST be assumed - that the content type of the response is equal to the - content type assigned to the Form instance. Note - that contentType within an - ExpectedResponse - Class does not - have a Default Value. For instance, if - the value of the content type of the form is - application/xml the assumed value of the - content type of the response will be also - application/xml.

-

- In some cases additional responses might be possible. - One example of this is error responses but in some cases - there might also be additional successful responses. - In this case, the response name-value pair - is still used for the primary response but - additionalResponses may also be provided, - whose value is an array of AdditionalExpectedResponse - objects. - Each additional response must be distinguished in some way from the primary - response, either by contentType or by - protocol-specific settings such as error code header values. - Each additional response may also have a data schema - which can differ from the normal output data schema for the - interaction. -

-

In some use cases, input and output data might be - represented in a different form, for instance an Action - that accepts JSON, but returns an image. In such a case, - the optional response name-value pair can - describe the content type of the expected response. - If the content type of - the expected response differs from the content type of - the form, the Form instance MUST include a name-value - pair with the name response. - For instance, an ActionAffordance could only - accept application/json for its input data, - while it will respond with an image/jpeg - content type for its output data. In that case the - content types differ and the response - name-value pair has to be used to provide response - content type (image/jpeg) information to the - Consumer.

-

- Similar considerations apply to additional responses, - although in this case the contentType is optional - if it is the same as the input content Type (e.g. JSON). - If the content type of - an additional expected response differs from the content type of - the form, the Form instance MUST include an entry in the array - associated with the name additionalResponses - that includes a value for the name contentType. - If the data schema of - an additional expected response differs from the output data schema of - the interaction, the Form instance MUST include an entry in the array - associated with the name additionalResponses that - includes a value for the name schema. -

-

- The different cases on the variation of request and response are explained above. - The tables at summarize these cases in a concise manner. -

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Mapping op Values to Data Schemas +
Operation TypeConsumer to Thing DataSchema CorrelationThing to Consumer DataSchema Correlation
readpropertyNo correlation.All fields in the Property Affordance without "writeOnly":true.
writepropertyAll fields in the Property Affordance without "readOnly":true.No correlation. additionalResponses can be used in the form level.
observepropertyNo correlation.All fields in the Property Affordance without "writeOnly":true.
unobservepropertyNo correlation.No correlation.
invokeactionValue of the input key.Value of the output key.
queryactionNo correlation.No correlation. additionalResponses can be used in the form level.
cancelactionNo correlation.No correlation. additionalResponses can be used in the form level.
subscribeevent + Value of the subscription key with all fields without "readOnly":true + + Value of the subscription key with all fields without "writeOnly":true +
unsubscribeevent + Value of the subscription key with all fields without "readOnly":true + + Value of the subscription key with all fields without "writeOnly":true +
+

+ Writing to a property does not necessarily mean that a new value will be sent to the Consumer observing + the property. It depends on the protocol and implementation. +

+

+ Further specification of how to map operations to data schemas, as well as mapping meta operations such + as readallproperties + can be found in the respective protocol specification of the [[WOT-BINDING-TEMPLATES]]. +

+
+ +
+

Response-related Terms Usage

+ +

+ The optional response name-value pair can be used to provide metadata for the expected + response message. With the core vocabulary, it only includes content type information, but TD Context + Extensions could be applied. + If no response name-value pair is provided, it MUST be assumed that the content type of + the response is equal to the content type assigned to the Form instance. + Note that contentType within an + ExpectedResponse + Class does not have a + Default Value. For instance, + if the value of the content type of the form is application/xml the assumed value of the + content type of the response will be also application/xml. +

+

+ In some cases additional responses might be possible. One example of this is error responses but in some + cases there might also be additional successful responses. In this case, the + response name-value pair is still used for the primary response but + additionalResponses may also be provided, whose value is an array of + AdditionalExpectedResponse objects. Each additional response must be distinguished in some + way from the primary response, either by contentType or by protocol-specific settings such + as error code header values. Each additional response may also have a data schema which can differ from + the normal output data schema for the interaction. +

+

+ In some use cases, input and output data might be represented in a different form, for instance an + Action that accepts JSON, but returns an image. In such a case, the optional + response name-value pair can describe the content type of the expected response. + If the content type of the expected response differs from the content type of the form, the + Form instance MUST include a name-value pair with + the name response. + For instance, an ActionAffordance could only accept application/json for its + input data, while it will respond with an image/jpeg content type for its output data. In + that case the content types differ and the response + name-value pair has to be used to provide response content type (image/jpeg) information to + the + Consumer. +

+

+ Similar considerations apply to additional responses, although in this case the + contentType is optional if it is the same as the input content Type (e.g. JSON). + If the content type of an additional expected response differs from the content type of the form, the + Form instance MUST include an entry in the array + associated with the name additionalResponses that includes a value for the name + contentType. + If the data schema of an additional expected response differs from the output data schema of the + interaction, the Form instance MUST include an + entry in the array associated with the name additionalResponses that includes a value for + the name schema. +

+

+ The different cases on the variation of request and response are explained above. The tables at + summarize these cases in a concise manner. +

+
+
+
+

ExpectedResponse

+

Communication metadata describing the expected response message for the primary response.

+ + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in ExpectedResponse Level +
Vocabulary termDescriptionAssignmentType
contentType + Assign a content type based on a media type (e.g., text/plain) and potential parameters + (e.g., charset=utf-8) for the media type [RFC2046]. + mandatory + string +
+
+

AdditionalExpectedResponse

+

Communication metadata describing the expected response message for additional responses.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Vocabulary Terms in AdditionalExpectedResponse Level +
Vocabulary termDescriptionAssignmentType
successSignals if an additional response should not be considered an error.with default + boolean +
contentType + Assign a content type based on a media type (e.g., text/plain) and potential parameters + (e.g., charset=utf-8) for the media type [RFC2046]. + with default + string +
schema + Used to define the output data schema for an additional response if it differs from the default + output data schema. Rather than a DataSchema object, the name of a previous definition + given in a schemaDefinitions map must be used. + optional + string +
-

ExpectedResponse

Communication metadata describing the expected - response message for the primary response.

Vocabulary Terms in ExpectedResponse Level
Vocabulary termDescriptionAssignmentType
contentTypeAssign a content type based on a media type - (e.g., text/plain) and potential - parameters (e.g., charset=utf-8) for - the media type [RFC2046].mandatorystring
-

AdditionalExpectedResponse

Communication metadata describing the expected - response message for additional responses.

- -
Vocabulary Terms in AdditionalExpectedResponse Level
Vocabulary termDescriptionAssignmentType
successSignals if an additional response should not be considered an error.with defaultboolean
contentTypeAssign a content type based on a media type - (e.g., text/plain) and potential - parameters (e.g., charset=utf-8) for - the media type [RFC2046].with defaultstring
schemaUsed to define the output data schema - for an additional response if it differs from the default - output data schema. - Rather than a DataSchema object, the - name of a previous definition given in a - schemaDefinitions map must be used.optionalstring
@@ -5437,8 +7129,9 @@

Binding Template Mechanisms

Each Binding Template Subspecification is an independent document that has a separate list of authors - and publication date. This section explains the binding mechanism by giving requirements per respective binding category and links to the respective subspecification. These can be found in sections [[[#protocol-bindings]]], [[[#payload-bindings]]] and - [[[#platform-bindings]]]. + and publication date. This section explains the binding mechanism by giving requirements per respective + binding category and links to the respective subspecification. These can be found in sections + [[[#protocol-bindings]]], [[[#payload-bindings]]] and [[[#platform-bindings]]].

@@ -9595,24 +11288,21 @@

JSON-LD Context Usage

-

Examples of Payloads and Data Schemas from IoT Platforms and Standards

+

Examples of Payloads and Data Schemas from IoT Platforms and Standards

-

- As an extension of [[[#payload-bindings-dataschema]]], this section collects examples of different payloads - and their corresponding DataSchema. - These are from well-known IoT Platforms and Standards and aim to illustrate the various ways a payload can - look like and how one can describe it with a Data Schema. -

+

+ As an extension of [[[#payload-bindings-dataschema]]], this section collects examples of different payloads and + their corresponding DataSchema. These are from well-known IoT Platforms and Standards and aim to + illustrate the various ways a payload can look like and how one can describe it with a Data Schema. +

-

- SenML [[RFC8428]] might use the following construct: -

+

SenML [[RFC8428]] might use the following construct:

- +
- - + - + - + + + -
-
+          
+
                     [
                         {
                             "bn": "/example/light/"
@@ -9626,10 +11316,11 @@ 

Examples of Payloads and Data Schemas from IoT Platforms and Standards

"v": 10 } ] -
-
-
+                    
+
+
                     {
                         "type": "array",
                         "items": [
@@ -9674,21 +11365,20 @@ 

Examples of Payloads and Data Schemas from IoT Platforms and Standards

} ] } -
-
+ -

- A Batch Collection according to OCF[[OCF]] may be structured like this: -

+

A Batch Collection according to OCF[[OCF]] may be structured like this:

- +
- - + - + - + + + -
-
+          
+
                     [
                     {
                         "href": "/example/light/level",
@@ -9703,10 +11393,11 @@ 

Examples of Payloads and Data Schemas from IoT Platforms and Standards

} } ] -
-
-
+                    
+
+
                     {
                     "type": "array",
                     "items": [
@@ -9752,21 +11443,20 @@ 

Examples of Payloads and Data Schemas from IoT Platforms and Standards

} ] } -
-
+ -

- And an IPSO Smart Object on LWM2M [[LWM2M]] might look like the following: -

+

And an IPSO Smart Object on LWM2M [[LWM2M]] might look like the following:

- +
- - + - + - + + + -
-
+          
+
                     {
                     "bn": "/3001/0/",
                     "e": [
@@ -9780,10 +11470,11 @@ 

Examples of Payloads and Data Schemas from IoT Platforms and Standards

} ] } -
-
-
+                    
+
+
                     {
                     "type": "object",
                     "properties": {
@@ -9828,13 +11519,13 @@ 

Examples of Payloads and Data Schemas from IoT Platforms and Standards

} } } -
-
- -
+ +

Recent Specification Changes

diff --git a/proposals/simplified-td/index.html b/proposals/simplified-td/index.html index dddc3160b..10c1baa4b 100644 --- a/proposals/simplified-td/index.html +++ b/proposals/simplified-td/index.html @@ -1,4 +1,4 @@ - + @@ -6,133 +6,158 @@ + th { + border: solid 1px #005a9c; + padding: 4px; + } +

- This document summarizes the discussions on simplifying the JSON-LD 1.0-based WoT Thing Description and proposes a simplified TD serialization based on JSON-LD 1.1. - The proposal lists the features of the TD core model and gives use cases per feature. - The proposed "Simplified TD" serialization is given in the form of extensive examples. - Specification text will be added when merging this proposal into the WoT Thing Description Editors' Draft. - For convenience, examples of the JSON-LD 1.0 serialization and the alternative JSON Web Thing Description (a.k.a. JSON-TD) are given for comparison. - This document concludes with a list of differences in the proposals. + This document summarizes the discussions on simplifying the JSON-LD 1.0-based + WoT Thing Description and proposes a + simplified TD serialization based on JSON-LD 1.1. + The proposal lists the features of the TD core model and gives use cases per feature. The proposed "Simplified + TD" serialization is given in the form of extensive examples. Specification text will be added when merging this + proposal into the WoT Thing Description + Editors' Draft. For convenience, examples of the + JSON-LD 1.0 serialization and the alternative + JSON Web Thing Description (a.k.a. JSON-TD) + are given for comparison. This document concludes with a list of differences in the proposals.

-

+

Introduction

- The WoT Thing Description based on JSON-LD 1.0 has been criticized for several limitations including complexity and the JSON-LD 1.0 array structures and keywords even when no semantic annotations are used. - This lead to an alternative draft, the JSON Web Thing Description, with a pure JSON serialization, which however, would fragment W3C WoT due to incompatible models behind the serializations. - To remedy the situation, this document proposes a simplified TD serialization based on JSON-LD 1.1, - thereby combining both requirements: - machine-understandability through a formal Linked Data model from the original WoT Thing Description and improved usability from the JSON Web Thing Description. - Being able to conduct these simplifications first required a full understanding of the requirements, which have been analyzed by the Working Group since its chartering. - This technical deep-dive completed around TPAC 2017 (Burlingame), where the Working Group announced to change the goal toward simplification from there onward. + The WoT Thing Description based on + JSON-LD 1.0 has been criticized for several limitations including complexity and the JSON-LD 1.0 array + structures and keywords even when no semantic annotations are used. This lead to an alternative draft, the + JSON Web Thing Description, with a pure + JSON serialization, which however, would fragment W3C WoT due to incompatible models behind the serializations. + To remedy the situation, this document proposes a simplified TD serialization based on + JSON-LD 1.1, thereby combining both requirements: + machine-understandability through a formal Linked Data model from the original WoT Thing Description and + improved usability from the JSON Web Thing Description. Being able to conduct these simplifications first + required a full understanding of the requirements, which have been analyzed by the Working Group since its + chartering. This technical deep-dive completed around TPAC 2017 (Burlingame), where the Working Group announced + to change the goal toward simplification from there onward.

Use Cases per TD Feature

- Many discussions are rooted on the question whether a certain feature should be included or not. - This section lists the features currently included in the TD core model and backs them by use cases. + Many discussions are rooted on the question whether a certain feature should be included or not. This section + lists the features currently included in the + TD core model and backs + them by use cases.

Interaction Model

- To represent a contract between applications with programming APIs and IoT devices with network APIs, - the communication with Things must be modeled with a formal interaction model. - This describes not only what data a Thing provides or requires, - but also how to access and manipulate the corresponding internal state of a Thing. + To represent a contract between applications with programming APIs and IoT devices with network APIs, the + communication with Things must be modeled with a formal interaction model. This describes not only + what data a Thing provides or requires, but also how to access and manipulate the + corresponding internal state of a Thing.

- Based on the Web Thing Model - and results of the COMPOSE project - the WoT Interest Group explored a threefold of Interactions, which was - adopted by the WoT Working Group after 2 years of stability: + Based on the Web Thing Model and results of the + COMPOSE project + the WoT Interest Group explored a threefold of Interactions, which was adopted by the WoT Working Group after + 2 years of stability:

Properties

- Properties expose internal state of a Thing that can be directly accessed (get) and optionally manipulated (set). - Things can also choose to make Properties observable by pushing the new state (not an event) after a change; - this must follow eventual consistency (also see CAP Theorem). + Properties expose internal state of a Thing that can be directly accessed (get) and optionally manipulated + (set). Things can also choose to make Properties observable by pushing the new state (not an event) after a + change; this must follow eventual consistency (also see + CAP Theorem).

    -
  • Read-only Properties: state cannot be changed from the outside +
  • + Read-only Properties: state cannot be changed from the outside
    • sensors
    • results computed from internal state
  • -
  • Writable Properties: state needs to be changed directly from the outside +
  • + Writable Properties: state needs to be changed directly from the outside
    • configuration state
    • setpoints
    • -
    • more concise model when intended state can be applied to actual state immediately (no Action needed)
    • +
    • + more concise model when intended state can be applied to actual state immediately (no Action needed) +
  • -
  • Observable Properties: optimize communication through server push +
  • + Observable Properties: optimize communication through server push
    • keep state in sync with relaxed consistency (eventual consistency)
    • directly maps to CoAP Observe
  • -
  • TODO: Recursive Properties: address sub-properties of a complex Property (to be done for Simplified TD) +
  • + TODO: Recursive Properties: address sub-properties of a complex Property (to be done for Simplified TD)
    • nested Properties that are also exposed by the Thing (e.g., LWM2M Devices/IPSO Objects)
    @@ -142,19 +167,22 @@

    Properties

    Actions

    - Actions offer functions of the Thing. - These functions may manipulate the interal state of a Thing in a way that is not possible through setting Properties. - Examples are changing internal state that is not exposed as Property, changing multiple Properties, changing Properties over time or with a process that shall not be disclosed. - Actions may also be pure functions, that is, they do not use any internal state at all, e.g., for processing input data and returning the result directly. + Actions offer functions of the Thing. These functions may manipulate the interal state of a Thing in a way + that is not possible through setting Properties. Examples are changing internal state that is not exposed as + Property, changing multiple Properties, changing Properties over time or with a process that shall not be + disclosed. Actions may also be pure functions, that is, they do not use any internal state at all, e.g., for + processing input data and returning the result directly.

      -
    • Action arguments: the function needs input parameters +
    • + Action arguments: the function needs input parameters
      • write-multiple commands
      • functions with parameters
    • -
    • Action results: the function returns a result +
    • + Action results: the function returns a result
      • read-multiple commands (e.g., CoAP FETCH)
      • sensors that are not based on sampling / fit for Properties (e.g., power-intensive sensors)
      • @@ -162,7 +190,9 @@

        Actions

      • processing functions (e.g., data conversion)
    • -
    • TODO: Monitorable Actions: process can be monitored, changed, canceled once invoked (not in TD core model yet) +
    • + TODO: Monitorable Actions: process can be monitored, changed, canceled once invoked (not in TD core model + yet)
      • physical processes (i.e., intended state can not be applied immediately to actual state)
      • cloud services (e.g., client needs to be sure Thing successfully completes Action)
      • @@ -174,20 +204,22 @@

        Actions

        Events

        - The Event Interaction Pattern describes event sources that asynchronously push messages. - Here not state, but state transitions (events) are communicated (e.g., "clicked"). - Events may be triggered by internal state changes that are not exposed as Properties. - Events usually follow strong consistency, where messages need to be queued to ensure eventual delivery of all occured events. + The Event Interaction Pattern describes event sources that asynchronously push messages. Here not state, but + state transitions (events) are communicated (e.g., "clicked"). Events may be triggered by internal state + changes that are not exposed as Properties. Events usually follow strong consistency, where messages need to + be queued to ensure eventual delivery of all occured events.

          -
        • Events opposed to observable Properties: why two mechanisms +
        • + Events opposed to observable Properties: why two mechanisms
          • Events triggered by state that is not exposed through Properties
          • Separation of consistency requirements
          • Duality of REST and PubSub systems
        • -
        • TODO: Actionable Events: Event not only has data but also Interactions +
        • + TODO: Actionable Events: Event not only has data but also Interactions
          • alerts that need to be confirmed and later marked as resolved
          • events that contain dynamic state (Properties)
          • @@ -200,27 +232,24 @@

            Events

            Data Model

            - Interactions exchange data using representation formats (e.g., JSON), - which are identified by Media Types (e.g., application/json. - Usually, applications use generic serialization formts without - application-specific definitions (cf. JSON). Thus, TDs also needs to - include metadata about the data model used, so-called schemas. + Interactions exchange data using representation formats (e.g., JSON), which are identified by Media Types + (e.g., application/json. Usually, applications use generic serialization formts without + application-specific definitions (cf. JSON). Thus, TDs also needs to include metadata about the data model + used, so-called schemas.

            Representation Formats

            - JSON reflects the state of the art of data interchange formats. - It is not focused on how data is represented by a specific system - (e.g., in 16 bits), but only on the fundamentals of the information. + JSON reflects the state of the art of data interchange formats. It is not focused on how data is represented + by a specific system (e.g., in 16 bits), but only on the fundamentals of the information.

            • Dominant data format on the Web
            • Implementation-independent representation of data

            - CBOR is a concise binary representation that is related to JSON. - It can express all JSON structures, but also has additional - features such as a binary type to improve over base64-encoded blobs. + CBOR is a concise binary representation that is related to JSON. It can express all JSON structures, but + also has additional features such as a binary type to improve over base64-encoded blobs.

            • Compact
            • @@ -230,21 +259,14 @@

              Representation Formats

              Schema

              - A popular validation schema for JSON data is JSON Schema. - It defines a vocabulary and a syntax to specify a schema for data validation - at the syntactic level. -

              -

              - The Web of Things aims at semantic interoperability for Things. For this, - + A popular validation schema for JSON data is JSON Schema. It defines a + vocabulary and a syntax to specify a schema for data validation at the syntactic level.

              +

              The Web of Things aims at semantic interoperability for Things. For this,

              - Directly using the JSON Schema syntax within the TD breaks paradigms. - Two different implementations would be needed to conduct validation. - At least JSON Schema could be reused. - However, semantic queries and resoning could not work on data structures, - that is, make sense of the data in relation to the Thing and its - context. + Directly using the JSON Schema syntax within the TD breaks paradigms. Two different implementations would be + needed to conduct validation. At least JSON Schema could be reused. However, semantic queries and resoning + could not work on data structures, that is, make sense of the data in relation to the Thing and its context.

              • Re-use of JSON Schema vocabulary
              • @@ -256,40 +278,39 @@

                Schema

                Security Metadata

                - The TD has a top-level security field to carry security - metadata such as the required authorization mechanism, authorization - server, required root certificates, etc. + The TD has a top-level security field to carry security metadata such as the required + authorization mechanism, authorization server, required root certificates, etc.

                -
                  -
                • Security
                • -
                • Share controlled acccess to the Thing (authorization, e.g., OAuth)
                • -
                +
                  +
                • Security
                • +
                • Share controlled acccess to the Thing (authorization, e.g., OAuth)
                • +

                Communication Metadata

                - The TD Interactions have a form field to carry protocol-specific metadata such as method used and header fields required. - The concept of machine understandable forms matches the requirement of RAML, Swagger, OpenAPI for RESTful Web APIs. + The TD Interactions have a form field to carry protocol-specific metadata such as method used and + header fields required. The concept of machine understandable forms matches the requirement of RAML, Swagger, + OpenAPI for RESTful Web APIs.

                - The W3C Web of Things was charted to counter the fragmentation in the IoT. - Creating yet another standard does not help here, as existing standards with strong domain-specific knowledge have shown to hold out. - Thus, W3C WoT was charted to describe and complement existing IoT platforms and standards. - For this, a TD must be able to describe how a client can communicate successfully with a server. + The W3C Web of Things was charted to counter the fragmentation in the IoT. Creating yet another standard does + not help here, as existing standards with strong domain-specific knowledge have shown to hold out. Thus, W3C + WoT was charted to describe and complement existing IoT platforms and standards. For this, a TD must be able + to describe how a client can communicate successfully with a server.

                Request Metadata

                - Up to date, not even so-called RESTful Web services managed to follow a single guidline when designing their API. - Requests always have to be tailored for each service (cf. usage of Swagger/OpenAPI). + Up to date, not even so-called RESTful Web services managed to follow a single guidline when designing their + API. Requests always have to be tailored for each service (cf. usage of Swagger/OpenAPI).

                - To reflect this situation in the TD, where a situation similar to RESTful APIs is expected for Things, - a TD is able to include so called form descriptions, which go beyond Web linking: - The not only describe the relation to a target resource and attributes of the target resource, - but also descriptions how to interact with that resource, that is, - how a client has to formulate requests (e.g., header fields or payloads). + To reflect this situation in the TD, where a situation similar to RESTful APIs is expected for Things, a TD + is able to include so called form descriptions, which go beyond Web linking: The not only describe the + relation to a target resource and attributes of the target resource, but also descriptions how to interact + with that resource, that is, how a client has to formulate requests (e.g., header fields or payloads).

                • Compensate for small variations in methods
                • @@ -299,13 +320,13 @@

                  Request Metadata

                  Extension Point

                  - So far, there is no single IoT protocol to rule them all. - The only convergence visible is a trend toward Internet protocols defined by the IETF and other bodies such as OASIS. - Yet still every IoT platform and standard tends to introduce small variations, thereby creating protocol dialects. + So far, there is no single IoT protocol to rule them all. The only convergence visible is a trend toward + Internet protocols defined by the IETF and other bodies such as OASIS. Yet still every IoT platform and + standard tends to introduce small variations, thereby creating protocol dialects.

                  - To allow for convergence of currently deployed IoT protocols and to be future proof for new protocols that might emerge as de facto standards, - the TD has protocol bindings as explicit extension point. + To allow for convergence of currently deployed IoT protocols and to be future proof for new protocols that + might emerge as de facto standards, the TD has protocol bindings as explicit extension point.

                  • Use HTTP long-poll for Events
                  • @@ -318,14 +339,15 @@

                    Extension Point

                    Binding Templates

                    - The WoT Binding Templates document serves as catalog - to pick the right communication metadata for well-known IoT protocols. - The templates provide vocabulary to describe the required protocol stack configuration (e.g., specific header fields) and security mechanisms in the TD. + The WoT Binding Templates document serves as + catalog to pick the right communication metadata for well-known IoT protocols. The templates provide + vocabulary to describe the required protocol stack configuration (e.g., specific header fields) and security + mechanisms in the TD.

                    Binding Templates are mainly expected for dialects of the Web protocols HTTP/1.1, HTTP/2, and CoAP, - standardized sub-protocols for WebSockets, - and widely deployed IoT protocols such as AMQP or MQTT profiles (e.g., Amazon IoT). + standardized sub-protocols for WebSockets, and widely deployed IoT protocols such as AMQP or MQTT profiles + (e.g., Amazon IoT).

                    • Provide a common vocabulary for communication metadata
                    • @@ -336,16 +358,15 @@

                      Binding Templates

                      Semantic Annotations

                      - The Web of Things is centered on things. During runtime, data and metadata are primarily exchanged among machines for machines. - Furthermore, WoT content is produced by a large number of machines. - Thus, machine assistance is also needed for consuming the data and bulding viable business cases. + The Web of Things is centered on things. During runtime, data and metadata are primarily exchanged among + machines for machines. Furthermore, WoT content is produced by a large number of machines. Thus, machine + assistance is also needed for consuming the data and bulding viable business cases.

                      Annotation Framwork

                      - Semantic annotations are based on JSON-LD, which gives meaning to JSON field names and values - by defining the terms used in the @context and linking them to Link Data. - TDs can be annotated as follows: + Semantic annotations are based on JSON-LD, which gives meaning to JSON field names and values by defining + the terms used in the @context and linking them to Link Data. TDs can be annotated as follows:

                      • Thing types in the top-level @type array
                      • @@ -359,37 +380,35 @@

                        Annotation Framwork

                        Extension Point

                        - The W3C has no knowledge in the concrete application domains of Web of Things. - Thus, the W3C is not standardizing any domain-specific vocabulary. + The W3C has no knowledge in the concrete application domains of Web of Things. Thus, the W3C is not + standardizing any domain-specific vocabulary.

                        - Still, domain-specific vocabularies are of utmost importance for semantic interoperability. - Thus, the TD has an explicit extension point that comes for free when using JSON-LD and Linked Data. + Still, domain-specific vocabularies are of utmost importance for semantic interoperability. Thus, the TD has + an explicit extension point that comes for free when using JSON-LD and Linked Data.

                      Web Linking

                      -

                      - The TD now has a top-level link field to carry links to other Web resources. -

                      +

                      The TD now has a top-level link field to carry links to other Web resources.

                      • - In a deployment, Things usually have relations to other Things or entities such as locations, which may have metadata representations on their own. + In a deployment, Things usually have relations to other Things or entities such as locations, which may have + metadata representations on their own.
                      • - In the future, additional metadata might be provided as externalized Web resource, just like done for HTML or the Web Linking header field. + In the future, additional metadata might be provided as externalized Web resource, just like done for HTML + or the Web Linking header field.
                      -

                      Serialization Requirements

                      -

                      -

                      +

                      Human-readability

                      @@ -397,132 +416,128 @@

                      Human-readability

                      The Web of Things is supposed to make IoT technology more usable, which includes usability for developers. This is fundamental to the success of Web Technology in general.

                      -

                      - This requirement lead to the choice of a JSON-based format for the TD. -

                      +

                      This requirement lead to the choice of a JSON-based format for the TD.

                      Machine-understandability

                      - The Web of Things is centered on things. During runtime, data and metadata are primarily exchanged among machines for machines. - Furthermore, WoT content is produced by a large number of machines. - Thus, machine assistance is also needed for consuming the data and bulding viable business cases. + The Web of Things is centered on things. During runtime, data and metadata are primarily exchanged among + machines for machines. Furthermore, WoT content is produced by a large number of machines. Thus, machine + assistance is also needed for consuming the data and bulding viable business cases.

                      - Thus, TDs must not only be machine-readible, but machine-understandable. - Moreover, the TD metadata can help to make optimized runtime data - (i.e., no metadata included in the live data exchanged) - also machine-understandable. + Thus, TDs must not only be machine-readible, but machine-understandable. Moreover, the TD metadata can help to + make optimized runtime data (i.e., no metadata included in the live data exchanged) also + machine-understandable. +

                      +

                      - This requirement lead to the choice of JSON-LD, an existing W3C standard - for machine-understandable JSON documents based on Linked Data vocabularies. + This requirement lead to the choice of JSON-LD, an existing W3C standard for machine-understandable JSON + documents based on Linked Data vocabularies.

                      Introspection

                      - Applications consuming TDs should be able to easily introspect the - capabilites, possible interactions, and other metadata of the corresponding Things. + Applications consuming TDs should be able to easily introspect the capabilites, possible interactions, and + other metadata of the corresponding Things.

                      - In particular the WoT Scripting API benefits from - an alternative structure of the TD, such as separated entry points for Properties, Actions, and Events. + In particular the WoT Scripting API benefits from an + alternative structure of the TD, such as separated entry points for Properties, Actions, and Events.

                      Default Values

                      - Implementations for the PlugFest showed that basically every developer is counting on defaults, - that is, certain elements can be omitted as their meaning is known implicitly or even irrelevant. - Examples are omitting the security metadata for test Things that use no-security, - omitting the writable flag for read-only Properties, - or omitting inputSchema/outputSchema for Actions that do not take arguments and/or return nothing. + Implementations for the PlugFest showed that basically every developer is counting on defaults, that is, + certain elements can be omitted as their meaning is known implicitly or even irrelevant. Examples are omitting + the security metadata for test Things that use no-security, omitting the + writable flag for read-only Properties, or omitting inputSchema/outputSchema + for Actions that do not take arguments and/or return nothing.

                      - Treating the JSON-LD TD strictly as Linked Data document, a collection of triples, would not allow for such defaults, and hence convenience. - Linked Data underly the open-world assumption. - That means, when a TD is omitting statements (e.g., writable flag), then the consumer cannot make any assumptions about its actual value. + Treating the JSON-LD TD strictly as Linked Data document, a collection of triples, would not allow for such + defaults, and hence convenience. Linked Data underly the + open-world assumption. That means, when a TD + is omitting statements (e.g., writable flag), then the consumer cannot make any assumptions about its actual + value.

                      - Based on the knowledge that it is a TD, the consumer could, however, apply a set rules, which infer the defaults. - This leads to the preprocessing introduced in the next section. + Based on the knowledge that it is a TD, the consumer could, however, apply a set rules, which infer the + defaults. This leads to the preprocessing introduced in the next section.

                      Robustness Principle

                      - Be conservative in what you do, be liberal in what you accept from others. - Applying Postel's law + Be conservative in what you do, be liberal in what you accept from others. Applying + Postel's law fosters interoperability and should also be used in the Web of Things.

                      -

                      - This requirement also leads to a preprocessing step that can fill in - defaults and correct minor issues. -

                      +

                      This requirement also leads to a preprocessing step that can fill in defaults and correct minor issues.

                      Simplified TD

                      -

                      - The Simpified TD proposal aims at solving the requirements given in the previous section. -

                      +

                      The Simpified TD proposal aims at solving the requirements given in the previous section.

                      Preprocessing

                      +

                      The main change and enabler for a simplified TD is introducing a preprocessing step.

                      - The main change and enabler for a simplified TD is introducing a - preprocessing step. -

                      -

                      - Due to the open-world assumption, - some preprocessing of the TD is required. - The rules to fill in defaults could be applied in the following way: -

                        -
                      • Custom rules: If semantic support through queries and reasoners - is not used, simple hard-coded rules can fill in the defaults when - the internal model of the implementation is created. A drawback is - that this hinders common, re-usable tooling.
                      • -
                      • Rule languages: Most knowledge bases have support for rule - languages, which could create the missing triples for the defaults. - A drawback is that there is no one standard that would be available - in all knowledge bases.
                      • -
                      • Query rewriting: Instead of having the default triples materialized - in the knowledge base, the queries retrieving the knowledge could - be patched so that they return the results as if the default values - were present.
                      • -
                      • Normalize the TD: The TD specification can define a set of rules - that have to be applied to all incoming TD documents in a - preprocessing step.
                      • -

                        -

                        - Normalizing the TD in a preprocessing step also helps for robustness. - Thus, this is a favorable solution. + Due to the open-world assumption, some + preprocessing of the TD is required. The rules to fill in defaults could be applied in the following way:

                        +
                          +
                        • + Custom rules: If semantic support through queries and reasoners is not used, simple hard-coded rules can + fill in the defaults when the internal model of the implementation is created. A drawback is that this + hinders common, re-usable tooling. +
                        • +
                        • + Rule languages: Most knowledge bases have support for rule languages, which could create the missing triples + for the defaults. A drawback is that there is no one standard that would be available in all knowledge + bases. +
                        • +
                        • + Query rewriting: Instead of having the default triples materialized in the knowledge base, the queries + retrieving the knowledge could be patched so that they return the results as if the default values were + present. +
                        • +
                        • + Normalize the TD: The TD specification can define a set of rules that have to be applied to all incoming TD + documents in a preprocessing step. +
                        • +
                        +

                        Normalizing the TD in a preprocessing step also helps for robustness. Thus, this is a favorable solution.

                        - JSON-LD 1.1 Frameing can be used to define and apply the preprocessing steps. + JSON-LD 1.1 Frameing can be used to define + and apply the preprocessing steps.

                        - NOTE: Even with JSON-LD 1.1 available, there are still open issues. - For instance, the object key becomes the @id of the Property node defined in the object value: - To derive sensible triples, the object key would need to be declared either as "blank node" by prefixing with _:, - or the container mechanism must be able generate relative @ids to avoid conflicts when an object key appears twice at different levels. + NOTE: Even with JSON-LD 1.1 available, there are still open issues. For instance, the object key + becomes the @id of the Property node defined in the object value: To derive sensible triples, the + object key would need to be declared either as "blank node" by prefixing with _:, or the + container mechanism must be able generate relative @ids to avoid conflicts when an object key + appears twice at different levels.

                      Media Type

                      - When TDs are not a valid JSON-LD document due to necessary preprocessing or simply an omitted @context, - they need their own media type registered with IANA. -

                      -

                      - We propose application/td+json. + When TDs are not a valid JSON-LD document due to necessary preprocessing or simply an omitted + @context, they need their own media type registered with IANA.

                      +

                      We propose application/td+json.

                      @@ -530,83 +545,95 @@

                      New Terms

                      link

                      - The Working Draft for the Prague 2018 PlugFest already adopted a top-level link field, - so that a TD can express relations to other Things or other Web resources. + The Working Draft for the Prague 2018 PlugFest already adopted a top-level link field, so that + a TD can express relations to other Things or other Web resources.

                      - Note that because the TD is JSON-LD, such relations were always possible and are actually always expressed for all top-level fields (it is Linked Data). - Having the term link makes it explicit that the elements included there are actual Web Links to fetchable Web resources, - opposed to Linked Data URIs ("IRIs") that are often only an identifier without an actual Web resource. + Note that because the TD is JSON-LD, such relations were always possible and are actually always expressed + for all top-level fields (it is Linked Data). Having the term link makes it explicit that the + elements included there are actual Web Links to fetchable Web resources, opposed to Linked Data URIs + ("IRIs") that are often only an identifier without an actual Web resource.

                      description

                      - The term description is very useful and shall become part of the TD core vocabulary for both Thing and Interactions. + The term description is very useful and shall become part of the TD core vocabulary for both + Thing and Interactions.

                      name

                      - The term name would not be the identifier for Interactions anymore. - Following JSON-LD 1.1, the object key would become @id, which would serve as handle to select Interactions, e.g., for the Scripting API. + The term name would not be the identifier for Interactions anymore. Following JSON-LD 1.1, the + object key would become @id, which would serve as handle to select Interactions, e.g., for the + Scripting API.

                      - With that, name becomes either obsolete or rather could be used as optional, human-readible label. - As a result, for Things, name becomes a mandatory label. - For Interactions, the new, optional term label is used. + With that, name becomes either obsolete or rather could be used as optional, human-readible + label. As a result, for Things, name becomes a mandatory label. For Interactions, the new, + optional term label is used.

                      id

                      - On the top level, id will become important for security and identity management. - It identifies the instance of Thing and also serves as the @base for all other @id definitions (e.g., of Interactions). - Only this fully enables the object notation of Interactions (opposed to the previous array notation). - The top-level id must be mandatory and internally maps to the @id of the Thing. - Therefore, a Thing id must be a URI (which includes URNs). + On the top level, id will become important for security and identity management. It identifies + the instance of Thing and also serves as the @base for all other @id definitions + (e.g., of Interactions). Only this fully enables the object notation of Interactions (opposed to the + previous array notation). The top-level id must be mandatory and internally maps to the + @id of the Thing. Therefore, a Thing id must be a URI (which includes URNs).

                      - For Interactions, @id would be the handle for scripts and it would - enable references to and between Interactions, e.g., for - cross-Property constraints or for expressing relations between an - action and one or more Properties. Note that this would result - automatically from the object structure listing Interactions - because of JSON-LD 1.1 (Node Identifier Indexing). + For Interactions, @id would be the handle for scripts and it would enable references to and + between Interactions, e.g., for cross-Property constraints or for expressing relations between an action and + one or more Properties. Note that this would result automatically from the object structure listing + Interactions because of JSON-LD 1.1 (Node Identifier Indexing).

                      - +

                      Model Changes

                      - +

                      - To enable alignment with other technologies such as JSON Schema, the Simplified TD needs a few small changes to the TD core model. - It has to be evaluated if these changes are actually breaking changes (i.e., a JSON-LD 1.0 TD would create different triples than a Simplified TD). + To enable alignment with other technologies such as JSON Schema, the Simplified TD needs a few small changes + to the TD core model. It has to be evaluated if these changes are actually breaking changes (i.e., a JSON-LD + 1.0 TD would create different triples than a Simplified TD).

                      - +

                      Properties

                      - Using the term properties also for the object field names of complex Properties (i.e., "type": "object") aligns the TD with JSON Schema syntax. - This results in recursive Properties, where -

                        -
                      • Properties also have the DataSchema RDF-type
                      • -
                      • Only properties that have a forms field are Interaction Properties.
                      • -
                      • Sub-properties of complex Properties might be directly addressable and accessible, when they have the forms field. -
                      + Using the term properties also for the object field names of complex Properties (i.e., + "type": "object") aligns the TD with JSON Schema syntax. This results in recursive Properties, + where

                      +
                        +
                      • Properties also have the DataSchema RDF-type
                      • +
                      • Only properties that have a forms field are Interaction Properties.
                      • +
                      • + Sub-properties of complex Properties might be directly addressable and accessible, when they have the + forms field. +
                      • +
                      - +

                      Simplified TD by Example

                      - +

                      - When no @context is given, the Simplified TD context - is assumed based on the media type (file location needs update for adoption). - The current TD context also needs an additional definition of @base set to the Thing's @id, - so that the object representation of Interactions produces correct @ids for the Interactions. + When no @context is given, the + Simplified TD context + is assumed based on the media type (file location needs update for adoption). The current TD context also + needs an additional definition of @base set to the Thing's @id, so that the object + representation of Interactions produces correct @ids for the Interactions.

                      @@ -635,20 +662,24 @@ 

                      Simplified TD by Example

                      } }
                      - +

                      - When @context is given, the Simplified TD context - is applied last to ensure that the terms of the TD core vocabulary are valid and not shadowed by other contexts. + When @context is given, the + Simplified TD context + is applied last to ensure that the terms of the TD core vocabulary are valid and not shadowed by other + contexts.

                      - +

                      Minimal Simplified TD

                      - The first example reflects the minimal option. - It contains no semantic annotations, nor human-readible decorators such as name or description. + The first example reflects the minimal option. It contains no semantic annotations, nor human-readible + decorators such as name or description.

                      - +
                       {
                         "name": "Lamp",
                      @@ -748,10 +779,10 @@ 

                      Minimal Simplified TD

                      }
                      - +

                      Annotated Simplified TD (with semantics)

                      - +
                       {
                         "@context": { "iot": "https://iot.schema.org/" },
                      @@ -871,27 +902,26 @@ 

                      Annotated Simplified TD (with semantics)

                      }
                      -

                      JSON-LD 1.0 TD

                      - -

                      This section summerizes the status of the JSON-LD 1.0-based Thing Description (until Prague 2018 WD).

                      - + +

                      This section summerizes the status of the JSON-LD 1.0-based Thing Description (until Prague 2018 WD).

                      + +
                      +

                      JSON-LD 1.0 TD by Example

                      +
                      -

                      JSON-LD 1.0 TD by Example

                      - -
                      -

                      Minimal JSON-LD

                      +

                      Minimal JSON-LD

                      -

                      - This example reflects the minimal option. - It contains no semantic annotations, nor human-readible decorators such as name or description. -

                      +

                      + This example reflects the minimal option. It contains no semantic annotations, nor human-readible decorators + such as name or description. +

                      -
                      +          
                         {
                           "@context": "https://w3c.github.io/wot/w3c-wot-td-context.jsonld",
                           "name": "Lamp",
                      @@ -980,12 +1010,12 @@ 

                      Minimal JSON-LD

                      "mediaType": "application/ld+json" }] } -
                      - -
                      -
                      -

                      Annotated JSON-LD 1.0 TD

                      -