Skip to content

Commit

Permalink
Merge branch 'master' into typo-detection
Browse files Browse the repository at this point in the history
  • Loading branch information
egekorkan authored Oct 7, 2022
2 parents 0e1136d + 664bb1d commit e49afd9
Show file tree
Hide file tree
Showing 224 changed files with 3,144 additions and 3,200 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# os
.DS_STORE

# node
node_modules

Expand All @@ -13,4 +16,4 @@ logs.json
log.json

# vscode
.vscode
.vscode
18 changes: 9 additions & 9 deletions packages/assertions/assertionTests-td.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
results.push({
"ID": schema.title,
"Status": "not-impl",
"Assertion": schema.description
"Description": schema.description
})
if (schema.hasOwnProperty("also")) {
const otherAssertions = schema.also
Expand All @@ -145,14 +145,14 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
results.push({
"ID": schema.title,
"Status": result,
"Assertion": schema.description
"Description": schema.description
})
} else {
results.push({
"ID": schema.title,
"Status": result,
"Comment": validPayload.ajvObject.errorsText(),
"Assertion": schema.description
"Description": schema.description
})
}
if (schema.hasOwnProperty("also")) {
Expand All @@ -170,7 +170,7 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
"ID": schema.title,
"Status": "fail",
"Comment": "Make sure you validate your TD before",
"Assertion": schema.description
"Description": schema.description
})

if (schema.hasOwnProperty("also")) {
Expand Down Expand Up @@ -198,7 +198,7 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
results.push({
"ID": asser,
"Status": "pass",
"Assertion": schema.description
"Description": schema.description
})
})
}
Expand All @@ -212,7 +212,7 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
"ID": schema.title,
"Status": "not-impl",
"Comment": validPayload.ajvObject.errorsText(),
"Assertion": schema.description
"Description": schema.description
})
if (schema.hasOwnProperty("also")) {
const otherAssertions = schema.also
Expand All @@ -221,7 +221,7 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
"ID": asser,
"Status": "not-impl",
"Comment": validPayload.ajvObject.errorsText(),
"Assertion": schema.description
"Description": schema.description
})
})
}
Expand All @@ -231,7 +231,7 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
"ID": schema.title,
"Status": "fail",
"Comment": validPayload.ajvObject.errorsText(),
"Assertion": schema.description
"Description": schema.description
})
if (schema.hasOwnProperty("also")) {
const otherAssertions = schema.also
Expand All @@ -240,7 +240,7 @@ function validateTD(tdData, assertions, manualAssertions, logFunc) {
"ID": asser,
"Status": "fail",
"Comment": validPayload.ajvObject.errorsText(),
"Assertion": schema.description
"Description": schema.description
})
})
}
Expand Down
9 changes: 2 additions & 7 deletions packages/assertions/assertionTests-tm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ const mergeIdenticalResults = require("./util").mergeIdenticalResults


// Imports from playground core
// const checkUniqueness = require('@thing-description-playground/core').propUniqueness
// const checkMultiLangConsistency = require("@thing-description-playground/core").multiLangConsistency
// const checkSecurity = require("@thing-description-playground/core").security
// const checkLinksRelTypeCount = require("@thing-description-playground/core").checkLinksRelTypeCount
const checkTmOptionalPointer = require("@thing-description-playground/core").checkTmOptionalPointer
const tmSchema = require("@thing-description-playground/core/tm-schema.json")
const tmPlaceholderSchema = require("./assertions-tm/tm-placeholder.json")
const tmRefSchema = require("./assertions-tm/tm-tmRef1.json")
Expand Down Expand Up @@ -93,9 +90,7 @@ module.exports = validateTM
}

// additional checks
// results.push(...checkSecurity(tmJson))
// results.push(...checkMultiLangConsistency(tmJson))
// results.push(...checkLinksRelTypeCount(tmJson))
results.push(...checkTmOptionalPointer(tmJson))

// Iterating through assertions
for (let index = 0; index < assertions.length; index++) {
Expand Down
14 changes: 7 additions & 7 deletions packages/assertions/assertions-csv/assertions.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"ID","Status","Assertion"
"bindings-requirements-scheme","null","Every form in a WoT Thing Description MUST follow the requirements of the Protocol Binding Template indicated by the URI scheme [[!RFC3986]] of its href member as indicated by the Binding Templates specification at Creating a New Protocol Binding."
"bindings-server-accept","null","Every form in a WoT Thing Description MUST accurately describe requests (including request headers, if present) accepted by the Thing in an interaction."
"client-data-schema","null","A Thing acting as a Consumer when interacting with another target Thingdescribed in a WoT Thing Description MUST generate data organized according to the data schemas given in the correspondinginteractions."
"client-data-schema-accept-extras","null","A Thing acting as a Consumer when interacting with another Thing MUST accept withouterror any additional data not described in the data schemas given in the Thing Description of the target Thing."
"client-data-schema-no-extras","null","A Thing acting as a Consumer when interacting with another Thing MUST NOT generate datanot described in the data schemas given in the Thing Description of that Thing."
"client-uri-template","null","A Thing acting as a Consumer when interacting with another Thing MUST generate URIsaccording to the URI Templates, base URIs, and form href parametersgiven in the Thing Description of the target Thing."
"client-data-schema","null","A Consumer when interacting with another target Thingdescribed in a WoT Thing Description MUST generate data organized according to the data schemas given in the correspondinginteractions."
"client-data-schema-accept-extras","null","A Consumer when interacting with another Thing MUST accept withouterror any additional data not described in the data schemas given in the Thing Description of the target Thing."
"client-data-schema-no-extras","null","A Consumer when interacting with another Thing MUST NOT generate datanot described in the data schemas given in the Thing Description of that Thing."
"client-uri-template","null","A Consumer when interacting with another Thing MUST generate URIsaccording to the URI Templates, base URIs, and form href parametersgiven in the Thing Description of the target Thing."
"privacy-auth-users-only","null","Only authorized users SHOULD be provided access to the Thing Description for a Thing."
"privacy-centralized-ids","null","TD identifiers SHOULD NOT be generated using a centralized authority."
"privacy-distributed-ids","null","TD identifiers SHOULD be generated using a distributed mechanism such as UUIDs that provides a high probability of uniqueness."
Expand Down Expand Up @@ -440,7 +440,7 @@
"tm-ref-recursive-extensions","null","Recursive extensions leading to an infinite loop MUST NOT be defined."
"tm-rel-type-maximum","null","The links array MUST use the entry with ""rel"" : ""type"" a maximum of once."
"tm-td-generation-inconsistencies","null","A Thing Model MUST be defined in such a way that there are no inconsistencies that would result in a Thing Description not being able to meet the requirements as described in Section and ."
"tm-tmOptional","null","If interaction models are not manditory to be implemented in a Thing Description instance, Thing Model definitions MUST use the JSON member name tm:optional."
"tm-tmOptional","null","If interaction models are not mandatory to be implemented in a Thing Description instance, Thing Model definitions MUST use the JSON member name tm:optional."
"tm-tmOptional-JSONPointer","null","The value of tm:optional MUST provide JSON Pointer [[RFC6901]] references to the required interaction model definitions."
"tm-tmOptional-array","null","tm:optional MUST be a JSON array at the top level."
"tm-tmOptional-resolver","null","The JSON Pointers of tm:optional MUST resolve to an entire interaction affordance Map definition."
Expand All @@ -450,6 +450,6 @@
"tm-tmRef-usecase","null","For importing pieces of definitions of one or more existing Thing Models, the tm:ref term is introduced that provides the location of an existing (sub-)definition that SHOULD be reused."
"tm-tmRef1","null","The tm:ref value MUST follow the pattern"
"tm-tmRef2","null","Every time tm:ref is used, the referenced pre-definition and its dependencies (e.g., by context extension) MUST be assumed at the new defined definition."
"tm-versioning","null","When the Thing Model definitions change over time, this SHOULD be reflected in the version container."
"tm-versioning","null","Due to the definition of Thing Model the term instance MUST be omitted within the version container."
"tm-versioning-1","null","When the Thing Model definitions change over time, this SHOULD be reflected in the version container."
"tm-versioning-2","null","Due to the definition of Thing Model the term instance MUST be omitted within the version container."
"well-known-operation-types-only","null","operations types SHOULD NOT be arbitrarily set by servients and be restricted to the values in the table below."
Loading

0 comments on commit e49afd9

Please sign in to comment.