Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHACL validation errors #1966

Merged
merged 6 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions index.html
egekorkan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -30,60 +30,60 @@
name: "Sebastian Kaebisch",
w3cid: "43064",
company: "Siemens AG",
companyURL: "https://www.siemens.com/",
companyURL: "https://www.siemens.com/"
},
{
name: "Michael McCool",
w3cid: "93137",
company: "Intel Corp.",
companyURL: "https://www.intel.com",
companyURL: "https://www.intel.com"
},
{
name: "Ege Korkan",
w3cid: "110131",
company: "Siemens AG",
companyURL: "https://www.siemens.com/",
},
companyURL: "https://www.siemens.com/"
}
],
formerEditors: [
{
name: "Takuki Kamiya",
w3cid: "29376",
company: "Fujitsu Research of America",
companyURL: "https://www.fujitsu.com/global/",
companyURL: "https://www.fujitsu.com/global/"
},
{
name: "Victor Charpenay",
w3cid: "84448",
note: "when at Siemens AG",
note: "when at Siemens AG"
},
{
name: "Matthias Kovatsch",
note: "when at Huawei",
},
note: "when at Huawei"
}
],
xref: ["i18n-glossary"],
localBiblio: {
"LINKSET-MEDIA-TYPES": {
title: "Linkset: Media Types and a Link Relation Type for Link Sets",
href: "https://datatracker.ietf.org/doc/draft-ietf-httpapi-linkset/",
publisher: "IETF",
authors: ["Erik Wilde", "Herbert Van de Sompel"],
authors: ["Erik Wilde", "Herbert Van de Sompel"]
},
"OWASP-Top-10": {
title: "OWASP Top Ten",
href: "https://owasp.org/www-project-top-ten/",
publisher: "OWASP",
publisher: "OWASP"
},
"JSON-SCHEMA": {
title: "JSON Schema Validation: A Vocabulary for Structural Validation of JSON",
href: "https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01",
authors: ["Austin Wright", "Henry Andrews", "Geraint Luff"],
status: "Internet-Draft",
date: "19 March 2018",
publisher: "IETF",
publisher: "IETF"
},
OPENAPI: {
"OPENAPI": {
title: "OpenAPI Specification: Version 3.0.1",
href: "https://spec.openapis.org/oas/v3.0.1",
authors: [
Expand All @@ -92,23 +92,23 @@
"Marsh Gardiner",
"Mike Ralphson",
"Ron Ratovsky",
"Uri Sarid",
"Uri Sarid"
],
publisher: "OpenAPI Initiative, Linux Foundation",
date: "6 December 2017",
date: "6 December 2017"
},
SEMVER: {
"SEMVER": {
title: "Semantic Versioning 2.0.0",
href: "https://semver.org/",
authors: ["Tom Preston-Werner"],
date: "26 December 2017",
date: "26 December 2017"
},
"WOT-ARCHITECTURE": {
title: "Web of Things (WoT) Architecture 1.1",
href: "https://www.w3.org/TR/wot-architecture11/",
authors: ["Michael Lagally", "Ryuichi Matsukura", "Kunihiko Toumura"],
publisher: "W3C",
date: "November 2020",
date: "November 2020"
},
"WOT-PROFILE": {
title: "Web of Things (WoT) Profile",
Expand All @@ -118,81 +118,81 @@
"Michael McCool",
"Ryuichi Matsukura",
"Sebastian Kaebisch",
"Tomoaki Mizushima",
"Tomoaki Mizushima"
],
publisher: "W3C",
date: "November 2020",
date: "November 2020"
},
"WOT-SECURITY-GUIDELINES": {
title: "Web of Things (WoT) Security and Privacy Guidelines",
//, href: "https://www.w3.org/TR/wot-security/"
href: "https://w3c.github.io/wot-security/",
authors: ["Michael McCool", "Elena Reshetova"],
publisher: "W3C",
date: "July 2021",
date: "July 2021"
},
MQTT: {
"MQTT": {
title: "MQTT Version 3.1.1",
href: "http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html",
authors: ["Andrew Banks", "Rahul Gupta"],
publisher: "OASIS",
date: "December 2015",
status: "OASIS Standard Incorporating Approved Errata 01",
status: "OASIS Standard Incorporating Approved Errata 01"
},
RIJGERSBERG: {
"RIJGERSBERG": {
href: "http://www.semantic-web-journal.net/content/ontology-units-measure-and-related-concepts",
authors: ["Hajo Rijgersberg", "Mark van Assem", "Jan Top"],
title: "Ontology of Units of Measure and Related Concepts",
publisher: "Semantic Web journal, IOS Press",
date: "2013",
date: "2013"
},
LDML: {
"LDML": {
title: "Unicode Technical Standard #35: Unicode Locale Data Markup Language (LDML)",
href: "https://unicode.org/reports/tr35/",
authors: ["Mark Davis", "CLDR Contributors"],
date: "March 2022",
date: "March 2022"
},
"JSON-SCHEMA-ONTOLOGY": {
title: "JSON Schema in RDF",
href: "https://www.w3.org/2019/wot/json-schema",
authors: ["Victor Charpenay", "Maxime Lefrançois", "María Poveda Villalón"],
publisher: "W3C",
date: "July 2022",
},
date: "July 2022"
}
},
otherLinks: [
{
key: "Previous Recommendation",
data: [
{
value: "https://www.w3.org/TR/2020/REC-wot-thing-description-20200409/",
href: "https://www.w3.org/TR/2020/REC-wot-thing-description-20200409/",
},
],
href: "https://www.w3.org/TR/2020/REC-wot-thing-description-20200409/"
}
]
},
{
key: "Contributors",
data: [
{
value: "In the GitHub repository",
href: "https://github.com/w3c/wot-thing-description/graphs/contributors",
},
],
href: "https://github.com/w3c/wot-thing-description/graphs/contributors"
}
]
},
{
key: "Repository",
data: [
{
value: "We are on GitHub",
href: "https://github.com/w3c/wot-thing-description/",
href: "https://github.com/w3c/wot-thing-description/"
},
{
value: "File a bug",
href: "https://github.com/w3c/wot-thing-description/issues",
},
],
},
],
href: "https://github.com/w3c/wot-thing-description/issues"
}
]
}
]
};
</script>
<style>
Expand Down Expand Up @@ -1110,7 +1110,7 @@ <h2>Core Vocabulary Definitions</h2>
Description, whereas a virtual entity is the composition
of one or more Things.</p><table class="def numbered"><caption>Vocabulary Terms in Thing Level</caption><thead><tr><th><a>Vocabulary term</a></th><th>Description</th><th>Assignment</th><th>Type</th></tr></thead><tbody><tr class="rfc2119-table-assertion" id="td-vocab-at-context--Thing"><td><code>@context</code></td><td>JSON-LD keyword to define short-hand names called terms that are used throughout a TD document.</td><td>mandatory</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#anyURI"><code>anyURI</code></a> or <a>Array</a></td></tr><tr class="rfc2119-table-assertion" id="td-vocab-at-type--Thing"><td><code>@type</code></td><td>JSON-LD keyword to label the object with <a>semantic tags</a> (or types).</td><td>optional</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> or <a>Array</a> of <a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a></td></tr><tr class="rfc2119-table-assertion" id="td-vocab-id--Thing"><td><code>id</code></td><td>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.).</td><td>optional</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#anyURI"><code>anyURI</code></a></td></tr><tr class="rfc2119-table-assertion" id="td-vocab-title--Thing"><td><code>title</code></td><td>Provides a human-readable title (e.g., display
a text for UI representation) based on a default
language.</td><td>mandatory</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a></td></tr>
language.</td><td>mandatory</td><td>any type</td></tr>
<tr class="rfc2119-table-assertion" id="td-vocab-titles--Thing"><td><code>titles</code></td><td>Provides multi-language human-readable titles
(e.g., display a text for UI representation in
different languages). Also see <cite><a href='#multilanguage'>MultiLanguage</a></cite>.</td><td>optional</td><td><a>Map</a> of <a href="#multilanguage"><code>MultiLanguage</code></a></td></tr>
Expand Down Expand Up @@ -1552,7 +1552,7 @@ <h2>Data Schema Vocabulary Definitions</h2>
below.)</td><td>optional</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a></td></tr>
<tr class="rfc2119-table-assertion" id="td-vocab-type--DataSchema"><td><code>type</code></td><td>Assignment of JSON-based data types compatible
with JSON Schema (one of boolean, integer, number,
string, object, array, or null).</td><td>optional</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (one of <code>object</code>, <code>array</code>, <code>string</code>, <code>number</code>, <code>integer</code>, <code>boolean</code>, or <code>null</code>)</td></tr></tbody></table><p>The class <code>DataSchema</code> has the following subclasses:</p><ul><li><a href="#arrayschema"><code>ArraySchema</code></a></li>
string, object, array, or null).</td><td>optional</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#anyURI"><code>anyURI</code></a> (one of <code>object</code>, <code>array</code>, <code>string</code>, <code>number</code>, <code>integer</code>, <code>boolean</code>, or <code>null</code>)</td></tr></tbody></table><p>The class <code>DataSchema</code> has the following subclasses:</p><ul><li><a href="#arrayschema"><code>ArraySchema</code></a></li>
<li><a href="#booleanschema"><code>BooleanSchema</code></a></li>
<li><a href="#numberschema"><code>NumberSchema</code></a></li>
<li><a href="#integerschema"><code>IntegerSchema</code></a></li>
Expand Down Expand Up @@ -1840,11 +1840,11 @@ <h2>Security Vocabulary Definitions</h2>
extensions</span>.</p><table class="def numbered"><caption>Vocabulary Terms in BearerSecurityScheme Level</caption><thead><tr><th><a>Vocabulary term</a></th><th>Description</th><th>Assignment</th><th>Type</th></tr></thead><tbody><tr class="rfc2119-table-assertion" id="td-vocab-authorization--BearerSecurityScheme"><td><code>authorization</code></td><td>URI of the authorization server.</td><td>optional</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#anyURI"><code>anyURI</code></a></td></tr>
<tr class="rfc2119-table-assertion" id="td-vocab-name--BearerSecurityScheme"><td><code>name</code></td><td>Name for query, header, cookie, or uri
parameters.</td><td>optional</td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a></td></tr>
<tr class="rfc2119-table-assertion" id="td-vocab-in--BearerSecurityScheme"><td><code>in</code></td><td>Specifies the location of security
authentication information. </td><td><a href="#sec-default-values">with default</a></td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (one of <code>header</code>, <code>query</code>, <code>body</code>, <code>cookie</code>, or <code>auto</code>)</td></tr>
<tr class="rfc2119-table-assertion" id="td-vocab-alg--BearerSecurityScheme"><td><code>alg</code></td><td>Encoding, encryption, or digest algorithm.</td><td><a href="#sec-default-values">with default</a></td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (e.g., <code>ES256</code>, or <code>ES512-256</code>)</td></tr>
<tr class="rfc2119-table-assertion" id="td-vocab-format--BearerSecurityScheme"><td><code>format</code></td><td>Specifies format of security authentication
information.</td><td><a href="#sec-default-values">with default</a></td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (e.g., <code>jwt</code>, <code>cwt</code>, <code>jwe</code>, or <code>jws</code>)</td></tr>
<tr class="rfc2119-table-assertion" id="td-vocab-in--BearerSecurityScheme"><td><code>in</code></td><td>Specifies the location of security
authentication information. </td><td><a href="#sec-default-values">with default</a></td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (one of <code>header</code>, <code>query</code>, <code>body</code>, <code>cookie</code>, or <code>auto</code>)</td></tr></tbody></table></section>
information.</td><td><a href="#sec-default-values">with default</a></td><td><a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a> (e.g., <code>jwt</code>, <code>cwt</code>, <code>jwe</code>, or <code>jws</code>)</td></tr></tbody></table></section>
<section><h3><code>PSKSecurityScheme</code></h3><p>Pre-shared key authentication security configuration
identified by the <a href="#dfn-vocab-term" class="internalDFN" data-link-type="dfn">Vocabulary Term</a>
<code>psk</code> (i.e., <code>"scheme":
Expand Down Expand Up @@ -1880,7 +1880,7 @@ <h2>Security Vocabulary Definitions</h2>
defined in [[!RFC8628]]. --> The mandatory elements for each flow are summarized in the
following table:
</p>
<table class="def numbered"> <tr><th>Element</th><th><code>code</code></th><th><code>client</code></th><!-- <th><code>device</code> --></th></tr> <tr><td><code>authorization</code></td><td>mandatory</td><td>omit</td><!-- <td>mandatory; refers to device authorization endpoint</td> --></tr> <tr><td><code>token</code></td><td>mandatory</td><td>mandatory</td><!-- <td>mandatory</td> --></tr> <tr><td><code>refresh</code></td><td>optional</td><td>optional</td><!-- <td>optional</td> --></tr> </table>
<table class="def numbered"> <tr><th>Element</th><th><code>code</code></th><th><code>client</code></th></tr> <tr><td><code>authorization</code></td><td>mandatory</td><td>omit</td><!-- <td>mandatory; refers to device authorization endpoint</td> --></tr> <tr><td><code>token</code></td><td>mandatory</td><td>mandatory</td><!-- <td>mandatory</td> --></tr> <tr><td><code>refresh</code></td><td>optional</td><td>optional</td><!-- <td>optional</td> --></tr> </table>
<!--
<p class="ednote"> Note that the <code>OAuth2SecurityScheme</code> class definition lists these elements as "optional".
In fact whether they are mandatory or not depends on the flow. The <code>token</code>
Expand Down
7 changes: 3 additions & 4 deletions validation/td-validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
a text for UI representation) based on a default
language."""^^rdf:HTML ;
sh:nodeKind sh:Literal ;
sh:datatype rdf:langString ;
sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was apparently not correct

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember wrestling with something like this, maybe the comments #1684 can help @mahdanoura or @egekorkan .

sh:minCount 1 ;
sh:maxCount 1 ;
sh:order 1 ;
Expand Down Expand Up @@ -1727,7 +1727,7 @@
defined in [[!RFC8628]]. --> The mandatory elements for each flow are summarized in the
following table:
</p>
<table class="def numbered"> <tr><th>Element</th><th><code>code</code></th><th><code>client</code></th><!-- <th><code>device</code> --></th></tr> <tr><td><code>authorization</code></td><td>mandatory</td><td>omit</td><!-- <td>mandatory; refers to device authorization endpoint</td> --></tr> <tr><td><code>token</code></td><td>mandatory</td><td>mandatory</td><!-- <td>mandatory</td> --></tr> <tr><td><code>refresh</code></td><td>optional</td><td>optional</td><!-- <td>optional</td> --></tr> </table>
<table class="def numbered"> <tr><th>Element</th><th><code>code</code></th><th><code>client</code></th></tr> <tr><td><code>authorization</code></td><td>mandatory</td><td>omit</td><!-- <td>mandatory; refers to device authorization endpoint</td> --></tr> <tr><td><code>token</code></td><td>mandatory</td><td>mandatory</td><!-- <td>mandatory</td> --></tr> <tr><td><code>refresh</code></td><td>optional</td><td>optional</td><!-- <td>optional</td> --></tr> </table>
<!--
<p class="ednote"> Note that the <code>OAuth2SecurityScheme</code> class definition lists these elements as "optional".
In fact whether they are mandatory or not depends on the flow. The <code>token</code>
Expand Down Expand Up @@ -1766,8 +1766,7 @@
with JSON Schema (one of boolean, integer, number,
string, object, array, or null)."""^^rdf:HTML ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal ;
sh:datatype xsd:string ;
sh:nodeKind sh:IRI ;
sh:in (
jsonschema:ObjectSchema
jsonschema:ArraySchema
Expand Down