Request Body for GET requests dont display in path /docs #7701
-
First check
DescriptionRequest Body for GET requests dont display in page path /docs. Is it bug or feature? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
|
Have you looked here? |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I understand that this has not yet been released, because the lines have not been changed ? METHODS_WITH_BODY = set(("POST", "PUT", "DELETE", "PATCH")) |
Beta Was this translation helpful? Give feedback.
-
|
Yes, it seems so. Adding As I understand it, a Swagger can't send a request on this route. More information can be found here and in Swagger-UI repo. |
Beta Was this translation helpful? Give feedback.
-
|
Yep, what @nsidnev said ☝️ If possible, to avoid headaches with interoperability with other tools, you should use |
Beta Was this translation helpful? Give feedback.
-
|
Open API v3.0 spec does not support request body for GET requests
You can still override this if you really want it, but I'm not sure if the doc generation will process it https://fastapi.tiangolo.com/advanced/extending-openapi/ |
Beta Was this translation helpful? Give feedback.
-
|
Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs. |
Beta Was this translation helpful? Give feedback.

Yes, it seems so. Adding
"GET"to this set will show the request body in the swagger docs. But I think this is still not very useful for Swagger (and ReDoc, which just won't show this route).As I understand it, a Swagger can't send a request on this route. More information can be found here and in Swagger-UI repo.