Line break in FastApi schema extra

Viewed 207

I am trying to add an example for an endpoint in FastAPI (according to https://fastapi.tiangolo.com/it/tutorial/schema-extra-example/) and one of the fields needs a multiline comment but however I try I am not able to do it. What should I add to get it to multiple lines.

I have tried:

  • Multiline python string (\n)
  • <br>
  • <br />
  • \ at the end of the line
  • two spaces at the end of the line

nothing has worked, the Swagger UI displays the raw string no matter what I do.

0 Answers
Related