karlvr / openapi-generator-plus

A code generator for OpenAPI written in node and designed to have pluggable generators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support of bearer security schema

psamusev opened this issue · 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.