RicoSuter/NSwag

Support preauthorizeApiKey in SwaggerUi3

Open

#2,431 opened on Sep 27, 2019

View on GitHub
 (3 comments) (3 reactions) (0 assignees)C# (1,189 forks)batch import
help wantedproject: swagger-uitype: enhancement

Repository metrics

Stars
 (6,291 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

When using ApiKey authorization, it would be nice if you wouldn't have to enter the apikey manually into SwaggerUi each time (when developing)

SwaggerUi has a feature for this: preauthorizeApiKey.

Seems feasible to implement by adding a new property SwaggerUi3Settings and then inject in the index.html in TransformHtml, just like it's done now for the OAuth2ClientSettings.

Contributor guide