Skip to content

Commit

Permalink
Remove unnecessary information from API docs (#3209)
Browse files Browse the repository at this point in the history
  • Loading branch information
bermr authored Oct 17, 2023
1 parent aa3a7f5 commit 8a9f6e1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions api/api/docs/base_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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):
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 8a9f6e1

Please sign in to comment.