Skip to content

Instantly share code, notes, and snippets.

@schlerp
Created May 26, 2021 00:05
Show Gist options
  • Save schlerp/901465c2f9208aaa670fed9b2d68c28a to your computer and use it in GitHub Desktop.
Save schlerp/901465c2f9208aaa670fed9b2d68c28a to your computer and use it in GitHub Desktop.
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