Skip to content

Commit

Permalink
Merge pull request ZackClements#17 from thegrapesoda/chkEndpts-1
Browse files Browse the repository at this point in the history
Updating regex to treat search items as distinct path.
  • Loading branch information
benediktwerner authored May 25, 2023
2 parents 16547a6 + a4a7205 commit 2493de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check-endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
endpoint_without_slash = endpoint[1:]

# Replace parameter placeholders with regular expression
endpoint_regex = re.sub(r"{[^/]+?}", r"[^/]+?", endpoint_without_slash)
endpoint_regex = re.sub(r"{[^/]+?}", r"[^/]+?", endpoint_without_slash) + '"'

# Check if endpoint or a variation of it is present in file
if not re.search(endpoint_regex, clients_content):
Expand Down

0 comments on commit 2493de8

Please sign in to comment.