apigitlabs / apigit-support

APIGIT is a native Git based collaboration platform for API design, document, mock and share.
https://apigit.com
1 stars 0 forks source link

Creating Bearer Auth (JWT) scheme fails governance checks #19

Closed nad-au closed 1 year ago

nad-au commented 1 year ago

Is there an existing issue for this?

Describe the Issue

According to https://swagger.io/docs/specification/authentication/bearer-authentication/ the method for defining Bearer Authentication via JWT is to create

components:
  securitySchemes:
    bearerAuth:            # arbitrary name for the security scheme
      type: http
      scheme: bearer
      bearerFormat: JWT    # optional, arbitrary value for documentation purposes
# 2) Apply the security globally to all operations
security:
  - bearerAuth: []         # use the same name as above

However, if you view this scheme in the form, the Scheme is missing:

image

This is because bearer should be Bearer in the UI.

image

But if this is left as Bearer then it fails governance checks

image

Steps To Reproduce

  1. Create security scheme as per https://swagger.io/docs/specification/authentication/bearer-authentication/
  2. View the scheme in the UI and observe the missing scheme
  3. Observe that it does pass governance checks
  4. Change scheme from bearer to Bearer
  5. Observe it no longer passes governance checks

Screenshots or Videos

No response

Browser

Brave

Additional Context?

No response

apigitlabs commented 1 year ago

thanks @neildobson-au , team just get it this fixed and deployed. please check if this fix works for you.

nad-au commented 1 year ago

Fixed thanks.