elements
elements copied to clipboard
Better support for custom security schemes and security scheme descriptions
Is your feature request related to a problem?
@philsturgeon asked me to open this after discussing on Slack.
Implementing a security scheme with a custom schema type should technically be possible. The OpenAPI spec only says the scheme SHOULD be registered in the IANA registry, not that it MUST.
So this should work:
components:
securitySchemes:
auth:
type: http
scheme: Custom-Type
security:
- auth: []
However it only renders as: “auth coming soon”
.
Related: Any description you add to a security scheme gets rendered, but it also renders Element's default description, which could have contradicting statements. If you provide your own description, I don't think Element should render the default one.
Describe the solution you'd like
It would be great if it accepted the custom type!
https://github.com/stoplightio/elements/pull/983/files
Here is an example of adding a sec scheme support.
WARNING! This is a more involved, complex issue. If you decide that you are brave enough, give me a ping. I'll do everything I can to help you. 🙏
Any way this will be added? :)