Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show multiple samples in request body of swagger doc? #65

Open
foreso-GitHub opened this issue Mar 5, 2024 · 0 comments
Open

Comments

@foreso-GitHub
Copy link

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.

image

What I want is a dropdown combobox which include multiple samples.

image

Does fastapi-jsonrpc support multiple samples?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant