In my FastAPI application I have a number of endpoints, each with about 20 query parameters that I am generating automatically. I am setting the parameters using the openapi_extra
option in the endpoint:
@app.get("/COLORS/", openapi_extra=generate_params(schemas.COLORS))
async def colors( request: Request ):
return handle_request( # stuff that is not relevant #)
When the FastAPI server is started this will generate something that looks like:
What I would like to do is put the RED_
, GREEN_
, and BLUE_
parameters into their own little collapsable menus if possible so that the docs will look cleaner. Is this possible and how can I do it?