Browse Source

Optimize regexp pattern in get_path_param_names (#1243)

pull/1569/head
Kazantcev Andrey 5 years ago
committed by GitHub
parent
commit
434d32b891
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      fastapi/utils.py

2
fastapi/utils.py

@ -67,7 +67,7 @@ def get_model_definitions(
def get_path_param_names(path: str) -> Set[str]:
return {item.strip("{}") for item in re.findall("{[^}]*}", path)}
return set(re.findall("{(.*?)}", path))
def create_response_field(

Loading…
Cancel
Save