ng-openapi-gen
Version:
An OpenAPI 3 codegen for Angular 12+
20 lines • 671 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Security = void 0;
const gen_utils_1 = require("./gen-utils");
/**
* An operation security
*/
class Security {
constructor(key, spec, scope = [], options, openApi) {
this.spec = spec;
this.scope = scope;
this.name = spec.name || '';
this.var = (0, gen_utils_1.methodName)(key);
this.tsComments = (0, gen_utils_1.tsComments)(spec.description || '', 2);
this.in = spec.in || 'header';
this.type = (0, gen_utils_1.tsType)(spec.schema, options, openApi);
}
}
exports.Security = Security;
//# sourceMappingURL=security.js.map