Callbacks response_model don't show examples #11705
Unanswered
Joao-Pedro-P-Holanda
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
I am trying to document my utilization of a third party api in Fastapi, but the callbacks are not including the example provided inside a response_model object. It correctly identifies the schema of the response but don't show an example defined
with Pydantic's
model_config
.Expected Behavior
What i expected is that callbacks included in a request documentation would show their own responses schemas, likewise the
example from this .yaml file
Operating System
Windows
Operating System Details
Using Windows 11
FastAPI Version
0.111.0
Pydantic Version
2.7.2
Python Version
3.11.5
Additional Context
Currently, if i add the same model to a normal request handler it properly shows the example, but the callback don't behave the same way.
Using the same code provided:
Code
OpenAPI
But on the callback the example is not rendered:
Code
OpenAPI
Beta Was this translation helpful? Give feedback.
All reactions