Page Contents

Home > @loopback/openapi-v3 > mergeSecuritySchemeToSpec

mergeSecuritySchemeToSpec() function

Security scheme merge helper function to patch the current OpenAPI spec. It provides a direct route to add a security schema to the specs components. It returns a new merged object without modifying the original one.


export declare function mergeSecuritySchemeToSpec(spec: OpenApiSpec, schemeName: string, schemeSpec: SecuritySchemeObject): OpenApiSpec;


Parameter Type Description
spec OpenApiSpec  
schemeName string The name of the security scheme to be added
schemeSpec SecuritySchemeObject The security scheme spec body to be added,