Skip to main content

ModelAction

@webda/core


Interface: ModelAction

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

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:99

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:112

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:107

Method of the action


methods?​

optional methods?: string[]

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

Method for the route

By default ["PUT"]


openapi?​

optional openapi?: any

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

Additional openapi info


rest?​

optional rest?: object

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

REST

body?​

optional body?: string

method?​

optional method?: string

path?​

optional path?: string

route?​

optional route?: string