fastapi-jsonrpc
fastapi-jsonrpc copied to clipboard
How to show multiple samples in request body of swagger doc?
trafficstars
I tried to write swagger doc with mulitple samples in request body but failed.
Here is my code:
@api_v1.method()
def echo(
data: str = Body(..., examples=['123', '456']),
) -> str:
return data
And here is what swagger ui doc shows.
What I want is a dropdown combobox which include multiple samples.
Does fastapi-jsonrpc support multiple samples?