Skip to content

Commit 3e2d184

Browse files
author
soup
committed
fix: allow hyphens as delimiter in PATH_PARAM_REGEX
1 parent 809b56a commit 3e2d184

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi_python_client/parser/openapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from .properties.schemas import parameter_from_reference
2727
from .responses import Response, response_from_data
2828

29-
_PATH_PARAM_REGEX = re.compile("{([a-zA-Z_][a-zA-Z0-9_]*)}")
29+
_PATH_PARAM_REGEX = re.compile("{([a-zA-Z_-][a-zA-Z0-9_-]*)}")
3030

3131

3232
def import_string_from_class(class_: Class, prefix: str = "") -> str:

0 commit comments

Comments
 (0)