Skip to main content

ModelAction

@webda/core


Interface: ModelAction

Defined in: packages/core/src/models/types.ts:75

Define an Action on a model

It is basically a method designed to be called by the API or external systems

Properties​

global?​

optional global?: boolean

Defined in: packages/core/src/models/types.ts:88

Define if the action is global or per object

The method that implement the action must be called _${actionName}


handler?​

optional handler?: string

Defined in: packages/core/src/models/types.ts:101

Name of the method implementing the action, when the action is exposed under another name with @Action({ name })


method?​

optional method?: string

Defined in: packages/core/src/models/types.ts:96

Method of the action


methods?​

optional methods?: HttpMethodType[]

Defined in: packages/core/src/models/types.ts:81

Method for the route

By default ["PUT"]


openapi?​

optional openapi?: any

Defined in: packages/core/src/models/types.ts:92

Additional openapi info