Reputation: 67
I am using the swagger UI interface to test my node js requests. I added the Authentication for those requests but when I try them in swagger I have the following issue: If I add a bearerAuth token in the swagger UI When I click on execute in one of my requests, they are not executed. If I don't put a bearerAuth token my request plays as intended.
To add a token I added those options :
const openApi = OpenAPI({
schema,
info: {
title: '**** API',
version: '1.0.0',
},
components: {
securitySchemes: {
bearerAuth: {
type: 'http',
scheme: 'bearer',
bearerFormat: 'JWT',
},
},
},
security: {
bearerAuth: [],
},
});
Upvotes: 1
Views: 980