-
-
Notifications
You must be signed in to change notification settings - Fork 307
Open
Description
Hi,
my endpoint looks as follows:
@app.post(
"/my/endpoint",
openapi_name="My Endpoint",
openapi_tags=["myendpoint"],
)
async def my_endpoint(
request: Request, body: MyCustomRequestBody
) -> MyCustomResponse:
Both MyCustomResponse
and MyCustomRequestBody
inherit from TypedDict.
There are two Problems:
- The OpenAPI endpoint does only document and recognize the
MyCustomResponse
- The
MyCustomRequestBody
is only recognized in OpenAPI if it inherits from roby.types.Body which is of no use to me because I need it as TypedDict or Pydantic - Regardless of inheriting from Body or TypedDict,
MyCustomRequestBody
is never of the expected type (class that inherits from robyn.types.body or TypedDict) but instead always is of type str and contains the JSON string.
Any help appreciated :)
Best regards,
John
Metadata
Metadata
Assignees
Labels
No labels