Skip to content

Commit 4076542

Browse files
authored
Merge pull request cheshire-cat-ai#1051 from BDadmehr0/1049
Update startup.py
2 parents 41371c4 + 616ece6 commit 4076542

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

core/cat/startup.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ async def validation_exception_handler(request, exc):
124124
# openapi customization
125125
cheshire_cat_api.openapi = get_openapi_configuration_function(cheshire_cat_api)
126126

127-
128-
@cheshire_cat_api.get("/docs", include_in_schema=False)
129-
async def scalar_docs():
130-
return get_scalar_api_reference(
131-
openapi_url=cheshire_cat_api.openapi_url,
132-
title=cheshire_cat_api.title,
133-
scalar_favicon_url="https://cheshirecat.ai/wp-content/uploads/2023/10/Logo-Cheshire-Cat.svg",
134-
)
127+
if get_env("CCAT_DEBUG") == "true":
128+
@cheshire_cat_api.get("/docs", include_in_schema=False)
129+
async def scalar_docs():
130+
return get_scalar_api_reference(
131+
openapi_url=cheshire_cat_api.openapi_url,
132+
title=cheshire_cat_api.title,
133+
scalar_favicon_url="https://cheshirecat.ai/wp-content/uploads/2023/10/Logo-Cheshire-Cat.svg",
134+
)

0 commit comments

Comments
 (0)