First of all, amazing project @tiangolo !
I have a quick question. I want the request body example in the Swagger UI documentation to represent some API calls the user would want to make. However, all I can see are the default values I have set in the BaseModel like "string" (see image). How do I change the examples in the documentation without changing the BaseModel? E.g. I wan't an user using the API to get another default value than the value you see in the Swagger documentation.

First of all, amazing project @tiangolo !
Thanks! :cake: :tada:
Check it here: https://fastapi.tiangolo.com/tutorial/body-schema/#schema-extras
I just added a screenshot to the section in the docs too:

Now, one of the objectives of FastAPI is to have great documentation, easy to follow and find.
Do you think you would have found it more easily if it had a different name in the menu?
For example, instead of Body - Schema, something like Body - extra validations and info...
What keywords would you have looked for in the menu?
Thank you for the quick response @tiangolo ! Good question, Don't know why I missed it. I would perhaps call it "Request body - Schema and examples". But what helps me, might not be helpful to other people and a bit too long.
I'm in absolute awe how fast, well documented, functional, cleaver and incredibly fas FastAPI is. I'm not lying, when I'm saying this is my favourite project on github. <3
Thank you for the quick response @tiangolo ! Good question, Don't know why I missed it. I would perhaps call it "Request body - Schema and examples". But what helps me, might not be helpful to other people and a bit too long.
Thanks for the feedback!
I'm in absolute awe how fast, well documented, functional, cleaver and incredibly fas FastAPI is. I'm not lying, when I'm saying this is my favourite project on github. <3
Thanks a lot. You put a big simile in my face :grin:
I guess we were able to solve the issue, so I'll close it now. But feel free to re-open it, add more comments or create new ones.
Hello, the example link above is now 404.. was it moved perhaps?
Never mind, I found it: https://fastapi.tiangolo.com/tutorial/schema-extra-example/
Most helpful comment
Thanks! :cake: :tada:
Check it here: https://fastapi.tiangolo.com/tutorial/body-schema/#schema-extras
I just added a screenshot to the section in the docs too:
Now, one of the objectives of FastAPI is to have great documentation, easy to follow and find.
Do you think you would have found it more easily if it had a different name in the menu?
For example, instead of
Body - Schema, something likeBody - extra validations and info...What keywords would you have looked for in the menu?