Skip to content

Commit

Permalink
validate base entities
Browse files Browse the repository at this point in the history
  • Loading branch information
ikethecoder committed Nov 24, 2022
1 parent a87c3c6 commit ab6c483
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion microservices/gatewayApi/v1/routes/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def validate_base_entities(yaml):
traversables = ['__plugin_configs', 'services', 'upstreams', 'certificates', 'caCertificates']
for k in yaml:
if k not in traversables:
raise Exception("Invalid base entity %s", k)
raise Exception("Invalid base entity %s" % k)

def validate_tags(yaml, required_tag):
# throw an exception if there are invalid tags
Expand Down
2 changes: 1 addition & 1 deletion microservices/gatewayApi/v2/routes/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def validate_base_entities(yaml):
traversables = ['__plugin_configs', 'services', 'upstreams', 'certificates', 'caCertificates']
for k in yaml:
if k not in traversables:
raise Exception("Invalid base entity %s", k)
raise Exception("Invalid base entity %s" % k)

def validate_tags(yaml, required_tag):
# throw an exception if there are invalid tags
Expand Down

0 comments on commit ab6c483

Please sign in to comment.