asynction
asynction copied to clipboard
Docs viewer unhappy with Oauth2 Security scheme
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
@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):
@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.
For posterity The issue
@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?
Yes. Good point. Will leave it open.