Skip to content

Commit fa02681

Browse files
author
Marco Müllner
committed
chore: Moved to old syntax for optional fields
1 parent 353509a commit fa02681

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openapi_python_generator/language_converters/python/service_generator.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from typing import Dict
2+
from typing import Dict, Optional
33
from typing import List
44
from typing import Literal
55
from typing import Tuple
@@ -154,7 +154,7 @@ def _generate_params_from_content(content: Union[Reference, Schema]):
154154
return params + default_params
155155

156156

157-
def generate_operation_id(operation: Operation, http_op: str, path_name: str | None = None) -> str:
157+
def generate_operation_id(operation: Operation, http_op: str, path_name: Optional[str] = None) -> str:
158158
if operation.operationId is not None:
159159
return common.normalize_symbol(operation.operationId)
160160
elif path_name is not None:

0 commit comments

Comments
 (0)