How to specify JWT bearer Type in openapi generation
See original GitHub issueHi,
I’m trying to use a @httpBearerAuth trait on my service, that specifies the bearerFormat as JWT. How do I do this using the current trait?
I’d like to generate an openapi specification that has these lines in it:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Configure JWT Authentication for OpenAPI - Baeldung
In this tutorial, we learned how to configure JWT authentication to our OpenAPIs. Swagger-UI provides a tool to document and test the REST...
Read more >Bearer Authentication - Swagger
In OpenAPI 3.0, Bearer authentication is a security scheme with type: http and scheme: bearer . You first need to define the security...
Read more >Use JWT Bearer Authorization in Swagger OpenAPI
Blog / Use JWT Bearer Authorization in Swagger OpenAPI ... First, we need to configure JWT based authentication in our project.
Read more >openapi - How can I represent 'Authorization: Bearer <token ...
Important: In this example, API consumers must include the "Bearer" prefix as part of the token value. For example, when using Swagger UI's...
Read more >JWT bearer Authorization in Swagger OpenAPI | TheCodeBuzz
JWT Authorization Token in Swagger · Getting started · Step 1- Define AddSecurityDefinition · Step 2- Add AddSecurityRequirement · What is JWT (JSON ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think it works without this field. Feel free to close this ticket.
I thought I’d support this via https://github.com/awslabs/smithy/pull/860 but since bearerFormat is specific to OpenAPI felt it doesn’t belong in the httpBearerAuth trait, which is not OpenAPI specific. Since bearerFormat in OpenAPI is only a documentation hint and doesn’t affect client-server interoperability, I’m unsure if this is really needed. @jabalsad if you can confirm you could deploy your API without this field and don’t really need it, I’ll close this one.