Created
May 26, 2021 00:05
-
-
Save schlerp/901465c2f9208aaa670fed9b2d68c28a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OperationArgSchema(pydantic.BaseModel): | |
name: str | |
type: str | |
label: str | |
value: Any | |
class OperationSchema(pydantic.BaseModel): | |
operation_id: str | |
nodeType: str | |
nodeSubtype: str | |
name: str | |
args: List[OperationArgSchema] | |
@router.get( | |
"/operation", | |
response_model=Union[List[OperationSchema], None], | |
status_code=200, | |
) | |
async def api_get_all_operations(response: Response): | |
"""Get all defined operation definitions.""" | |
return get_operations_collection() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment