diff --git a/index.html b/index.html index 7364d3174..e16efef8d 100644 --- a/index.html +++ b/index.html @@ -3685,7 +3685,7 @@

Form

>]. - with default + optional string @@ -4068,7 +4068,7 @@

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 + response message. With the core vocabulary, it can include only 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 @@ -4077,9 +4077,7 @@

Response-related Terms Usage

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. + Default Value.

In some cases additional responses might be possible. One example of this is error responses but in some @@ -4093,36 +4091,53 @@

Response-related Terms Usage

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. + Action that accepts JSON, but returns an image. In such a case, the optional `response` key-value pair + can describe the content type of the expected response. As there is no default value defined, the + following assertions apply:

+ +

Similar considerations apply to additional responses:

+

The different cases on the variation of request and response are explained above. The tables at summarize these cases in a concise manner. @@ -4159,7 +4174,7 @@

ExpectedResponse

>]. - mandatory + optional string @@ -4191,6 +4206,18 @@

AdditionalExpectedResponse

boolean + + 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 + + contentType @@ -4205,18 +4232,6 @@

AdditionalExpectedResponse

>]. - 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 @@ -4305,12 +4320,6 @@

Default Value Definitions

false - - AdditionalExpectedResponse - contentType - value of the contentType of the Form element it belongs to. - - Form contentType @@ -6194,18 +6203,6 @@

response

no output schema is required, as the content type fully specifies the representation format.

-

- - If present, the value assigned to response in an instance of Form MUST be a - JSON object. - - - If present, the response object MUST contain a contentType member as defined in the - Class definition of ExpectedResponse. - -

-

A form snippet with the response member is shown below based on the takePhoto Action described above: @@ -6229,6 +6226,49 @@

response

}, // ... } + + +

+ In cases where responses are not expected to contain a payload and therefore no `contentType` either, an + empty `response` object can be used to convey this information. +

+
+{
+    // ...
+    "actions": {
+        "brewCoffee": {
+            "description": "Invoking this action does not return a payload.",           
+            "input": {
+              "type": "object",
+              "properties": {
+                "coffeeType": {
+                  "enum": [
+                    "espresso",
+                    "americano",
+                    "cappuccino",
+                    "latte"
+                  ]
+                },
+                "useOatMilk": {
+                  "type": "boolean",
+                  "default": false
+                }
+              },
+              "required": [
+                "coffeeType"
+              ]
+            },
+            "forms": [{
+                "op": "invokeaction",
+                "href": "http://coffee-maker.example.com/brew-coffee",
+                "contentType": "application/json",
+                "response": {}
+            }]
+        }
+    },
+    // ...
+}
 
@@ -6247,10 +6287,12 @@

additionalResponses

A TD snippet with the additionalResponses member in an Action Affordance is - shown below. It describes the case mentioned above when an error response can be sent with another payload - than what is described in the output. The success with the value + shown below. Its first element ilustrates the case mentioned above when an error response can be sent with + another payload than what is described in the output. The success with the value false refers to the fact that this payload refers to an error case and - schema allows linking to the payload description used at schemaDefinitions: + schema allows linking to the payload description used at schemaDefinitions. The + second element within `additionalResponses` also describes an error response, but this time the response + does not have a payload.

@@ -6281,11 +6323,16 @@ 

additionalResponses

"op": "invokeaction", "href": "http://mycar.example.com/api/engine", "contentType": "application/json", - "additionalResponses": [{ + "additionalResponses": [ + { "success": false, "contentType": "application/json", "schema": "actionErrorPayload" - }] + }, + { + "success": false + }, + ] }] } }, diff --git a/index.template.html b/index.template.html index 65d9923b0..1e812e39a 100644 --- a/index.template.html +++ b/index.template.html @@ -1310,12 +1310,6 @@

Default Value Definitions

false - - AdditionalExpectedResponse - contentType - value of the contentType of the Form element it belongs to. - - Form contentType @@ -3199,18 +3193,6 @@

response

no output schema is required, as the content type fully specifies the representation format.

-

- - If present, the value assigned to response in an instance of Form MUST be a - JSON object. - - - If present, the response object MUST contain a contentType member as defined in the - Class definition of ExpectedResponse. - -

-

A form snippet with the response member is shown below based on the takePhoto Action described above: @@ -3234,6 +3216,49 @@

response

}, // ... } +
+ +

+ In cases where responses are not expected to contain a payload and therefore no `contentType` either, an + empty `response` object can be used to convey this information. +

+
+{
+    // ...
+    "actions": {
+        "brewCoffee": {
+            "description": "Invoking this action does not return a payload.",           
+            "input": {
+              "type": "object",
+              "properties": {
+                "coffeeType": {
+                  "enum": [
+                    "espresso",
+                    "americano",
+                    "cappuccino",
+                    "latte"
+                  ]
+                },
+                "useOatMilk": {
+                  "type": "boolean",
+                  "default": false
+                }
+              },
+              "required": [
+                "coffeeType"
+              ]
+            },
+            "forms": [{
+                "op": "invokeaction",
+                "href": "http://coffee-maker.example.com/brew-coffee",
+                "contentType": "application/json",
+                "response": {}
+            }]
+        }
+    },
+    // ...
+}
 
@@ -3252,10 +3277,12 @@

additionalResponses

A TD snippet with the additionalResponses member in an Action Affordance is - shown below. It describes the case mentioned above when an error response can be sent with another payload - than what is described in the output. The success with the value + shown below. Its first element ilustrates the case mentioned above when an error response can be sent with + another payload than what is described in the output. The success with the value false refers to the fact that this payload refers to an error case and - schema allows linking to the payload description used at schemaDefinitions: + schema allows linking to the payload description used at schemaDefinitions. The + second element within `additionalResponses` also describes an error response, but this time the response + does not have a payload.

@@ -3286,11 +3313,16 @@ 

additionalResponses

"op": "invokeaction", "href": "http://mycar.example.com/api/engine", "contentType": "application/json", - "additionalResponses": [{ + "additionalResponses": [ + { "success": false, "contentType": "application/json", "schema": "actionErrorPayload" - }] + }, + { + "success": false + }, + ] }] } }, diff --git a/ontology/hctl.html b/ontology/hctl.html index fe17f231b..13078eeaa 100644 --- a/ontology/hctl.html +++ b/ontology/hctl.html @@ -159,7 +159,7 @@

Terminology

schemaDefinitions map must be used.
Domain includeshctl:AdditionalExpectedResponse

hasOperationType

IRI: https://www.w3.org/2019/wot/hypermedia#hasOperationType

Indicates the semantic intention of performing the operation(s) described by the form.
Domain includeshctl:Form

returns

IRI: https://www.w3.org/2019/wot/hypermedia#returns

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 reponse messages.
Domain includeshctl:Form
Range includeshctl:ExpectedResponse

Datatype Properties

forContentCoding

IRI: https://www.w3.org/2019/wot/hypermedia#forContentCoding

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.
Domain includeshctl:Form
Range includesschema:Text
+ input contentType). The response name contains metadata that is only valid for the response messages.
Domain includeshctl:Form
Range includeshctl:ExpectedResponse

Datatype Properties

forContentCoding

IRI: https://www.w3.org/2019/wot/hypermedia#forContentCoding

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.
Domain includeshctl:Form
Range includesschema:Text

forContentType

IRI: https://www.w3.org/2019/wot/hypermedia#forContentType

Assign a content type based on a media type [[IANA-MEDIA-TYPES]] (e.g., 'text/plain') and potential parameters (e.g., 'charset=utf-8') for the media type.
Domain includeshctl:Form
Range includesschema:Text

forSubProtocol

IRI: https://www.w3.org/2019/wot/hypermedia#forSubProtocol

Indicates the exact mechanism by which an interaction will be accomplished for a given protocol when there are multiple options. diff --git a/ontology/hctl.ttl b/ontology/hctl.ttl index fffe028ba..cbe9c0b25 100644 --- a/ontology/hctl.ttl +++ b/ontology/hctl.ttl @@ -44,7 +44,7 @@ For example, for HTTP and Events, it indicates which of several available mechan :returns rdf:type owl:ObjectProperty ; rdfs:label "returns" ; rdfs:comment """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 reponse messages."""@en ; + input contentType). The response name contains metadata that is only valid for the response messages."""@en ; schema:domainIncludes :Form ; schema:rangeIncludes :ExpectedResponse . diff --git a/testing/assertions.csv b/testing/assertions.csv index 47421eb45..d8e92d7a8 100644 --- a/testing/assertions.csv +++ b/testing/assertions.csv @@ -18,8 +18,10 @@ "td-actions","null","All name-value pairs of a Map of ActionAffordance instances MUST be serialized as members of the JSON object that results from serializing the Map; the name of a pair MUST be serialized as a JSON string and the value of the pair, an instance of ActionAffordance, MUST be serialized as a JSON object." "td-actions_existence","null","Actions offered by a Thing MUST be collected in the JSON-object based actions member." "td-actions_uniqueness","null","Actions collected in the JSON-object based actions member MUST have unique JSON names." -"td-additionalExpectedResponse-contentType","null","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." -"td-additionalExpectedResponse-schema","null","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." +"td-additionalExpectedResponse-contentType","null","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`." +"td-additionalExpectedResponse-missing-contentType","null","If there is no `contentType` value defined in an additional expected response object, a Consumer MUST expect that the respective response does not contain any payload." +"td-additionalExpectedResponse-noSchemaWithoutPayload","null","The `schema` of an additional expected response object MUST NOT be defined when there is no `contentType` present." +"td-additionalExpectedResponse-schema","null","If the data schema of an additional expected response differs from the output data schema of the interaction, the `Form` MUST include an entry in the array associated with the name `additionalResponses` that includes a value for the name `schema`." "td-array-type","null","A value of type Array MUST be serialized as JSON array, with each value of the name-value pairs as element of the JSON array ordered by the numeric name of the pair." "td-arrays","null","All values assigned to links, and forms in an instance of the Class Thing MUST be serialized as JSON arrays containing JSON objects as defined in and , respectively." "td-arrays_forms","null","The type of the member forms MUST be a JSON array." @@ -83,7 +85,6 @@ "td-data-schema_writeOnly","null","The writeOnly vocabulary term as defined in the class DataSchema for integers MUST be serialized as a JSON name." "td-datetime-recommended-type","null","Values that are of type dateTime SHOULD use the literal Z representing the UTC time zone instead of an offset." "td-datetime-type","null","Values that are of type dateTime MUST be serialized as JSON strings following the ""date-time"" format specified by [[RFC3339]]." -"td-default-AdditionalResponseContentType","null","AdditionalExpectedResponse contentType value of the contentType of the Form element it belongs to." "td-default-alg","null","BearerSecurityScheme alg ES256" "td-default-contentType","null","Form contentType application/json" "td-default-format","null","BearerSecurityScheme format jwt" @@ -126,14 +127,13 @@ "td-events","null","All name-value pairs of a Map of EventAffordance instances MUST be serialized as members of the JSON object that results from serializing the Map; the name of a pair MUST be serialized as a JSON string and the value of the pair, an instance of EventAffordance, MUST be serialized as a JSON object." "td-events_existence","null","Events offered by a Thing MUST be collected in the JSON-object based events member." "td-events_uniqueness","null","Events collected in the JSON-object based events member MUST have unique JSON names." -"td-expectedResponse-contentType","null","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." "td-expectedResponse-default-contentType","null","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." +"td-expectedResponse-defined-contentType","null","If a content type is defined in the `response` object within a form, a Consumer MUST expect a response containing a payload in the respective format, e.g., an image in the case of `image/jpeg`." +"td-expectedResponse-missing-contentType","null","If there is no `contentType` value defined in a `response` object within a form, a Consumer MUST expect that the respective response does not contain any payload." "td-form-protocolbindings","null","If required, form objects MAY be supplemented with protocol-specific Vocabulary Terms identified with a prefix." -"td-form-response-object","null","If present, the value assigned to response in an instance of Form MUST be a JSON object." "td-format-validation-known-values","null","Servients MAY use the format value to perform additional validation accordingly." "td-format-validation-other-values","null","When a value that is not found in the known set of values is assigned to format, such a validation SHOULD succeed." "td-forms","null","All name-value pairs of an instance of Form, where the name is a Vocabulary Term included in the Signature of Form, MUST be serialized as members of the JSON object that results from serializing the Form instance, with the Vocabulary Term as name." -"td-forms-response","null","If present, the response object MUST contain a contentType member as defined in the Class definition of ExpectedResponse." "td-integer-type","null","Values that are of type integer or unsignedInt MUST be serialized as JSON numbers without a fraction or exponent part." "td-json-open","null","TDs MUST be serialized according to the requirements defined in Section 8.1 of RFC8259 [[!RFC8259]] for open ecosystems." "td-json-open_accept-byte-order","null","TD Processors MAY ignore the presence of a byte order mark rather than treating it as an error." @@ -259,84 +259,84 @@ "td-uriVariables-dataschema","null","The serialization of each value in the map assigned to uriVariables in an instance of Form MUST rely on the Class DataSchema, whose serialization is defined in ." "td-uriVariables-names","null","In such a case, the URI Template variables MUST be collected in the JSON-object based uriVariables member either in the Thing level or in Interaction Affordance level with the associated (unique) variable names as JSON names." "td-version","null","All name-value pairs of an instance of VersionInfo, where the name is a Vocabulary Term included in the Signature of VersionInfo, MUST be serialized as JSON members with the Vocabulary Term as name." -"td-vocab-actions--Thing","null","actionsAll Action-based Interaction Affordances of the Thing.optionalMap of ActionAffordance" -"td-vocab-additionalResponses--Form","null","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" -"td-vocab-alg--BearerSecurityScheme","null","algEncoding, encryption, or digest algorithm.with defaultstring (e.g., ES256, or ES512-256)" -"td-vocab-allOf--ComboSecurityScheme","null","allOfArray of two or more strings identifying other named security scheme definitions, all of which must be satisfied for access.mandatoryArray of string" -"td-vocab-anchor--Link","null","anchorOverrides the link context (by default the Thing itself identified by its id) with the given URI or IRI.optionalanyURI" -"td-vocab-at-context--Thing","null","@contextJSON-LD keyword to define short-hand names called terms that are used throughout a TD document.mandatoryanyURI or Array" -"td-vocab-at-type--DataSchema","null","@typeJSON-LD keyword to label the object with semantic tags (or types)optionalstring or Array of string" -"td-vocab-at-type--InteractionAffordance","null","@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring or Array of string" -"td-vocab-at-type--SecurityScheme","null","@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring or Array of string" -"td-vocab-at-type--Thing","null","@typeJSON-LD keyword to label the object with semantic tags (or types).optionalstring or Array of string" -"td-vocab-authorization--BearerSecurityScheme","null","authorizationURI of the authorization server.optionalanyURI" -"td-vocab-authorization--OAuth2SecurityScheme","null","authorizationURI of the authorization server.optionalanyURI" -"td-vocab-base--Thing","null","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" -"td-vocab-cancellation--EventAffordance","null","cancellationDefines any data that needs to be passed to cancel a subscription, e.g., a specific message to remove a Webhook.optionalDataSchema" -"td-vocab-const--DataSchema","null","constProvides a constant value.optionalany type" -"td-vocab-contentCoding--Form","null","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" -"td-vocab-contentEncoding--StringSchema","null","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)" -"td-vocab-contentMediaType--StringSchema","null","contentMediaTypeSpecifies the MIME type of the contents of a string value, as described in [[RFC2046]].optionalstring (e.g., image/png, or audio/mpeg)" -"td-vocab-contentType--AdditionalExpectedResponse","null","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" -"td-vocab-contentType--ExpectedResponse","null","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" -"td-vocab-contentType--Form","null","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" -"td-vocab-created--Thing","null","createdProvides information when the TD instance was created.optionaldateTime" -"td-vocab-data--EventAffordance","null","dataDefines the data schema of the Event instance messages pushed by the Thing.optionalDataSchema" -"td-vocab-dataResponse--EventAffordance","null","dataResponseDefines the data schema of the Event response messages sent by the consumer in a response to a data message.optionalDataSchema" -"td-vocab-default--DataSchema","null","defaultSupply a default value. The value SHOULD validate against the data schema in which it resides.optionalany type" -"td-vocab-description--DataSchema","null","descriptionProvides additional (human-readable) information based on a default language.optionalstring" -"td-vocab-description--InteractionAffordance","null","descriptionProvides additional (human-readable) information based on a default language.optionalstring" -"td-vocab-description--SecurityScheme","null","descriptionProvides additional (human-readable) information based on a default language.optionalstring" -"td-vocab-description--Thing","null","descriptionProvides additional (human-readable) information based on a default language.optionalstring" -"td-vocab-descriptions--DataSchema","null","descriptionsCan be used to support (human-readable) information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage" -"td-vocab-descriptions--InteractionAffordance","null","descriptionsCan be used to support (human-readable) information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage" -"td-vocab-descriptions--SecurityScheme","null","descriptionsCan be used to support (human-readable) information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage" -"td-vocab-descriptions--Thing","null","descriptionsCan be used to support (human-readable) information in different languages. Also see MultiLanguage.optionalMap of MultiLanguage" -"td-vocab-enum--DataSchema","null","enumRestricted set of values provided as an array.optionalArray of any type" -"td-vocab-events--Thing","null","eventsAll Event-based Interaction Affordances of the Thing.optionalMap of EventAffordance" -"td-vocab-exclusiveMaximum--IntegerSchema","null","exclusiveMaximumSpecifies a maximum numeric value, representing an exclusive upper limit. Only applicable for associated number or integer types.optionalinteger" -"td-vocab-exclusiveMaximum--NumberSchema","null","exclusiveMaximumSpecifies a maximum numeric value, representing an exclusive upper limit. Only applicable for associated number or integer types.optionaldouble" -"td-vocab-exclusiveMinimum--IntegerSchema","null","exclusiveMinimumSpecifies a minimum numeric value, representing an exclusive lower limit. Only applicable for associated number or integer types.optionalinteger" -"td-vocab-exclusiveMinimum--NumberSchema","null","exclusiveMinimumSpecifies a minimum numeric value, representing an exclusive lower limit. Only applicable for associated number or integer types.optionaldouble" -"td-vocab-flow--OAuth2SecurityScheme","null","flowAuthorization flow.mandatorystring (e.g., code, or client)" -"td-vocab-format--BearerSecurityScheme","null","formatSpecifies format of security authentication information.with defaultstring (e.g., jwt, cwt, jwe, or jws)" -"td-vocab-format--DataSchema","null","formatAllows validation based on a format pattern such as ""date-time"", ""email"", ""uri"", etc. (Also see below.)optionalstring" -"td-vocab-forms--InteractionAffordance","null","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" -"td-vocab-forms--Thing","null","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" -"td-vocab-href--Form","null","hrefTarget IRI of a link or submission target of a form.mandatoryanyURI" -"td-vocab-href--Link","null","hrefTarget IRI of a link or submission target of a form.mandatoryanyURI" -"td-vocab-hreflang--Link","null","hreflangThe hreflang attribute specifies the language of a linked document. The value of this must be a valid language tag [[BCP47]].optionalstring or Array of string" -"td-vocab-id--Thing","null","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" -"td-vocab-idempotent--ActionAffordance","null","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" -"td-vocab-identity--PSKSecurityScheme","null","identityIdentifier providing information which can be used for selection or confirmation.optionalstring" -"td-vocab-in--APIKeySecurityScheme","null","inSpecifies the location of security authentication information. with defaultstring (one of header, query, body, cookie, uri, or auto)" -"td-vocab-in--BasicSecurityScheme","null","inSpecifies the location of security authentication information. with defaultstring (one of header, query, body, cookie, or auto)" -"td-vocab-in--BearerSecurityScheme","null","inSpecifies the location of security authentication information. with defaultstring (one of header, query, body, cookie, or auto)" -"td-vocab-in--DigestSecurityScheme","null","inSpecifies the location of security authentication information. with defaultstring (one of header, query, body, cookie, or auto)" -"td-vocab-input--ActionAffordance","null","inputUsed to define the input data schema of the Action.optionalDataSchema" -"td-vocab-instance--VersionInfo","null","instanceProvides a version indicator of this TD. mandatorystring" -"td-vocab-items--ArraySchema","null","itemsUsed to define the characteristics of an array.optionalDataSchema or Array of DataSchema" -"td-vocab-links--Thing","null","linksProvides Web links to arbitrary resources that relate to the specified Thing Description.optionalArray of Link" -"td-vocab-maxItems--ArraySchema","null","maxItemsDefines the maximum number of items that have to be in the array.optionalunsignedInt" -"td-vocab-maxLength--StringSchema","null","maxLengthSpecifies the maximum length of a string. Only applicable for associated string types.optionalunsignedInt" -"td-vocab-maximum--IntegerSchema","null","maximumSpecifies a maximum numeric value, representing an inclusive upper limit. Only applicable for associated number or integer types.optionalinteger" -"td-vocab-maximum--NumberSchema","null","maximumSpecifies a maximum numeric value, representing an inclusive upper limit. Only applicable for associated number or integer types.optionaldouble" -"td-vocab-minItems--ArraySchema","null","minItemsDefines the minimum number of items that have to be in the array.optionalunsignedInt" -"td-vocab-minLength--StringSchema","null","minLengthSpecifies the minimum length of a string. Only applicable for associated string types.optionalunsignedInt" -"td-vocab-minimum--IntegerSchema","null","minimumSpecifies a minimum numeric value, representing an inclusive lower limit. Only applicable for associated number or integer types.optionalinteger" -"td-vocab-minimum--NumberSchema","null","minimumSpecifies a minimum numeric value, representing an inclusive lower limit. Only applicable for associated number or integer types.optionaldouble" -"td-vocab-model--VersionInfo","null","modelProvides a version indicator of the underlying TM. optionalstring" -"td-vocab-modified--Thing","null","modifiedProvides information when the TD instance was last modified.optionaldateTime" -"td-vocab-multipleOf--IntegerSchema","null","multipleOfSpecifies the multipleOf value number. The value must strictly greater than 0. Only applicable for associated number or integer types.optionalinteger" -"td-vocab-multipleOf--NumberSchema","null","multipleOfSpecifies the multipleOf value number. The value must strictly greater than 0. Only applicable for associated number or integer types.optionaldouble" -"td-vocab-name--APIKeySecurityScheme","null","nameName for query, header, cookie, or uri parameters.optionalstring" -"td-vocab-name--BasicSecurityScheme","null","nameName for query, header, cookie, or uri parameters.optionalstring" -"td-vocab-name--BearerSecurityScheme","null","nameName for query, header, cookie, or uri parameters.optionalstring" -"td-vocab-name--DigestSecurityScheme","null","nameName for query, header, cookie, or uri parameters.optionalstring" -"td-vocab-observable--PropertyAffordance","null","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" -"td-vocab-oneOf--ComboSecurityScheme","null","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" -"td-vocab-oneOf--DataSchema","null","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" -"td-vocab-op--Form","null","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)" +"td-vocab-actions--Thing","null","actions All Action-based Interaction Affordances of the Thing. optional Map of ActionAffordance" +"td-vocab-additionalResponses--Form","null","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" +"td-vocab-alg--BearerSecurityScheme","null","alg Encoding, encryption, or digest algorithm. with default string (e.g., ES256, or ES512-256)" +"td-vocab-allOf--ComboSecurityScheme","null","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" +"td-vocab-anchor--Link","null","anchor Overrides the link context (by default the Thing itself identified by its id) with the given URI or IRI. optional anyURI" +"td-vocab-at-context--Thing","null","@context JSON-LD keyword to define short-hand names called terms that are used throughout a TD document. mandatory anyURI or Array" +"td-vocab-at-type--DataSchema","null","@type JSON-LD keyword to label the object with semantic tags (or types) optional string or Array of string" +"td-vocab-at-type--InteractionAffordance","null","@type JSON-LD keyword to label the object with semantic tags (or types). optional string or Array of string" +"td-vocab-at-type--SecurityScheme","null","@type JSON-LD keyword to label the object with semantic tags (or types). optional string or Array of string" +"td-vocab-at-type--Thing","null","@type JSON-LD keyword to label the object with semantic tags (or types). optional string or Array of string" +"td-vocab-authorization--BearerSecurityScheme","null","authorization URI of the authorization server. optional anyURI" +"td-vocab-authorization--OAuth2SecurityScheme","null","authorization URI of the authorization server. optional anyURI" +"td-vocab-base--Thing","null","base Define 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. optional anyURI" +"td-vocab-cancellation--EventAffordance","null","cancellation Defines any data that needs to be passed to cancel a subscription, e.g., a specific message to remove a Webhook. optional DataSchema" +"td-vocab-const--DataSchema","null","const Provides a constant value. optional any type" +"td-vocab-contentCoding--Form","null","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" +"td-vocab-contentEncoding--StringSchema","null","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)" +"td-vocab-contentMediaType--StringSchema","null","contentMediaType Specifies the MIME type of the contents of a string value, as described in [[RFC2046]]. optional string (e.g., image/png, or audio/mpeg)" +"td-vocab-contentType--AdditionalExpectedResponse","null","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]. optional string" +"td-vocab-contentType--ExpectedResponse","null","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]. optional string" +"td-vocab-contentType--Form","null","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]. optional string" +"td-vocab-created--Thing","null","created Provides information when the TD instance was created. optional dateTime" +"td-vocab-data--EventAffordance","null","data Defines the data schema of the Event instance messages pushed by the Thing. optional DataSchema" +"td-vocab-dataResponse--EventAffordance","null","dataResponse Defines the data schema of the Event response messages sent by the consumer in a response to a data message. optional DataSchema" +"td-vocab-default--DataSchema","null","default Supply a default value. The value SHOULD validate against the data schema in which it resides. optional any type" +"td-vocab-description--DataSchema","null","description Provides additional (human-readable) information based on a default language. optional string" +"td-vocab-description--InteractionAffordance","null","description Provides additional (human-readable) information based on a default language. optional string" +"td-vocab-description--SecurityScheme","null","description Provides additional (human-readable) information based on a default language. optional string" +"td-vocab-description--Thing","null","description Provides additional (human-readable) information based on a default language. optional string" +"td-vocab-descriptions--DataSchema","null","descriptions Can be used to support (human-readable) information in different languages. Also see MultiLanguage. optional Map of MultiLanguage" +"td-vocab-descriptions--InteractionAffordance","null","descriptions Can be used to support (human-readable) information in different languages. Also see MultiLanguage. optional Map of MultiLanguage" +"td-vocab-descriptions--SecurityScheme","null","descriptions Can be used to support (human-readable) information in different languages. Also see MultiLanguage. optional Map of MultiLanguage" +"td-vocab-descriptions--Thing","null","descriptions Can be used to support (human-readable) information in different languages. Also see MultiLanguage. optional Map of MultiLanguage" +"td-vocab-enum--DataSchema","null","enum Restricted set of values provided as an array. optional Array of any type" +"td-vocab-events--Thing","null","events All Event-based Interaction Affordances of the Thing. optional Map of EventAffordance" +"td-vocab-exclusiveMaximum--IntegerSchema","null","exclusiveMaximum Specifies a maximum numeric value, representing an exclusive upper limit. Only applicable for associated number or integer types. optional integer" +"td-vocab-exclusiveMaximum--NumberSchema","null","exclusiveMaximum Specifies a maximum numeric value, representing an exclusive upper limit. Only applicable for associated number or integer types. optional double" +"td-vocab-exclusiveMinimum--IntegerSchema","null","exclusiveMinimum Specifies a minimum numeric value, representing an exclusive lower limit. Only applicable for associated number or integer types. optional integer" +"td-vocab-exclusiveMinimum--NumberSchema","null","exclusiveMinimum Specifies a minimum numeric value, representing an exclusive lower limit. Only applicable for associated number or integer types. optional double" +"td-vocab-flow--OAuth2SecurityScheme","null","flow Authorization flow. mandatory string (e.g., code, or client)" +"td-vocab-format--BearerSecurityScheme","null","format Specifies format of security authentication information. with default string (e.g., jwt, cwt, jwe, or jws)" +"td-vocab-format--DataSchema","null","format Allows validation based on a format pattern such as ""date-time"", ""email"", ""uri"", etc. (Also see below.) optional string" +"td-vocab-forms--InteractionAffordance","null","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" +"td-vocab-forms--Thing","null","forms Set 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. optional Array of Form" +"td-vocab-href--Form","null","href Target IRI of a link or submission target of a form. mandatory anyURI" +"td-vocab-href--Link","null","href Target IRI of a link or submission target of a form. mandatory anyURI" +"td-vocab-hreflang--Link","null","hreflang The hreflang attribute specifies the language of a linked document. The value of this must be a valid language tag [[BCP47]]. optional string or Array of string" +"td-vocab-id--Thing","null","id Identifier of the Thing in form of a URI [[RFC3986]] (e.g., stable URI, temporary and mutable URI, URI with local IP address, URN, etc.). optional anyURI" +"td-vocab-idempotent--ActionAffordance","null","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" +"td-vocab-identity--PSKSecurityScheme","null","identity Identifier providing information which can be used for selection or confirmation. optional string" +"td-vocab-in--APIKeySecurityScheme","null","in Specifies the location of security authentication information. with default string (one of header, query, body, cookie, uri, or auto)" +"td-vocab-in--BasicSecurityScheme","null","in Specifies the location of security authentication information. with default string (one of header, query, body, cookie, or auto)" +"td-vocab-in--BearerSecurityScheme","null","in Specifies the location of security authentication information. with default string (one of header, query, body, cookie, or auto)" +"td-vocab-in--DigestSecurityScheme","null","in Specifies the location of security authentication information. with default string (one of header, query, body, cookie, or auto)" +"td-vocab-input--ActionAffordance","null","input Used to define the input data schema of the Action. optional DataSchema" +"td-vocab-instance--VersionInfo","null","instance Provides a version indicator of this TD. mandatory string" +"td-vocab-items--ArraySchema","null","items Used to define the characteristics of an array. optional DataSchema or Array of DataSchema" +"td-vocab-links--Thing","null","links Provides Web links to arbitrary resources that relate to the specified Thing Description. optional Array of Link" +"td-vocab-maxItems--ArraySchema","null","maxItems Defines the maximum number of items that have to be in the array. optional unsignedInt" +"td-vocab-maxLength--StringSchema","null","maxLength Specifies the maximum length of a string. Only applicable for associated string types. optional unsignedInt" +"td-vocab-maximum--IntegerSchema","null","maximum Specifies a maximum numeric value, representing an inclusive upper limit. Only applicable for associated number or integer types. optional integer" +"td-vocab-maximum--NumberSchema","null","maximum Specifies a maximum numeric value, representing an inclusive upper limit. Only applicable for associated number or integer types. optional double" +"td-vocab-minItems--ArraySchema","null","minItems Defines the minimum number of items that have to be in the array. optional unsignedInt" +"td-vocab-minLength--StringSchema","null","minLength Specifies the minimum length of a string. Only applicable for associated string types. optional unsignedInt" +"td-vocab-minimum--IntegerSchema","null","minimum Specifies a minimum numeric value, representing an inclusive lower limit. Only applicable for associated number or integer types. optional integer" +"td-vocab-minimum--NumberSchema","null","minimum Specifies a minimum numeric value, representing an inclusive lower limit. Only applicable for associated number or integer types. optional double" +"td-vocab-model--VersionInfo","null","model Provides a version indicator of the underlying TM. optional string" +"td-vocab-modified--Thing","null","modified Provides information when the TD instance was last modified. optional dateTime" +"td-vocab-multipleOf--IntegerSchema","null","multipleOf Specifies the multipleOf value number. The value must strictly greater than 0. Only applicable for associated number or integer types. optional integer" +"td-vocab-multipleOf--NumberSchema","null","multipleOf Specifies the multipleOf value number. The value must strictly greater than 0. Only applicable for associated number or integer types. optional double" +"td-vocab-name--APIKeySecurityScheme","null","name Name for query, header, cookie, or uri parameters. optional string" +"td-vocab-name--BasicSecurityScheme","null","name Name for query, header, cookie, or uri parameters. optional string" +"td-vocab-name--BearerSecurityScheme","null","name Name for query, header, cookie, or uri parameters. optional string" +"td-vocab-name--DigestSecurityScheme","null","name Name for query, header, cookie, or uri parameters. optional string" +"td-vocab-observable--PropertyAffordance","null","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" +"td-vocab-oneOf--ComboSecurityScheme","null","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" +"td-vocab-oneOf--DataSchema","null","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" +"td-vocab-op--Form","null","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)" "td-vocab-op--Form_cancelaction","null","Type: MUST be string or Array of string (cancelaction)." "td-vocab-op--Form_invokeaction","null","Type: MUST be string or Array of string (invokeaction)." "td-vocab-op--Form_observeallproperties","null","Type: MUST be string or Array of string (observeallproperties)." @@ -355,22 +355,22 @@ "td-vocab-op--Form_writeallproperties","null","Type: MUST be string or Array of string (writeallproperties)." "td-vocab-op--Form_writemultipleproperties","null","Type: MUST be string or Array of string (writemultipleproperties)." "td-vocab-op--Form_writeproperty","null","Type: MUST be string or Array of string (writeproperty)." -"td-vocab-output--ActionAffordance","null","outputUsed to define the output data schema of the Action.optionalDataSchema" -"td-vocab-pattern--StringSchema","null","patternProvides a regular expression to express constraints of the string value. The regular expression must follow the [[ECMA-262]] dialect.optionalstring" -"td-vocab-profile--Thing","null","profileIndicates the WoT Profile mechanisms followed by this Thing Description and the corresponding Thing implementation.optionalanyURI or Array of anyURI" -"td-vocab-properties--ObjectSchema","null","propertiesData schema nested definitions.optionalMap of DataSchema" -"td-vocab-properties--Thing","null","propertiesAll Property-based Interaction Affordances of the Thing.optionalMap of PropertyAffordance" -"td-vocab-proxy--SecurityScheme","null","proxyURI of the proxy server this security configuration provides access to. If not given, the corresponding security configuration is for the endpoint.optionalanyURI" -"td-vocab-qop--DigestSecurityScheme","null","qopQuality of protection.with defaultstring (one of auth, or auth-int)" -"td-vocab-readOnly--DataSchema","null","readOnlyBoolean value that is a hint to indicate whether a property interaction / value is read only (=true) or not (=false).with defaultboolean" -"td-vocab-refresh--OAuth2SecurityScheme","null","refreshURI of the refresh server.optionalanyURI" -"td-vocab-rel--Link","null","relA link relation type identifies the semantics of a link.optionalstring" -"td-vocab-required--ObjectSchema","null","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" -"td-vocab-response--Form","null","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" -"td-vocab-safe--ActionAffordance","null","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" -"td-vocab-schema--AdditionalExpectedResponse","null","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" -"td-vocab-schemaDefinitions--Thing","null","schemaDefinitionsSet of named data schemas. To be used in a schema name-value pair inside an AdditionalExpectedResponse object.optionalMap of DataSchema" -"td-vocab-scheme--SecurityScheme","null","schemeIdentification of the security mechanism being configured.mandatorystring (e.g., nosec, combo, basic, digest, bearer, psk, oauth2, apikey, or auto)" +"td-vocab-output--ActionAffordance","null","output Used to define the output data schema of the Action. optional DataSchema" +"td-vocab-pattern--StringSchema","null","pattern Provides a regular expression to express constraints of the string value. The regular expression must follow the [[ECMA-262]] dialect. optional string" +"td-vocab-profile--Thing","null","profile Indicates the WoT Profile mechanisms followed by this Thing Description and the corresponding Thing implementation. optional anyURI or Array of anyURI" +"td-vocab-properties--ObjectSchema","null","properties Data schema nested definitions. optional Map of DataSchema" +"td-vocab-properties--Thing","null","properties All Property-based Interaction Affordances of the Thing. optional Map of PropertyAffordance" +"td-vocab-proxy--SecurityScheme","null","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" +"td-vocab-qop--DigestSecurityScheme","null","qop Quality of protection. with default string (one of auth, or auth-int)" +"td-vocab-readOnly--DataSchema","null","readOnly Boolean value that is a hint to indicate whether a property interaction / value is read only (=true) or not (=false). with default boolean" +"td-vocab-refresh--OAuth2SecurityScheme","null","refresh URI of the refresh server. optional anyURI" +"td-vocab-rel--Link","null","rel A link relation type identifies the semantics of a link. optional string" +"td-vocab-required--ObjectSchema","null","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" +"td-vocab-response--Form","null","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" +"td-vocab-safe--ActionAffordance","null","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" +"td-vocab-schema--AdditionalExpectedResponse","null","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" +"td-vocab-schemaDefinitions--Thing","null","schemaDefinitions Set of named data schemas. To be used in a schema name-value pair inside an AdditionalExpectedResponse object. optional Map of DataSchema" +"td-vocab-scheme--SecurityScheme","null","scheme Identification of the security mechanism being configured. mandatory string (e.g., nosec, combo, basic, digest, bearer, psk, oauth2, apikey, or auto)" "td-vocab-scheme--SecurityScheme_apikey","null","scheme: Identification of security mechanism being configured MAY be set to ""apikey""." "td-vocab-scheme--SecurityScheme_auto","null","scheme: Identification of security mechanism being configured MAY be set to ""auto""." "td-vocab-scheme--SecurityScheme_basic","null","scheme: Identification of security mechanism being configured MAY be set to ""basic""." @@ -379,25 +379,25 @@ "td-vocab-scheme--SecurityScheme_nosec","null","scheme: Identification of security mechanism being configured MAY be set to ""nosec""." "td-vocab-scheme--SecurityScheme_oauth2","null","scheme: Identification of security mechanism being configured MAY be set to ""oauth2""." "td-vocab-scheme--SecurityScheme_psk","null","scheme: Identification of security mechanism being configured MAY be set to ""psk""." -"td-vocab-scopes--Form","null","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" -"td-vocab-scopes--OAuth2SecurityScheme","null","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" -"td-vocab-security--Form","null","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" -"td-vocab-security--Thing","null","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" -"td-vocab-securityDefinitions--Thing","null","securityDefinitionsSet of named security configurations (definitions only). Not actually applied unless names are used in a security name-value pair.mandatoryMap of SecurityScheme" -"td-vocab-sizes--Link","null","sizesTarget attribute that specifies one or more sizes for the referenced icon. Only applicable for relation type ""icon"". The value pattern follows {Height}x{Width} (e.g., ""16x16"", ""16x16 32x32"").optionalstring" -"td-vocab-subprotocol--Form","null","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)" -"td-vocab-subscription--EventAffordance","null","subscriptionDefines data that needs to be passed upon subscription, e.g., filters or message format for setting up Webhooks.optionalDataSchema" -"td-vocab-success--AdditionalExpectedResponse","null","successSignals if an additional response should not be considered an error.with defaultboolean" -"td-vocab-support--Thing","null","supportProvides information about the TD maintainer as URI scheme (e.g., mailto [[RFC6068]], tel [[RFC3966]], https [[RFC9112]]).optionalanyURI" -"td-vocab-synchronous--ActionAffordance","null","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" -"td-vocab-title--DataSchema","null","titleProvides a human-readable title (e.g., display a text for UI representation) based on a default language.optionalstring" -"td-vocab-title--InteractionAffordance","null","titleProvides a human-readable title (e.g., display a text for UI representation) based on a default language.optionalstring" -"td-vocab-title--Thing","null","titleProvides a human-readable title (e.g., display a text for UI representation) based on a default language.mandatorystring" -"td-vocab-titles--DataSchema","null","titlesProvides multi-language human-readable titles (e.g., display a text for UI representation in different languages). Also see MultiLanguage.optionalMap of MultiLanguage" -"td-vocab-titles--InteractionAffordance","null","titlesProvides multi-language human-readable titles (e.g., display a text for UI representation in different languages). Also see MultiLanguage.optionalMap of MultiLanguage" -"td-vocab-titles--Thing","null","titlesProvides multi-language human-readable titles (e.g., display a text for UI representation in different languages). Also see MultiLanguage.optionalMap of MultiLanguage" -"td-vocab-token--OAuth2SecurityScheme","null","tokenURI of the token server.optionalanyURI" -"td-vocab-type--DataSchema","null","typeAssignment of JSON-based data types compatible with JSON Schema (one of boolean, integer, number, string, object, array, or null).optionalstring (one of object, array, string, number, integer, boolean, or null)" +"td-vocab-scopes--Form","null","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" +"td-vocab-scopes--OAuth2SecurityScheme","null","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" +"td-vocab-security--Form","null","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" +"td-vocab-security--Thing","null","security Set of security definition names, chosen from those defined in securityDefinitions. These must all be satisfied for access to resources. mandatory string or Array of string" +"td-vocab-securityDefinitions--Thing","null","securityDefinitions Set of named security configurations (definitions only). Not actually applied unless names are used in a security name-value pair. mandatory Map of SecurityScheme" +"td-vocab-sizes--Link","null","sizes Target attribute that specifies one or more sizes for the referenced icon. Only applicable for relation type ""icon"". The value pattern follows {Height}x{Width} (e.g., ""16x16"", ""16x16 32x32""). optional string" +"td-vocab-subprotocol--Form","null","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)" +"td-vocab-subscription--EventAffordance","null","subscription Defines data that needs to be passed upon subscription, e.g., filters or message format for setting up Webhooks. optional DataSchema" +"td-vocab-success--AdditionalExpectedResponse","null","success Signals if an additional response should not be considered an error. with default boolean" +"td-vocab-support--Thing","null","support Provides information about the TD maintainer as URI scheme (e.g., mailto [[RFC6068]], tel [[RFC3966]], https [[RFC9112]]). optional anyURI" +"td-vocab-synchronous--ActionAffordance","null","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" +"td-vocab-title--DataSchema","null","title Provides a human-readable title (e.g., display a text for UI representation) based on a default language. optional string" +"td-vocab-title--InteractionAffordance","null","title Provides a human-readable title (e.g., display a text for UI representation) based on a default language. optional string" +"td-vocab-title--Thing","null","title Provides a human-readable title (e.g., display a text for UI representation) based on a default language. mandatory any type" +"td-vocab-titles--DataSchema","null","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" +"td-vocab-titles--InteractionAffordance","null","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" +"td-vocab-titles--Thing","null","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" +"td-vocab-token--OAuth2SecurityScheme","null","token URI of the token server. optional anyURI" +"td-vocab-type--DataSchema","null","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)" "td-vocab-type--DataSchema_array","null","type: Assignment of JSON-based data types MUST be compatible with JSON Schema (array)." "td-vocab-type--DataSchema_boolean","null","type: Assignment of JSON-based data types MUST be compatible with JSON Schema (boolean)." "td-vocab-type--DataSchema_integer","null","type: Assignment of JSON-based data types MUST be compatible with JSON Schema (integer)." @@ -405,12 +405,12 @@ "td-vocab-type--DataSchema_number","null","type: Assignment of JSON-based data types MUST be compatible with JSON Schema (number)." "td-vocab-type--DataSchema_object","null","type: Assignment of JSON-based data types MUST be compatible with JSON Schema (object)." "td-vocab-type--DataSchema_string","null","type: Assignment of JSON-based data types MUST be compatible with JSON Schema (string)." -"td-vocab-type--Link","null","typeTarget attribute providing a hint indicating what the media type [RFC2046] of the result of dereferencing the link should be.optionalstring" -"td-vocab-unit--DataSchema","null","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" -"td-vocab-uriVariables--InteractionAffordance","null","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" -"td-vocab-uriVariables--Thing","null","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" -"td-vocab-version--Thing","null","versionProvides version information.optionalVersionInfo" -"td-vocab-writeOnly--DataSchema","null","writeOnlyBoolean value that is a hint to indicate whether a property interaction / value is write only (=true) or not (=false).with defaultboolean" +"td-vocab-type--Link","null","type Target attribute providing a hint indicating what the media type [RFC2046] of the result of dereferencing the link should be. optional string" +"td-vocab-unit--DataSchema","null","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" +"td-vocab-uriVariables--InteractionAffordance","null","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" +"td-vocab-uriVariables--Thing","null","uriVariables Define 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. optional Map of DataSchema" +"td-vocab-version--Thing","null","version Provides version information. optional VersionInfo" +"td-vocab-writeOnly--DataSchema","null","writeOnly Boolean value that is a hint to indicate whether a property interaction / value is write only (=true) or not (=false). with default boolean" "td-vocabulary-defaults","null","When assignments in a TD are missing, a TD Processor MUST follow the Default Value assignments expressed in the table of Default Value Definitions." "tm-compose-instanceName","null","Optionally an instanceName MAY be provided to associate an individual name to the composed (sub-) Thing Model." "tm-compose-name-collision","null","Thereby the generation process MUST avoid possible name collisions." diff --git a/validation/td-json-schema-validation.json b/validation/td-json-schema-validation.json index 9dc9d2591..6c5b2dfb8 100644 --- a/validation/td-json-schema-validation.json +++ b/validation/td-json-schema-validation.json @@ -318,8 +318,7 @@ "contentType": { "type": "string" } - }, - "required": ["contentType"] + } }, "form_element_base": { "type": "object", diff --git a/validation/td-validation.ttl b/validation/td-validation.ttl index 17de69341..abacfedc5 100644 --- a/validation/td-validation.ttl +++ b/validation/td-validation.ttl @@ -632,7 +632,6 @@ sh:nodeKind sh:Literal ; sh:datatype xsd:string ; sh:maxCount 1 ; - sh:defaultValue "application/json"^^xsd:string ; sh:order 3 ; ] ; sh:property [ @@ -989,24 +988,20 @@

The optional response name-value pair can be used to provide metadata for the expected response message. - With the core vocabulary, it only includes + With the core vocabulary, it can include only 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 + 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.

+ data-link-type="dfn">Default Value. +

In some cases additional responses might be possible. One example of this is error responses but in some cases @@ -1023,45 +1018,57 @@ 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. + 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` key-value pair can describe the content type of the expected + response. + As there is no default value defined, the following assertions apply: +

+
    +
  • + + If there is no `contentType` value defined in a `response` object within a form, a Consumer MUST + expect that the respective response does not contain any payload. + +
  • +
  • + + If a content type is defined in the `response` object within a form, a Consumer MUST expect a + response containing a payload in the respective format, e.g., an image in the case of `image/jpeg`. + +
  • +
+

+ Similar considerations apply to additional responses:

+
    +
  • + + 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`. + +
  • +
  • + + If there is no `contentType` value defined in an additional expected response object, a + Consumer MUST expect that the respective response does not contain any payload. + +
  • +
  • + + If the data schema of an additional expected response differs from the output data schema of the + interaction, the `Form` MUST include an entry in the array associated with the name + `additionalResponses` that includes a value for the name `schema`. + +
  • +
  • + + The `schema` of an additional expected response object MUST NOT be defined when there is no + `contentType` present. + +
  • +

The different cases on the variation of request and response are explained above. The tables at summarize these cases in a concise manner. @@ -1320,7 +1327,6 @@ sh:nodeKind sh:Literal ; sh:datatype xsd:string ; sh:maxCount 1 ; - sh:minCount 1 ; ] . :AdditionalExpectedResponseShape a sh:NodeShape ; @@ -1357,7 +1363,6 @@ the media type [RFC2046]."""^^rdf:HTML ; sh:nodeKind sh:Literal ; sh:datatype xsd:string ; - sh:defaultValue false ; sh:maxCount 1 ; ] . diff --git a/visualization/hctl.svg b/visualization/hctl.svg index 2dbcab1b2..0bbc292b1 100644 --- a/visualization/hctl.svg +++ b/visualization/hctl.svg @@ -1,13 +1,13 @@ - - + - + AdditionalExpectedResponse @@ -33,110 +33,108 @@ ExpectedResponse - - -ExpectedResponse - - -contentType - : -string - -(mandatory) + + +ExpectedResponse + + +contentType + : +string Form - - -Form - - -href - : -anyURI - -(mandatory) - - -contentType - : -string - - -contentCoding - : -string - - -subprotocol - : -string - - -security - : (Array of) -string - - -scopes - : (Array of) -string + + +Form + + +href + : +anyURI + +(mandatory) + + +contentType + : +string + + +contentCoding + : +string + + +subprotocol + : +string + + +security + : (Array of) +string + + +scopes + : (Array of) +string Form->AdditionalExpectedResponse - - -additionalResponses -0..* + + +additionalResponses +0..* Form->ExpectedResponse - - -response -0..1 + + +response +0..1 Link - - -Link - - -href - : -anyURI - -(mandatory) - - -type - : -string - - -rel - : -string - - -anchor - : -anyURI - - -sizes - : -string - - -hreflang - : (Array of) -string + + +Link + + +href + : +anyURI + +(mandatory) + + +type + : +string + + +rel + : +string + + +anchor + : +anyURI + + +sizes + : +string + + +hreflang + : (Array of) +string diff --git a/visualization/jsonschema.svg b/visualization/jsonschema.svg index 908571ff2..481b5244d 100644 --- a/visualization/jsonschema.svg +++ b/visualization/jsonschema.svg @@ -1,7 +1,7 @@ - ArraySchema->DataSchema -items +items 0..* @@ -115,7 +115,7 @@ DataSchema->MultiLanguage -titles +titles 0..* @@ -123,7 +123,7 @@ DataSchema->MultiLanguage -descriptions +descriptions 0..* @@ -232,7 +232,7 @@ ObjectSchema->DataSchema -properties +properties 0..* diff --git a/visualization/td.svg b/visualization/td.svg index 5b686f11b..1402b71c0 100644 --- a/visualization/td.svg +++ b/visualization/td.svg @@ -1,375 +1,375 @@ - - + - + ActionAffordance - - -ActionAffordance - - -safe - : -boolean - - -idempotent - : -boolean - - -synchronous - : -boolean + + +ActionAffordance + + +safe + : +boolean + + +idempotent + : +boolean + + +synchronous + : +boolean InteractionAffordance - - -InteractionAffordance - - -title - : -langString - - -description - : -langString + + +InteractionAffordance + + +title + : +langString + + +description + : +langString ActionAffordance->InteractionAffordance - - + + DataSchema - - -DataSchema + + +DataSchema ActionAffordance->DataSchema - - -input -0..1 + + +input +0..1 ActionAffordance->DataSchema - - -output -0..1 + + +output +0..1 EventAffordance - - -EventAffordance + + +EventAffordance EventAffordance->InteractionAffordance - - + + EventAffordance->DataSchema - - -subscription -0..1 + + +subscription +0..1 EventAffordance->DataSchema - - -data -0..1 + + +data +0..1 EventAffordance->DataSchema - - -dataResponse -0..1 + + +dataResponse +0..1 EventAffordance->DataSchema - - -cancellation -0..1 + + +cancellation +0..1 MultiLanguage - - -MultiLanguage + + +MultiLanguage InteractionAffordance->MultiLanguage - - -titles -0..* + + +titles +0..* InteractionAffordance->MultiLanguage - - -descriptions -0..* + + +descriptions +0..* Form - - -Form + + +Form InteractionAffordance->Form - - -forms -1..* + + +forms +1..* InteractionAffordance->DataSchema - - -uriVariables -0..* + + +uriVariables +0..* PropertyAffordance - - -PropertyAffordance - - -observable - : -boolean + + +PropertyAffordance + + +observable + : +boolean PropertyAffordance->InteractionAffordance - - + + Thing - - -Thing - - -@context - : -anyURI - or Array - -(mandatory) - - -@type - : -(Array of) -string - - -id - : -anyURI - -(mandatory) - - -security - : (Array of) -string - -(mandatory) - - -profile - : (Array of) -anyURI - - -description - : -langString - - -created - : -dateTime - - -modified - : -dateTime - - -support - : -anyURI - - -base - : -anyURI + + +Thing + + +@context + : +anyURI + or Array + +(mandatory) + + +@type + : +(Array of) +string + + +id + : +anyURI + +(mandatory) + + +security + : (Array of) +string + +(mandatory) + + +profile + : (Array of) +anyURI + + +description + : +langString + + +created + : +dateTime + + +modified + : +dateTime + + +support + : +anyURI + + +base + : +anyURI Thing->ActionAffordance - - -actions -0..* + + +actions +0..* Thing->EventAffordance - - -events -0..* + + +events +0..* Thing->MultiLanguage - - -titles -0..* + + +titles +0..* Thing->MultiLanguage - - -descriptions -0..* + + +descriptions +0..* Thing->PropertyAffordance - - -properties -0..* + + +properties +0..* VersionInfo - - -VersionInfo - - -instance - : -string - -(mandatory) - - -model - : -string + + +VersionInfo + + +instance + : +string + +(mandatory) + + +model + : +string Thing->VersionInfo - - -version -0..1 + + +version +0..1 Thing->Form - - -forms -0..* + + +forms +0..* Link - - -Link + + +Link Thing->Link - - -links -0..* + + +links +0..* Thing->DataSchema - - -schemaDefinitions -0..* + + +schemaDefinitions +0..* Thing->DataSchema - - -uriVariables -0..* + + +uriVariables +0..* SecurityScheme - - -SecurityScheme + + +SecurityScheme Thing->SecurityScheme - - -securityDefinitions -1..* + + +securityDefinitions +1..* diff --git a/visualization/tm.svg b/visualization/tm.svg index 02d0cd41e..3dc0200cf 100644 --- a/visualization/tm.svg +++ b/visualization/tm.svg @@ -1,7 +1,7 @@ - -