Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs viewer unhappy with Oauth2 Security scheme #146

Open
alex-zywicki opened this issue Dec 10, 2021 · 5 comments
Open

Docs viewer unhappy with Oauth2 Security scheme #146

alex-zywicki opened this issue Dec 10, 2021 · 5 comments

Comments

@alex-zywicki
Copy link
Contributor

When using the newly added security schemes, with the following yaml snippet.

  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: /oauth/basic
          scopes:
            secure_ping:access: "Access SecurePing"
      x-tokenInfoFunc: token_info

I get these error messages from the /docs/ endpoint

/components/securitySchemes/oauth2 should have required property '$ref'.
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should have required property 'in'
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2 should have required property 'scheme'
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT be valid
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2 should have required property 'scheme'
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should have required property 'name'
/components/securitySchemes/oauth2 should have required property 'in'
/components/securitySchemes/oauth2 should match exactly one schema in oneOf
/components/securitySchemes/oauth2/flows/implicit/authorizationUrl should match format "uri"
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should have required property 'openIdConnectUrl'
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should NOT have additional properties
/components/securitySchemes/oauth2/type should be equal to one of the allowed values
/components/securitySchemes/oauth2 should match exactly one schema in oneOf
/components/securitySchemes/oauth2 should match exactly one schema in oneOf
/components/securitySchemes/oauth2 should match exactly one schema in oneOf
@dedoussis
Copy link
Owner

dedoussis commented Dec 15, 2021

@alex-zywicki This looks like an unfortunately error handling on behalf of the @asyncapi/parser js library. The actual issue with the securityScheme snippet above is that the securitySchemes/oauth2/flows/implicit/authorizationUrl value is not of a valid URI format. After correcting this, I was able to visualise the security schemes of the server (through asynction):

image

@dedoussis
Copy link
Owner

@alex-zywicki Have raised an issue in the parser-js repo of AsyncAPI. If you're happy with it, I'll close the current issue.

@alex-zywicki
Copy link
Contributor Author

For posterity The issue

@alex-zywicki
Copy link
Contributor Author

@dedoussis Can we leave this open until there is some sort of resolution on their end? If they do fix it Asynction would need to bump its version of the docs viewer right?

@dedoussis
Copy link
Owner

Yes. Good point. Will leave it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants