feat: add support for operationId in docstring; feat: v1.120.6

This commit is contained in:
Georg K
2022-11-11 10:02:27 +03:00
parent 83739c7c8e
commit ba0530d6b1
4 changed files with 28 additions and 1 deletions

View File

@@ -207,6 +207,17 @@ class OperationObject:
else:
self._spec.pop("tags", None)
@property
def operation_id(self) -> str | None:
return self._spec.get("operationId", None)
@operation_id.setter
def operation_id(self, operation_id: str | None) -> None:
if operation_id:
self._spec["operationId"] = operation_id
else:
self._spec.pop("operationId", None)
class PathItem:
def __init__(self, spec: dict):