diff --git a/api/tacticalrmm/tacticalrmm/schema.py b/api/tacticalrmm/tacticalrmm/schema.py index f41a65e6..13000de1 100644 --- a/api/tacticalrmm/tacticalrmm/schema.py +++ b/api/tacticalrmm/tacticalrmm/schema.py @@ -3,10 +3,11 @@ from drf_spectacular.extensions import OpenApiAuthenticationExtension # custom api key auth for swagger-ui class APIAuthenticationScheme(OpenApiAuthenticationExtension): target_class = "tacticalrmm.auth.APIAuthentication" # full import path OR class ref - name = 'API Key Auth' # name used in the schem + name = "API Key Auth" # name used in the schem + def get_security_definition(self, auto_schema): return { - 'type': 'apiKey', - 'in': 'header', - 'name': 'X-API-KEY', - } \ No newline at end of file + "type": "apiKey", + "in": "header", + "name": "X-API-KEY", + }