Bug introduced in FastAPI 0.111.1 #11845
-
First Check
Commit to Help
Example Code@router.get("/")
def filter_models(
bizdev_ids: list[int] | None = Query(
title="BizDev user ids", example="42", default=None
),
pm_ids: list[int] | None = Query(title="PM user ids", example="36", default=None),
designer_ids: list[int] | None = Query(
title="Designer user ids", example="666", default=None
),
) :
"""Endpoint o.1"""
pass Description@tiangolo (sorry for the ping but it seems like a bug directly introduced during your last release) Due to Swagger version restriction removed, the new version is used. For the example the UI moved from : to but those fields have actually some hidden values as you can see in the request while nothing seems to be shown in the UI. Operating SystemLinux Operating System DetailsNo response FastAPI Version0.111.1 Pydantic Version2.8.2 Python Version3.11 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is not a bug. In the new version you can see correct types of Query parameters and everything seem to work as it should. The only problem is that it doesn't show your examples, isn't it?
|
Beta Was this translation helpful? Give feedback.
This is not a bug. In the new version you can see correct types of Query parameters and everything seem to work as it should.
The only problem is that it doesn't show your examples, isn't it?
To specify examples you should use
openapi_examples
: