openapi generator, security schemas not shows the authentication button in swagger

158 views Asked by At

I'm using openapi generator to generate my api in java from yml file.

I'm trying to enable the security in my server, so I included:

components:
  securitySchemes:
    bearerAuth:
    type: http
    scheme: bearer
    bearerFormat: JWT
security:
 - bearerAuth: []

but with this, I can not see anything related with security in my api file.

I tried to include this in the controller file that if I'm not wrong it is the same and it works:

@SecurityScheme(type = SecuritySchemeType.HTTP, scheme = "bearer", name = "Authorization", bearerFormat = "JWT")

can it be I'm missing something in the yml file in order it to work?

0

There are 0 answers