elements icon indicating copy to clipboard operation
elements copied to clipboard

Better support for custom security schemes and security scheme descriptions

Open jensljungblad opened this issue 3 years ago • 2 comments

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!

jensljungblad avatar Sep 30 '21 17:09 jensljungblad

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. 🙏

mpodlasin avatar Oct 04 '21 10:10 mpodlasin

Any way this will be added? :)

jensljungblad avatar Mar 24 '22 20:03 jensljungblad