Skip to content

Commit 134ecf9

Browse files
authored
chore: Format other files in samtranslator/policy_templates_data (#2762)
1 parent 08ce630 commit 134ecf9

File tree

2 files changed

+43
-43
lines changed

2 files changed

+43
-43
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ integ-test:
1919

2020
black:
2121
black setup.py samtranslator/* tests/* integration/* bin/*.py
22-
bin/json-format.py --write tests integration
22+
bin/json-format.py --write tests integration samtranslator/policy_templates_data
2323
bin/yaml-format.py --write tests
2424
bin/yaml-format.py --write integration --add-test-metadata
2525

@@ -29,8 +29,7 @@ black-check:
2929
diff -u samtranslator/schema/schema.json .tmp_schema.json
3030
rm .tmp_schema.json
3131
black --check setup.py samtranslator/* tests/* integration/* bin/*.py
32-
bin/json-format.py --check tests integration
33-
bin/json-format.py --check samtranslator/policy_templates_data/policy_templates.json
32+
bin/json-format.py --check tests integration samtranslator/policy_templates_data
3433
bin/yaml-format.py --check tests
3534
bin/yaml-format.py --check integration --add-test-metadata
3635

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"title": "Schema for AWS SAM Policy Templates",
4-
3+
"additionalProperties": false,
54
"definitions": {
6-
"semver": {
7-
"type": "string",
8-
"pattern": "^[0-9]+.[0-9]+.[0-9]+$"
9-
},
105
"parameter": {
11-
"type": "object",
126
"properties": {
137
"Description": {
148
"type": "string"
@@ -17,70 +11,77 @@
1711
"required": [
1812
"Description"
1913
],
20-
"title": "Information about a single parameter"
14+
"title": "Information about a single parameter",
15+
"type": "object"
2116
},
2217
"parameters": {
23-
"title": "Object containing all parameters of a template",
24-
"type": "object",
18+
"additionalProperties": false,
2519
"patternProperties": {
2620
"^[a-zA-Z0-9]+$": {
2721
"$ref": "#/definitions/parameter"
2822
}
2923
},
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"
3147
},
3248
"template": {
33-
"type": "object",
49+
"additionalProperties": false,
3450
"properties": {
51+
"Definition": {
52+
"$ref": "#/definitions/policy_statements"
53+
},
3554
"Description": {
3655
"type": "string"
3756
},
3857
"Parameters": {
3958
"$ref": "#/definitions/parameters"
40-
},
41-
"Definition": {
42-
"$ref": "#/definitions/policy_statements"
4359
}
4460
},
4561
"required": [
4662
"Parameters",
4763
"Definition"
4864
],
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": {
6765
"type": "object"
6866
}
6967
},
7068
"properties": {
71-
"Version": {
72-
"$ref": "#/definitions/semver"
73-
},
7469
"Templates": {
75-
"type": "object",
70+
"additionalProperties": false,
7671
"patternProperties": {
7772
"^[a-zA-Z0-9]+Policy$": {
7873
"$ref": "#/definitions/template"
7974
}
8075
},
81-
"additionalProperties": false
76+
"type": "object"
77+
},
78+
"Version": {
79+
"$ref": "#/definitions/semver"
8280
}
8381
},
84-
"additionalProperties": false,
85-
"required": ["Version", "Templates"]
82+
"required": [
83+
"Version",
84+
"Templates"
85+
],
86+
"title": "Schema for AWS SAM Policy Templates"
8687
}

0 commit comments

Comments
 (0)