@redocly/cli
Version:
[@Redocly](https://redocly.com) CLI is your all-in-one API documentation utility. It builds, manages, improves, and quality-checks your API descriptions, all of which comes in handy for various phases of the API Lifecycle. Create your own rulesets to make
12 lines • 461 B
JavaScript
export function addSecurityPrefix(security, componentsPrefix) {
return componentsPrefix
? security?.map((s) => {
const joinedSecuritySchema = {};
for (const [key, value] of Object.entries(s)) {
Object.assign(joinedSecuritySchema, { [componentsPrefix + '_' + key]: value });
}
return joinedSecuritySchema;
})
: security;
}
//# sourceMappingURL=add-security-prefix.js.map