mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 02:26:46 +00:00
⚡ Optimize regexp pattern in get_path_param_names (#1243)
This commit is contained in:
parent
535247ffc4
commit
434d32b891
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue