From 17193ef3a1a546cb7f9f2f4b1ef4fa92501ffabc Mon Sep 17 00:00:00 2001 From: anbreaker Date: Thu, 8 Oct 2020 17:12:00 +0200 Subject: [PATCH] fix: Default to Authorization header when auth type is http (#94) Co-authored-by: Lukasz Gornicki --- partials/servers.html | 3 ++- test/spec/asyncapi.yml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/partials/servers.html b/partials/servers.html index 719f5e99a..319f1d80f 100644 --- a/partials/servers.html +++ b/partials/servers.html @@ -106,7 +106,8 @@
Security:
{% if def.bearerFormat() %} Header: {{def.name()}} + style="height: 20px;font-size: 11px;padding: 3px;">Header: Authorization + {% endif %} {% if def.openIdConnectUrl() %} diff --git a/test/spec/asyncapi.yml b/test/spec/asyncapi.yml index a5e041342..9ca866ef1 100644 --- a/test/spec/asyncapi.yml +++ b/test/spec/asyncapi.yml @@ -26,6 +26,8 @@ servers: enum: - '1883' - '8883' + security: + - bearerAuth: [] defaultContentType: application/json @@ -171,6 +173,11 @@ components: description: Date and time when the message was sent. securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + description: The JWT for authorizing against the backend. Needs to be obtained through the authentication route. apiKey: type: apiKey in: user