Skip to content

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

@foreso-GitHub

Description

@foreso-GitHub

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions