Replies: 1 comment
-
This logic is implemented here: https://github.com/tiangolo/fastapi/blob/e304414c93e68f0298ddd9e23af0abfd3b8cd4da/fastapi/routing.py#L492 But you can create your own APIRoute class and redefine logic there:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
-
Description
Hi, following this documentation: https://fastapi.tiangolo.com/tutorial/path-operation-configuration/?h=docstring#description-from-docstring
It is indicated that FastAPI can use the docstring as a description inside the Documentation (if a description is not specifically set on the endpoint itself).
I wanted to know if it was possible to disable that feature across a FastAPI app. Doc-strings can sometimes contain some what sensitive information (like backend information that I don't want the user to even know of).
And if someone isn't aware that his doc-strings are being translated into public descriptions I would prefer this feature to not be on for my usecase.
I wasn't able to find anything about on how to disable this functionality. Thank you
Operating System
macOS
Operating System Details
No response
FastAPI Version
0.111.0
Pydantic Version
2.7.4
Python Version
Python 3.12.2
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions