diff --git a/fastapi/openapi/docs.py b/fastapi/openapi/docs.py index ddb84aa84..206818e08 100644 --- a/fastapi/openapi/docs.py +++ b/fastapi/openapi/docs.py @@ -256,8 +256,8 @@ def get_stoplight_elements_html( {f'apiDescriptionUrl="{openapi_url}"' if openapi_url != '' else ''} {f'apiDescriptionDocument="{api_description_document}"' if api_description_document != '' else ''} {f'basePath="{base_path}"' if base_path != '' else ''} - {'hideInternal="true"' if hide_internal == True else ''} - {'hideTryIt="true"' if hide_try_it == True else ''} + {'hideInternal="true"' if hide_internal is True else ''} + {'hideTryIt="true"' if hide_try_it is True else ''} {f'tryItCorsProxy="{try_it_cors_proxy}"' if try_it_cors_proxy != '' else ''} tryItCredentialPolicy="{try_it_credential_policy.value}" layout="{layout.value}"