codify-schemas 1.0.26 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,20 +3,29 @@
|
|
|
3
3
|
"$id": "https://www.codify.com/initialize-response-data-schema.json",
|
|
4
4
|
"title": "Initialize Request Schema Data",
|
|
5
5
|
"description": "Initialize the plugin",
|
|
6
|
-
"type": "
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"type": "
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"resourceDefinitions": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"type",
|
|
25
|
+
"dependencies"
|
|
26
|
+
]
|
|
18
27
|
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["resourceDefinitions"]
|
|
22
31
|
}
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -3,20 +3,29 @@
|
|
|
3
3
|
"$id": "https://www.codify.com/initialize-response-data-schema.json",
|
|
4
4
|
"title": "Initialize Request Schema Data",
|
|
5
5
|
"description": "Initialize the plugin",
|
|
6
|
-
"type": "
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"type": "
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"resourceDefinitions": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"type",
|
|
25
|
+
"dependencies"
|
|
26
|
+
]
|
|
18
27
|
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["resourceDefinitions"]
|
|
22
31
|
}
|
|
@@ -13,25 +13,29 @@ describe('Get resources response data schema', () => {
|
|
|
13
13
|
|
|
14
14
|
it("requires type and dependencies to be defined", () => {
|
|
15
15
|
const validate = ajv.compile(schema);
|
|
16
|
-
expect(validate(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
expect(validate({
|
|
17
|
+
resourceDefinitions: [
|
|
18
|
+
{
|
|
19
|
+
type: 'typeA',
|
|
20
|
+
dependencies: ['typeB']
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'typeB',
|
|
24
|
+
dependencies: [],
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
})).to.be.true;
|
|
26
28
|
|
|
27
|
-
expect(validate(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
expect(validate({
|
|
30
|
+
resourceDefinitions: [
|
|
31
|
+
{
|
|
32
|
+
dependencies: ['typeB']
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'typeB',
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
})).to.be.false;
|
|
35
39
|
});
|
|
36
40
|
|
|
37
41
|
})
|
package/src/types/index.ts
CHANGED