OpenAPI v3 - API Key

Does OpenAPI v3 works with API Key? V2 doc states that we can use

UseBearerSecurity = true,

but V3 doesn’t seem to have that.

and says :

As the value field is for the entire Authorization HTTP Header you’d need to add your JWT Token or API Key prefixed with Bearer

I have the services.AddJwtAuth(); inside the ConfigureOpenApi and tried to set the bearer value as stated in v2 doc but no luck.

If not supported through ServiceStack, is there anything (with Extensions) I can do on my own to make it work, and while at it make my own custom auth work also or it simply cannot be done?

It wasn’t supported before, but I’ve just added support for it in this commit where you can register a new OpenAPI v3 API Key Security Scheme in your Program.cs with:

builder.Services.AddServiceStack(typeof(MyServices).Assembly, c => {
    c.AddSwagger(o => {
        o.AddApiKeys();
    });
});

This is now available from v8.8.1+ that’s now available in the pre release packages.