Fastapi: [QUESTION] docstring for Python functions appearing in API documentation

Created on 30 Apr 2020  路  2Comments  路  Source: tiangolo/fastapi

First check

  • [x] I used the GitHub search to find a similar issue and didn't find it.
  • [x] I searched the FastAPI documentation, with the integrated search.
  • [x] I already searched in Google "How to X in FastAPI" and didn't find any information.

Description

I am writing numpy style docstrings and they are showing up in the Parameter section of /docs and /redoc. Is there a way to disable this functionality? This is specific to my code, and not the API.

Thanks!

question

Most helpful comment

You can put a form feed character escape sequence (\f) at the start of the docstring. See https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#advanced-description-from-docstring

All 2 comments

You can put a form feed character escape sequence (\f) at the start of the docstring. See https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#advanced-description-from-docstring

Thanks for the help here @retnikt ! :clap: :bow:

Thanks for reporting back and closing the issue @mitchbregs :+1:

Was this page helpful?
0 / 5 - 0 ratings