From c556e58759a81e3d80cf9c8066cbf9b8e3c27e96 Mon Sep 17 00:00:00 2001 From: bermr Date: Mon, 16 Oct 2023 23:32:43 -0300 Subject: [PATCH] docs: removes unnecessary information from API docs --- api/api/docs/base_docs.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/api/api/docs/base_docs.py b/api/api/docs/base_docs.py index 44440eec55d..dfbfb9fb3fd 100644 --- a/api/api/docs/base_docs.py +++ b/api/api/docs/base_docs.py @@ -5,12 +5,6 @@ from drf_spectacular.utils import OpenApiExample, extend_schema -refer_curl = ( - "You can refer to the cURL request samples " - "for examples on how to consume this endpoint." -) - - def fields_to_md(field_names): """ Create a Markdown representation of the given list of names to use in Swagger docs. @@ -30,7 +24,7 @@ def custom_extend_schema(**kwargs): description = kwargs.pop("desc", None) if description: description = dedent(description) - extend_args["description"] = f"{description}\n\n{refer_curl}" + extend_args["description"] = f"{description}" parameters = kwargs.pop("params", []) if not isinstance(parameters, list): @@ -73,7 +67,7 @@ class MediaSchema(AutoSchema): """ def get_description(self) -> str: - return f"""{super().get_description()}\n\n{refer_curl}""" + return f"""{super().get_description()}""" def get_operation_id(self) -> str: operation_tokens = super().get_operation_id().split("_")[0:-1]