From 0e5a6b119b129a1810dcfa18313a195bc895ba7e Mon Sep 17 00:00:00 2001 From: reluc Date: Wed, 3 Aug 2022 11:41:58 +0200 Subject: [PATCH] fix jsonld type of additionalResponses and ComboSec oneOf and allOf --- context/hypermedia-context.jsonld | 3 ++- context/td-context-1.1.jsonld | 18 ++++++++++++------ context/td-context.ttl | 6 ++++++ context/wot-security-context.jsonld | 6 ++++-- index.html | 6 +++--- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/context/hypermedia-context.jsonld b/context/hypermedia-context.jsonld index af4ed343f..5bdb9919a 100644 --- a/context/hypermedia-context.jsonld +++ b/context/hypermedia-context.jsonld @@ -78,7 +78,8 @@ "@id": "hctl:returns" }, "additionalResponses": { - "@id": "hctl:additionalReturns" + "@id": "hctl:additionalReturns", + "@container": "@set" }, "schema": { "@id": "hctl:hasAdditionalOutputSchema", diff --git a/context/td-context-1.1.jsonld b/context/td-context-1.1.jsonld index 334021478..2afdc697f 100644 --- a/context/td-context-1.1.jsonld +++ b/context/td-context-1.1.jsonld @@ -215,10 +215,12 @@ "@id": "wotsec:identity" }, "allOf": { - "@id": "wotsec:allOf" + "@id": "wotsec:allOf", + "@container": "@set" }, "oneOf": { - "@id": "wotsec:oneOf" + "@id": "wotsec:oneOf", + "@container": "@set" }, "scheme": { "@id": "@type" @@ -303,10 +305,12 @@ "@id": "wotsec:identity" }, "allOf": { - "@id": "wotsec:allOf" + "@id": "wotsec:allOf", + "@container": "@set" }, "oneOf": { - "@id": "wotsec:oneOf" + "@id": "wotsec:oneOf", + "@container": "@set" }, "scheme": { "@id": "@type" @@ -454,7 +458,8 @@ "@id": "hctl:returns" }, "additionalResponses": { - "@id": "hctl:additionalReturns" + "@id": "hctl:additionalReturns", + "@container": "@set" }, "schema": { "@id": "hctl:hasAdditionalOutputSchema", @@ -552,7 +557,8 @@ "@id": "hctl:returns" }, "additionalResponses": { - "@id": "hctl:additionalReturns" + "@id": "hctl:additionalReturns", + "@container": "@set" }, "schema": { "@id": "hctl:hasAdditionalOutputSchema", diff --git a/context/td-context.ttl b/context/td-context.ttl index c057dc948..669e4732d 100644 --- a/context/td-context.ttl +++ b/context/td-context.ttl @@ -343,10 +343,12 @@ _:hasSecurityConfiguration-context _:h _:hasSecurityConfiguration-allOf . _:hasSecurityConfiguration-allOf "allOf" . _:hasSecurityConfiguration-allOf . +_:hasSecurityConfiguration-allOf . _:hasSecurityConfiguration-context _:hasSecurityConfiguration-oneOf . _:hasSecurityConfiguration-oneOf . _:hasSecurityConfiguration-oneOf "oneOf" . _:hasSecurityConfiguration-oneOf . +_:hasSecurityConfiguration-oneOf . _:hasSecurityConfiguration-context _:hasSecurityConfiguration-scheme . _:hasSecurityConfiguration-scheme . _:hasSecurityConfiguration-scheme "scheme" . @@ -500,10 +502,12 @@ _:definesSecurityScheme-context _:defi _:definesSecurityScheme-allOf . _:definesSecurityScheme-allOf "allOf" . _:definesSecurityScheme-allOf . +_:definesSecurityScheme-allOf . _:definesSecurityScheme-context _:definesSecurityScheme-oneOf . _:definesSecurityScheme-oneOf . _:definesSecurityScheme-oneOf "oneOf" . _:definesSecurityScheme-oneOf . +_:definesSecurityScheme-oneOf . _:definesSecurityScheme-context _:definesSecurityScheme-scheme . _:definesSecurityScheme-scheme . _:definesSecurityScheme-scheme "scheme" . @@ -788,6 +792,7 @@ _:hasForm-context _:hasForm-additional _:hasForm-additionalResponses . _:hasForm-additionalResponses "additionalResponses" . _:hasForm-additionalResponses . +_:hasForm-additionalResponses . _:hasForm-context _:hasForm-schema . _:hasForm-schema . _:hasForm-schema "schema" . @@ -972,6 +977,7 @@ _:hasLink-context _:hasLink-additional _:hasLink-additionalResponses . _:hasLink-additionalResponses "additionalResponses" . _:hasLink-additionalResponses . +_:hasLink-additionalResponses . _:hasLink-context _:hasLink-schema . _:hasLink-schema . _:hasLink-schema "schema" . diff --git a/context/wot-security-context.jsonld b/context/wot-security-context.jsonld index 51e964f8d..24ddb6105 100644 --- a/context/wot-security-context.jsonld +++ b/context/wot-security-context.jsonld @@ -48,10 +48,12 @@ "@id": "wotsec:identity" }, "allOf": { - "@id": "wotsec:allOf" + "@id": "wotsec:allOf", + "@container": "@set" }, "oneOf": { - "@id": "wotsec:oneOf" + "@id": "wotsec:oneOf", + "@container": "@set" }, "scheme": { "@id": "@type" diff --git a/index.html b/index.html index c7d446e7f..0fab7d5d9 100644 --- a/index.html +++ b/index.html @@ -1863,8 +1863,8 @@

Security Vocabulary Definitions

"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

This section is at risk.

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 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 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.mandatorystring or Array of string
allOfArray of two or more strings identifying other named security scheme definitions, all of which must be satisfied for access.mandatorystring or Array of string
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 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., @@ -2224,7 +2224,7 @@

Hypermedia Controls Vocabulary Definitions

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.optionalAdditionalExpectedResponse or Array of AdditionalExpectedResponse + 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