|
1 | 1 | {
|
2 | 2 | "$schema": "http://json-schema.org/draft-07/schema#",
|
3 |
| - "title": "Schema for AWS SAM Policy Templates", |
4 |
| - |
| 3 | + "additionalProperties": false, |
5 | 4 | "definitions": {
|
6 |
| - "semver": { |
7 |
| - "type": "string", |
8 |
| - "pattern": "^[0-9]+.[0-9]+.[0-9]+$" |
9 |
| - }, |
10 | 5 | "parameter": {
|
11 |
| - "type": "object", |
12 | 6 | "properties": {
|
13 | 7 | "Description": {
|
14 | 8 | "type": "string"
|
|
17 | 11 | "required": [
|
18 | 12 | "Description"
|
19 | 13 | ],
|
20 |
| - "title": "Information about a single parameter" |
| 14 | + "title": "Information about a single parameter", |
| 15 | + "type": "object" |
21 | 16 | },
|
22 | 17 | "parameters": {
|
23 |
| - "title": "Object containing all parameters of a template", |
24 |
| - "type": "object", |
| 18 | + "additionalProperties": false, |
25 | 19 | "patternProperties": {
|
26 | 20 | "^[a-zA-Z0-9]+$": {
|
27 | 21 | "$ref": "#/definitions/parameter"
|
28 | 22 | }
|
29 | 23 | },
|
30 |
| - "additionalProperties": false |
| 24 | + "title": "Object containing all parameters of a template", |
| 25 | + "type": "object" |
| 26 | + }, |
| 27 | + "policy_statement": { |
| 28 | + "type": "object" |
| 29 | + }, |
| 30 | + "policy_statements": { |
| 31 | + "additionalProperties": false, |
| 32 | + "minProperties": 1, |
| 33 | + "properties": { |
| 34 | + "Statement": { |
| 35 | + "items": { |
| 36 | + "$ref": "#/definitions/policy_statement" |
| 37 | + }, |
| 38 | + "minItems": 1, |
| 39 | + "type": "array" |
| 40 | + } |
| 41 | + }, |
| 42 | + "type": "object" |
| 43 | + }, |
| 44 | + "semver": { |
| 45 | + "pattern": "^[0-9]+.[0-9]+.[0-9]+$", |
| 46 | + "type": "string" |
31 | 47 | },
|
32 | 48 | "template": {
|
33 |
| - "type": "object", |
| 49 | + "additionalProperties": false, |
34 | 50 | "properties": {
|
| 51 | + "Definition": { |
| 52 | + "$ref": "#/definitions/policy_statements" |
| 53 | + }, |
35 | 54 | "Description": {
|
36 | 55 | "type": "string"
|
37 | 56 | },
|
38 | 57 | "Parameters": {
|
39 | 58 | "$ref": "#/definitions/parameters"
|
40 |
| - }, |
41 |
| - "Definition": { |
42 |
| - "$ref": "#/definitions/policy_statements" |
43 | 59 | }
|
44 | 60 | },
|
45 | 61 | "required": [
|
46 | 62 | "Parameters",
|
47 | 63 | "Definition"
|
48 | 64 | ],
|
49 |
| - "additionalProperties": false |
50 |
| - }, |
51 |
| - |
52 |
| - "policy_statements": { |
53 |
| - "type": "object", |
54 |
| - "properties": { |
55 |
| - "Statement": { |
56 |
| - "type": "array", |
57 |
| - "minItems": 1, |
58 |
| - "items": { |
59 |
| - "$ref": "#/definitions/policy_statement" |
60 |
| - } |
61 |
| - } |
62 |
| - }, |
63 |
| - "minProperties": 1, |
64 |
| - "additionalProperties": false |
65 |
| - }, |
66 |
| - "policy_statement": { |
67 | 65 | "type": "object"
|
68 | 66 | }
|
69 | 67 | },
|
70 | 68 | "properties": {
|
71 |
| - "Version": { |
72 |
| - "$ref": "#/definitions/semver" |
73 |
| - }, |
74 | 69 | "Templates": {
|
75 |
| - "type": "object", |
| 70 | + "additionalProperties": false, |
76 | 71 | "patternProperties": {
|
77 | 72 | "^[a-zA-Z0-9]+Policy$": {
|
78 | 73 | "$ref": "#/definitions/template"
|
79 | 74 | }
|
80 | 75 | },
|
81 |
| - "additionalProperties": false |
| 76 | + "type": "object" |
| 77 | + }, |
| 78 | + "Version": { |
| 79 | + "$ref": "#/definitions/semver" |
82 | 80 | }
|
83 | 81 | },
|
84 |
| - "additionalProperties": false, |
85 |
| - "required": ["Version", "Templates"] |
| 82 | + "required": [ |
| 83 | + "Version", |
| 84 | + "Templates" |
| 85 | + ], |
| 86 | + "title": "Schema for AWS SAM Policy Templates" |
86 | 87 | }
|
0 commit comments