Security
@tsed/schema
Usage
typescript
import { Security } from "@tsed/schema";
See /packages/specs/schema/src/types/decorators/operations/security.ts.
Overview
ts
function Security(name: string, ...scopes: string[]): Function;
export function Security(security: OpenSpecSecurity): Function;
Description
Add security metadata on the decorated method.
Examples
On method
typescript
@Controller("/")
class ModelCtrl {
@Security("write:calendars")
async method() {}
}