Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jesseandringa opened this issue Oct 16, 2024 · 0 comments

Comments

@jesseandringa
Copy link

🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant