Skip to content

Commit

Permalink
Turn MatchingEventTypes into an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Nov 28, 2024
1 parent f712484 commit adf02d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
9 changes: 5 additions & 4 deletions scripts/boto/update_schemas_from_boto.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
case_insensitive_services = [
"batch",
]
upper_case_paths = {

exceptions = {
"ses": ["/definitions/EventDestination/properties/MatchingEventTypes/items"]
}

Expand Down Expand Up @@ -91,9 +92,9 @@ def build_resource_type_patches(
)
continue
if value:
if patch.source[0] in upper_case_paths:
if path in upper_case_paths[patch.source[0]]:
value = [v.upper() for v in value]
if patch.source[0] in exceptions:
if path in exceptions[patch.source[0]]:
continue
if patch.source[0] in case_insensitive_services and field == "enum":
field = "enumCaseInsensitive"
value = [v.lower() for v in value]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
[
{
"op": "add",
"path": "/definitions/EventDestination/properties/MatchingEventTypes/items/enum",
"value": [
"BOUNCE",
"CLICK",
"COMPLAINT",
"DELIVERY",
"OPEN",
"REJECT",
"RENDERINGFAILURE",
"SEND"
]
},
{
"op": "add",
"path": "/definitions/DimensionConfiguration/properties/DimensionValueSource/enum",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@
"MatchingEventTypes": {
"insertionOrder": false,
"items": {
"enum": [
"BOUNCE",
"CLICK",
"COMPLAINT",
"DELIVERY",
"OPEN",
"REJECT",
"RENDERINGFAILURE",
"SEND"
],
"type": "string"
},
"type": "array",
Expand Down

0 comments on commit adf02d0

Please sign in to comment.