|
4 | 4 | "title": "The MDS Policy Schema", |
5 | 5 | "type": "object", |
6 | 6 | "definitions": { |
| 7 | + "policy": { |
| 8 | + "$id": "#/definitions/policy", |
| 9 | + "type": "object", |
| 10 | + "title": "The policy object schema", |
| 11 | + "additionalItems": false, |
| 12 | + "required": [ |
| 13 | + "name", |
| 14 | + "policy_id", |
| 15 | + "description", |
| 16 | + "start_date", |
| 17 | + "published_date", |
| 18 | + "rules" |
| 19 | + ], |
| 20 | + "properties": { |
| 21 | + "name": { |
| 22 | + "$id": "#/definitions/policy/properties/name", |
| 23 | + "$ref": "#/definitions/string", |
| 24 | + "description": "Name of policy" |
| 25 | + }, |
| 26 | + "policy_id": { |
| 27 | + "$id": "#/definitions/policy/properties/policy_id", |
| 28 | + "$ref": "#/definitions/uuid", |
| 29 | + "description": "Unique ID of policy" |
| 30 | + }, |
| 31 | + "description": { |
| 32 | + "$id": "#/definitions/policy/properties/description", |
| 33 | + "$ref": "#/definitions/string", |
| 34 | + "description": "Description of policy" |
| 35 | + }, |
| 36 | + "start_date":{ |
| 37 | + "$id": "#/definitions/policy/properties/start_date", |
| 38 | + "$ref": "#/definitions/timestamp", |
| 39 | + "description": "Beginning date/time of policy enforcement" |
| 40 | + }, |
| 41 | + "published_date": { |
| 42 | + "$id": "#/definitions/policy/properties/published_date", |
| 43 | + "$ref": "#/definitions/timestamp", |
| 44 | + "description": "Timestamp at which the policy was published" |
| 45 | + }, |
| 46 | + "rules": { |
| 47 | + "$id": "#/definitions/rule", |
| 48 | + "type": "array", |
| 49 | + "description": "List of applicable Rule objects", |
| 50 | + "items": { |
| 51 | + "$id": "#/definitions/policy/properties/rules/items", |
| 52 | + "$ref": "#/definitions/rule" |
| 53 | + }, |
| 54 | + "minItems": 1 |
| 55 | + } |
| 56 | + } |
| 57 | + }, |
7 | 58 | "rule": { |
8 | 59 | "$id": "#/definitions/rule", |
9 | 60 | "type": "object", |
| 61 | + "description": "An individual rule in a policy", |
10 | 62 | "additionalProperties": false, |
11 | 63 | "required": [], |
12 | 64 | "properties": {} |
|
32 | 84 | "title": "The policy payload", |
33 | 85 | "items": { |
34 | 86 | "$id": "#/properties/data/properties/policy/items", |
35 | | - "type": "object", |
36 | | - "title": "The policy item schema", |
37 | | - "additionalItems": false, |
38 | | - "required": [ |
39 | | - "name", |
40 | | - "policy_id", |
41 | | - "description", |
42 | | - "start_date", |
43 | | - "published_date", |
44 | | - "rules" |
45 | | - ], |
46 | | - "properties": { |
47 | | - "name": { |
48 | | - "$id": "#/properties/data/properties/policy/items/properties/name", |
49 | | - "$ref": "#/definitions/string", |
50 | | - "description": "Name of policy" |
51 | | - }, |
52 | | - "policy_id": { |
53 | | - "$id": "#/properties/data/properties/policy/items/properties/policy_id", |
54 | | - "$ref": "#/definitions/uuid", |
55 | | - "description": "Unique ID of policy" |
56 | | - }, |
57 | | - "description": { |
58 | | - "$id": "#/properties/data/properties/policy/items/properties/description", |
59 | | - "$ref": "#/definitions/string", |
60 | | - "description": "Description of policy" |
61 | | - }, |
62 | | - "start_date":{ |
63 | | - "$id": "#/properties/data/properties/policy/items/properties/start_date", |
64 | | - "$ref": "#/definitions/timestamp", |
65 | | - "description": "Beginning date/time of policy enforcement" |
66 | | - }, |
67 | | - "published_date": { |
68 | | - "$id": "#/properties/data/properties/policy/items/properties/published_date", |
69 | | - "$ref": "#/definitions/timestamp", |
70 | | - "description": "Timestamp that the policy was published" |
71 | | - }, |
72 | | - "rules": { |
73 | | - "$id": "#/properties/data/properties/policy/items/properties/rules", |
74 | | - "type": "array", |
75 | | - "description": "List of applicable Rule objects", |
76 | | - "items": { |
77 | | - "$id": "#/properties/data/properties/policy/items/properties/rules/items", |
78 | | - "$ref": "#/definitions/rule", |
79 | | - "description": "An individual rule in the policy" |
80 | | - } |
81 | | - } |
82 | | - } |
| 87 | + "$ref": "#/definitions/policy" |
83 | 88 | } |
84 | 89 | } |
85 | 90 | }, |
|
0 commit comments