Precompile the Authorization value text field in Swagger UI

Viewed 12

I'm using swagger-jsdoc and I implemented a JWT authentication in my api using this configuration:

components: {
      securitySchemes: {
        bearerAuth: {
          type: 'http',
          scheme: 'bearer',
          bearerFormat: 'JWT',
        },
      },
    },
    security: [
      {
        bearerAuth: [],
      },
    ],

I protect the specific routes with

 *     security:
 *        - bearerAuth: [] 

The Swagger UI presents me the Authorization button

enter image description here

In development mode is very annoying everytime to fill the box to make the API working, is there a way to pre-compile this value in swagger?

Thanks

0 Answers
Related