Skip to content

Commit baafa2b

Browse files
committed
working
1 parent e6f67cc commit baafa2b

File tree

2 files changed

+76
-66
lines changed

2 files changed

+76
-66
lines changed

services/static-webserver/client/source/class/osparc/store/Products.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ qx.Class.define("osparc.store.Products", {
6464
allErrors: true,
6565
strictDefaults: true,
6666
useDefaults: true,
67+
strictTypes: true,
6768
});
6869
const validate = ajv.compile(schema);
6970
const valid = validate(uiConfig);

services/static-webserver/client/source/resource/schemas/product-ui.json

Lines changed: 75 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,88 @@
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"type": "object",
44
"properties": {
5-
"categories": {
6-
"type": "array",
7-
"items": {
8-
"type": "object",
9-
"properties": {
10-
"id": { "type": "string" },
11-
"title": { "type": "string" },
12-
"description": { "type": "string" }
13-
},
14-
"required": ["id", "title"]
15-
}
5+
"plusButton": {
6+
"$ref": "#/definitions/buttonConfig"
167
},
17-
"resources": {
18-
"type": "array",
19-
"items": {
20-
"oneOf": [
21-
{
22-
"type": "object",
23-
"properties": {
24-
"resourceType": { "enum": ["study"] },
25-
"title": { "type": "string" },
26-
"icon": { "type": "string" },
27-
"newStudyLabel": { "type": "string" },
28-
"idToWidget": { "type": "string" }
29-
},
30-
"required": ["resourceType", "title"]
31-
},
32-
{
33-
"type": "object",
34-
"properties": {
35-
"resourceType": { "enum": ["template"] },
36-
"expectedTemplateLabel": { "type": "string" },
37-
"title": { "type": "string" },
38-
"icon": { "type": "string" },
39-
"newStudyLabel": { "type": "string" },
40-
"category": { "type": "string" },
41-
"idToWidget": { "type": "string" }
42-
},
43-
"required": ["resourceType", "expectedTemplateLabel", "title"]
44-
},
45-
{
46-
"type": "object",
47-
"properties": {
48-
"resourceType": { "enum": ["service"] },
49-
"expectedKey": { "type": "string" },
50-
"title": { "type": "string" },
51-
"icon": { "type": "string" },
52-
"newStudyLabel": { "type": "string" },
53-
"category": { "type": "string" },
54-
"idToWidget": { "type": "string" }
55-
},
56-
"required": ["resourceType", "expectedKey", "title"]
57-
},
58-
{
8+
"newStudies": {
9+
"$ref": "#/definitions/buttonConfig"
10+
}
11+
},
12+
"additionalProperties": false,
13+
"definitions": {
14+
"buttonConfig": {
15+
"type": "object",
16+
"properties": {
17+
"categories": {
18+
"type": "array",
19+
"items": {
5920
"type": "object",
6021
"properties": {
61-
"showDisabled": {
62-
"type": "boolean",
63-
"enum": [true]
64-
},
22+
"id": { "type": "string" },
6523
"title": { "type": "string" },
66-
"icon": { "type": "string" },
67-
"reason": { "type": "string" },
68-
"newStudyLabel": { "type": "string" },
69-
"category": { "type": "string" },
70-
"idToWidget": { "type": "string" }
24+
"description": { "type": "string" }
7125
},
72-
"required": ["showDisabled", "title"]
26+
"required": ["id", "title"]
7327
}
74-
]
28+
},
29+
"resources": {
30+
"type": "array",
31+
"items": {
32+
"oneOf": [{
33+
"type": "object",
34+
"properties": {
35+
"resourceType": { "enum": ["study"] },
36+
"title": { "type": "string" },
37+
"icon": { "type": "string" },
38+
"newStudyLabel": { "type": "string" },
39+
"idToWidget": { "type": "string" }
40+
},
41+
"required": ["resourceType", "title"]
42+
}, {
43+
"type": "object",
44+
"properties": {
45+
"resourceType": { "enum": ["template"] },
46+
"expectedTemplateLabel": { "type": "string" },
47+
"title": { "type": "string" },
48+
"icon": { "type": "string" },
49+
"newStudyLabel": { "type": "string" },
50+
"category": { "type": "string" },
51+
"idToWidget": { "type": "string" }
52+
},
53+
"required": ["resourceType", "expectedTemplateLabel", "title"]
54+
}, {
55+
"type": "object",
56+
"properties": {
57+
"resourceType": { "enum": ["service"] },
58+
"expectedKey": { "type": "string" },
59+
"title": { "type": "string" },
60+
"icon": { "type": "string" },
61+
"newStudyLabel": { "type": "string" },
62+
"category": { "type": "string" },
63+
"idToWidget": { "type": "string" }
64+
},
65+
"required": ["resourceType", "expectedKey", "title"]
66+
}, {
67+
"type": "object",
68+
"properties": {
69+
"showDisabled": {
70+
"type": "boolean",
71+
"enum": [true]
72+
},
73+
"title": { "type": "string" },
74+
"icon": { "type": "string" },
75+
"reason": { "type": "string" },
76+
"newStudyLabel": { "type": "string" },
77+
"category": { "type": "string" },
78+
"idToWidget": { "type": "string" }
79+
},
80+
"required": ["showDisabled", "title"]
81+
}]
82+
},
83+
"additionalProperties": false
84+
}
7585
},
7686
"additionalProperties": false
7787
}
78-
},
79-
"additionalProperties": false
88+
}
8089
}

0 commit comments

Comments
 (0)