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": "array",
7
- "items": {
8
- "type": "object",
9
- "properties": {
10
- "type": {
11
- "type": "string"
12
- },
13
- "dependencies": {
14
- "type": "array",
15
- "items": {
16
- "type": "string"
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
- "required": ["type", "dependencies"]
21
- }
28
+ }
29
+ },
30
+ "required": ["resourceDefinitions"]
22
31
  }
@@ -24,7 +24,7 @@ export interface ValidateRequestData {
24
24
  }
25
25
  export interface ValidateResponseData {
26
26
  isValid: boolean;
27
- errors: unknown[];
27
+ errors: unknown[] | null;
28
28
  }
29
29
  export interface PlanRequestData extends ResourceConfig {
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-schemas",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -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": "array",
7
- "items": {
8
- "type": "object",
9
- "properties": {
10
- "type": {
11
- "type": "string"
12
- },
13
- "dependencies": {
14
- "type": "array",
15
- "items": {
16
- "type": "string"
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
- "required": ["type", "dependencies"]
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
- type: 'typeA',
19
- dependencies: ['typeB']
20
- },
21
- {
22
- type: 'typeB',
23
- dependencies: [],
24
- }
25
- ])).to.be.true;
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
- dependencies: ['typeB']
30
- },
31
- {
32
- type: 'typeB',
33
- }
34
- ])).to.be.false;
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
  })
@@ -30,7 +30,7 @@ export interface ValidateRequestData {
30
30
 
31
31
  export interface ValidateResponseData {
32
32
  isValid: boolean;
33
- errors: unknown[];
33
+ errors: unknown[] | null;
34
34
  }
35
35
 
36
36
  export interface PlanRequestData extends ResourceConfig {}