forked from w3c/wot-thing-description
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
46,506 additions
and
32,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: Validation tests | ||
|
||
on: | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"src_file": "index.html", | ||
"type": "respec" | ||
} | ||
"src_file": "index.html", | ||
"type": "respec" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
let fs = require('fs'); | ||
let fs = require("fs"); | ||
|
||
let cp = val => JSON.parse(JSON.stringify(val)); | ||
let cp = (val) => JSON.parse(JSON.stringify(val)); | ||
|
||
let td = JSON.parse(fs.readFileSync('context/td-context.jsonld')); | ||
let jsonschema = JSON.parse(fs.readFileSync('context/json-schema-context.jsonld')); | ||
let wotsec = JSON.parse(fs.readFileSync('context/wot-security-context.jsonld')); | ||
let hctl = JSON.parse(fs.readFileSync('context/hypermedia-context.jsonld')); | ||
let td = JSON.parse(fs.readFileSync("context/td-context.jsonld")); | ||
let jsonschema = JSON.parse(fs.readFileSync("context/json-schema-context.jsonld")); | ||
let wotsec = JSON.parse(fs.readFileSync("context/wot-security-context.jsonld")); | ||
let hctl = JSON.parse(fs.readFileSync("context/hypermedia-context.jsonld")); | ||
|
||
let ctx = td['@context']; | ||
ctx['@version'] = 1.1; | ||
let ctx = td["@context"]; | ||
ctx["@version"] = 1.1; | ||
|
||
// if a nested context is defined with an index containers, | ||
// the index property is taken from the nested context, not its parent | ||
// see https://github.com/w3c/wot-thing-description/pull/1077 | ||
let tmp = cp(jsonschema['@context']); | ||
let tmp = cp(jsonschema["@context"]); | ||
let p = cp(tmp.properties); | ||
tmp.properties['@index'] = ctx.properties['@index']; | ||
tmp.properties['@context'] = { properties: p }; | ||
ctx.properties['@context'] = tmp; | ||
tmp.properties["@index"] = ctx.properties["@index"]; | ||
tmp.properties["@context"] = { properties: p }; | ||
ctx.properties["@context"] = tmp; | ||
|
||
ctx.input['@context'] = jsonschema['@context']; | ||
ctx.output['@context'] = jsonschema['@context']; | ||
ctx.data['@context'] = jsonschema['@context']; | ||
ctx.dataResponse['@context'] = jsonschema['@context']; | ||
ctx.subscription['@context'] = jsonschema['@context']; | ||
ctx.cancellation['@context'] = jsonschema['@context']; | ||
ctx.input["@context"] = jsonschema["@context"]; | ||
ctx.output["@context"] = jsonschema["@context"]; | ||
ctx.data["@context"] = jsonschema["@context"]; | ||
ctx.dataResponse["@context"] = jsonschema["@context"]; | ||
ctx.subscription["@context"] = jsonschema["@context"]; | ||
ctx.cancellation["@context"] = jsonschema["@context"]; | ||
|
||
ctx.security['@context'] = wotsec['@context']; | ||
ctx.securityDefinitions['@context'] = wotsec['@context']; | ||
ctx.security["@context"] = wotsec["@context"]; | ||
ctx.securityDefinitions["@context"] = wotsec["@context"]; | ||
|
||
ctx.forms['@context'] = hctl['@context']; | ||
ctx.links['@context'] = hctl['@context']; | ||
ctx.forms["@context"] = hctl["@context"]; | ||
ctx.links["@context"] = hctl["@context"]; | ||
|
||
fs.writeFileSync('context/td-context-1.1.jsonld', JSON.stringify(td, null, 2)); | ||
fs.writeFileSync("context/td-context-1.1.jsonld", JSON.stringify(td, null, 2)); |
Oops, something went wrong.