Skip to content

Add ContentInfo Type to OpenAPI EndpointDocs.request_body, so docs can test different types of content-type requests. #514

@jesseandringa

Description

@jesseandringa

🚀 Feature Request

Right now Endpoint Docs takes in a request_body =
@DataClass
class RequestBodyInfo:
description: Optional[str] = None
examples: Optional[Dict[str, Any]] = None

This does not allow for any content type. And defaults to what parameters your function accepts.
It would be nice to be able to have a content type so that I could tell the user they can pass application json, and application/msgpack etc. (handling it in a middleware). And provide this information with the request_body, so the user could test out both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions