mirror of https://github.com/tiangolo/fastapi.git
raw string \f
This commit is contained in:
parent
9f4db6d6d3
commit
62d6b86c34
|
|
@ -1,4 +1,5 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import codecs
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import email.message
|
import email.message
|
||||||
import inspect
|
import inspect
|
||||||
|
|
@ -502,6 +503,7 @@ class APIRoute(routing.Route):
|
||||||
self.secure_cloned_response_field = None
|
self.secure_cloned_response_field = None
|
||||||
self.dependencies = list(dependencies or [])
|
self.dependencies = list(dependencies or [])
|
||||||
self.description = description or inspect.cleandoc(self.endpoint.__doc__ or "")
|
self.description = description or inspect.cleandoc(self.endpoint.__doc__ or "")
|
||||||
|
self.description = codecs.decode(self.description, "unicode_escape")
|
||||||
# if a "form feed" character (page break) is found in the description text,
|
# if a "form feed" character (page break) is found in the description text,
|
||||||
# truncate description text to the content preceding the first "form feed"
|
# truncate description text to the content preceding the first "form feed"
|
||||||
self.description = self.description.split("\f")[0].strip()
|
self.description = self.description.split("\f")[0].strip()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue