File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class RouterOptions(Enum):
2323def get_stoplight_elements_html ( # noqa: PLR0913 many arguments in function definition
2424 * ,
2525 openapi_url : str ,
26- title : str ,
26+ title : str = "API Documentation" ,
2727 stoplight_elements_js_url : str = "https://cdn.jsdelivr.net/npm/@stoplight/elements/web-components.min.js" ,
2828 stoplight_elements_css_url : str = "https://cdn.jsdelivr.net/npm/@stoplight/elements/styles.min.css" ,
2929 stoplight_elements_favicon_url : str = "https://docs.stoplight.io/favicons/favicon.ico" ,
@@ -71,6 +71,7 @@ def get_stoplight_elements_html( # noqa: PLR0913 many arguments in function def
7171 The HTML document as a string.
7272 """
7373
74+ title = title or "API Documentation"
7475 return f"""
7576<!doctype html>
7677<html lang="en">
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def dump(key: str, data: object) -> str:
8383def get_scalar_html ( # noqa: PLR0913
8484 * ,
8585 openapi_url : str ,
86- title : str ,
86+ title : str = "API Documentation" ,
8787 scalar_js_url : str = "https://cdn.jsdelivr.net/npm/@scalar/api-reference" ,
8888 scalar_proxy_url : str = "" ,
8989 scalar_favicon_url : str = "https://docs.scalar.com/favicon.svg" ,
@@ -127,6 +127,7 @@ def get_scalar_html( # noqa: PLR0913
127127 """
128128 servers = servers or []
129129 authentication = authentication or {}
130+ title = title or "API Documentation"
130131
131132 return f"""<!doctype html>
132133<html>
You can’t perform that action at this time.
0 commit comments