Open
Description
Following up on the conversations in #66, and #409.
One possible way to implement generic handling of bindings is to allow users to annotate function parameters with a dataclass. The argument data is then treated as a conforming JSON object.
For example:
import dataclasses
@dataclasses.dataclass
class MyType:
id: int
body: str
def func(arg: MyType) -> str:
return arg.body
In function.json
such bindings would then have to specify dataType: json
.