Skip to content

Commit 5832dbf

Browse files
authored
Merge pull request #688 from bobur-khay/enhancement/ui-ux-improvements_#687
JSON-LD formats & UI/UX improvements
2 parents d3e9d6d + 0b91998 commit 5832dbf

File tree

14 files changed

+2436
-1463
lines changed

14 files changed

+2436
-1463
lines changed

packages/core/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ module.exports.checkLinkedAffordances = coreAssertions.checkLinkedAffordances;
4242
module.exports.checkLinkedStructure = coreAssertions.checkLinkedStructure;
4343
module.exports.convertTDJsonToYaml = convertTDJsonToYaml;
4444
module.exports.convertTDYamlToJson = convertTDYamlToJson;
45-
45+
module.exports.jsonld = jsonld;
4646

4747
// This is implemented to avoid a test error, where jest seems to intercept the request
4848
const customLoader = async (url) => {
49-
return {
50-
contextUrl: null, // this is for a context via a link header
51-
document: {}, // this is the actual document that was loaded
52-
documentUrl: url // this is the actual context URL after redirects
53-
};
49+
return {
50+
contextUrl: null, // this is for a context via a link header
51+
document: {}, // this is the actual document that was loaded
52+
documentUrl: url, // this is the actual context URL after redirects
53+
};
5454
};
5555

5656
/**

packages/web/src/examples-paths/examples-paths.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@
118118
"description": "A simple Thing Description using CoAP. The target resource is specified in the Thing Description by the href member of a form and the request method (e.g., GET, PUT, POST, or DELETE) is specified using the cov:method member of a form.",
119119
"path": "https://raw.githubusercontent.com/eclipse-thingweb/playground/master/examples/td/5-protocols/CoAP-simple-td-no-defaults.td.jsonld"
120120
},
121+
"extended-forms-multiple-op.td.jsonld": {
122+
"title": "Extended Forms Multiple op",
123+
"description": "In the case of a forms entry that has multiple op values the usage of the htv:methodName is not permitted. A TD Processor will extend the multiple op values to separate forms entries and associates a single operation with the default assumption.",
124+
"path": "https://raw.githubusercontent.com/eclipse-thingweb/playground/master/examples/td/5-protocols/extended-forms-multiple-op.td.jsonld"
125+
},
121126
"HTTP-readproperty.td.jsonld": {
122127
"title": "HTTP readproperty",
123128
"description": "This example shows the binding of the readproperty operation for the HTTP.",
@@ -143,11 +148,6 @@
143148
"description": "This example shows the minimal set of terms to configure a single coil reading using Modbus. Notice that the unitID is contained in the href as the first element of the path.",
144149
"path": "https://raw.githubusercontent.com/eclipse-thingweb/playground/master/examples/td/5-protocols/Modbus-single-coil.td.jsonld"
145150
},
146-
"extended-forms-multiple-op.td.jsonld": {
147-
"title": "Extended Forms Multiple op",
148-
"description": "In the case of a forms entry that has multiple op values the usage of the htv:methodName is not permitted. A TD Processor will extend the multiple op values to separate forms entries and associates a single operation with the default assumption.",
149-
"path": "https://raw.githubusercontent.com/eclipse-thingweb/playground/master/examples/td/5-protocols/extended-forms-multiple-op.td.jsonld"
150-
},
151151
"subprotocol-longpoll.td.jsonld": {
152152
"title": "Subprotocol Longpoll",
153153
"description": "protocols may have defined Subprotocols that can be used for some interaction types. For example, to receive asynchronous notifications using HTTP, some servers may support long polling.",
@@ -158,11 +158,6 @@
158158
"6-security-schemas": {
159159
"description": "This category contains various examples concerning the different types of security schemas that could/should be used for a Thing Description, as well as the different ways to combine multiple security schemes.",
160160
"examples": {
161-
"OAuth2-scopes.td.jsonld": {
162-
"title": "OAuth2 Scopes",
163-
"description": "OAuth 2.0 makes use of scopes. These are identifiers that may appear in tokens and must match with corresponding identifiers in a resource to allow access to that resource.",
164-
"path": "https://raw.githubusercontent.com/eclipse-thingweb/playground/master/examples/td/6-security-schemas/OAuth2-scopes.td.jsonld"
165-
},
166161
"apikey-in-body-simplified.td.jsonld": {
167162
"title": "Apikey In Body Simplified",
168163
"description": "It is possbile to simplify how security parameters are included in the payload by using the feature that the location referenced by a JSON pointer in a body location will be automatically inserted if it does not exist.",
@@ -212,6 +207,11 @@
212207
"title": "noSec Security",
213208
"description": "Security configuration in the TD is mandatory, therefore the nosec security scheme is provided for the case that no security is needed.",
214209
"path": "https://raw.githubusercontent.com/eclipse-thingweb/playground/master/examples/td/6-security-schemas/noSec-security.td.jsonld"
210+
},
211+
"OAuth2-scopes.td.jsonld": {
212+
"title": "OAuth2 Scopes",
213+
"description": "OAuth 2.0 makes use of scopes. These are identifiers that may appear in tokens and must match with corresponding identifiers in a resource to allow access to that resource.",
214+
"path": "https://raw.githubusercontent.com/eclipse-thingweb/playground/master/examples/td/6-security-schemas/OAuth2-scopes.td.jsonld"
215215
}
216216
}
217217
},

0 commit comments

Comments
 (0)