Skip to content

Commit

Permalink
Convert json resource properties into better json schem validation (#…
Browse files Browse the repository at this point in the history
…3423)

* JSON object type cleanup
* Convert all json properties to support string too
  • Loading branch information
kddejong authored Jun 27, 2024
1 parent 1e78b4c commit 3001eb5
Show file tree
Hide file tree
Showing 776 changed files with 9,099 additions and 1,299 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ repos:
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.4.10"
hooks:
- id: ruff
- repo: https://github.com/PyCQA/bandit
rev: "1.7.8"
rev: "1.7.9"
hooks:
- id: bandit
additional_dependencies:
- "bandit[toml]"
args: ["-c", "pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.0"
rev: "v1.10.1"
hooks:
- id: mypy
additional_dependencies:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"77f8f0ff694760d9d86001ab4dca1909\"", "url": "https://schema.cloudformation.us-gov-west-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"cab7c18393919e17ef44d9fca8c62008\"", "url": "https://schema.cloudformation.us-gov-west-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"bb135f465b3346b7dea602d254e4c44c\"", "url": "https://schema.cloudformation.ca-west-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"ca78dae4bedfa5f1574d2d0cafd31df2\"", "url": "https://schema.cloudformation.ca-west-1.amazonaws.com/CloudformationSchema.zip"}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/definitions/Overrides/properties/Manifest",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/definitions/Overrides/properties/Manifest",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/Schema",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/Schema",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/Body",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/Body",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/Policy",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/Policy",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/Body",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/Body",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"op": "test",
"path": "/properties/Tags",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/Tags",
"value": {
"additionalProperties": false,
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/definitions/StageOverrides/properties/RouteSettings",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/definitions/StageOverrides/properties/RouteSettings",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/definitions/StageOverrides/properties/StageVariables",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/definitions/StageOverrides/properties/StageVariables",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"op": "test",
"path": "/properties/Tags",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/Tags",
"value": {
"additionalProperties": false,
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/RequestParameters",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/RequestParameters",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/RequestTemplates",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/RequestTemplates",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/ResponseParameters",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/ResponseParameters",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/ResponseParameters",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/ResponseParameters",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/ResponseTemplates",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/ResponseTemplates",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/Schema",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/Schema",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/RequestModels",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/RequestModels",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"op": "test",
"path": "/properties/RequestParameters",
"value": {
"type": "object"
}
},
{
"op": "replace",
"path": "/properties/RequestParameters",
"value": {
"format": "json",
"type": [
"object",
"string"
]
}
}
]
Empty file.
Loading

0 comments on commit 3001eb5

Please sign in to comment.