-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Description
First check
- I used the GitHub search to find a similar issue and didn't find it.
- I searched the FastAPI documentation, with the integrated search.
- I already searched in Google "How to X in FastAPI" and didn't find any information.
Description
How can I provide a custom example value for the return value of routes? When the return is a Pydantic model, you can set the example keyword argument on a pydantic Field or add it to schema_extra in the Model config. However, when the return value is a simple type such as str or List[Optional[int]]` there seems to be no way to provide an example. Am I missing something, or is this a missing feature?
Pawel-Kranzberg