Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Truncate (3.23 sec)

  1. docs/en/docs/advanced/path-operation-advanced-configuration.md

    ```
    
    ## Advanced description from docstring
    
    You can limit the lines used from the docstring of a *path operation function* for OpenAPI.
    
    Adding an `\f` (an escaped "form feed" character) causes **FastAPI** to truncate the output used for OpenAPI at this point.
    
    It won't show up in the documentation, but other tools (such as Sphinx) will be able to use the rest.
    
    ```Python hl_lines="19-29"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. fastapi/routing.py

            self.description = description or inspect.cleandoc(self.endpoint.__doc__ or "")
            # if a "form feed" character (page break) is found in the description text,
            # truncate description text to the content preceding the first "form feed"
            self.description = self.description.split("\f")[0].strip()
            response_fields = {}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top