karlvr/openapi-generator-plus

Support of bearer security schema

Closed this issue · 1 comments

function toCodegenSecurityScheme(name: string, scheme: OpenAPIV2.SecuritySchemeObject | OpenAPIV3.SecuritySchemeObject, state: InternalCodegenState): CodegenSecurityScheme {
doesn't contain any code which related to 'Bearer' authentication type.

Proposal: Add isBearer flag to simplify identification in generators implementations

@psamusev thanks for your comments. Bearer is a common auth scheme, but any scheme could be specified in the scheme attribute (the values should come from https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml). So I don't think it's appropriate to add isBearer here... it's sort of to make up for the templating language sucking, which I hope to change :-) So I'm going to close this and pick it up in the generator.