Skip to main content

ActionOptions

@webda/core


Interface: ActionOptions

Defined in: packages/core/src/models/decorator.ts:13

Options accepted by @Action() and @Operation().

The compiler scans for these decorators by name to populate model and Behavior metadata. The runtime decorator itself is a no-op pass-through — its only job is to make @Action() a valid runtime call so the source compiles. All actual action wiring is metadata-driven (see compiler/src/metadata/actions.ts and metadata/behaviors.ts).

Properties​

description?​

optional description?: string

Defined in: packages/core/src/models/decorator.ts:36

Free-form description forwarded into operation metadata.


global?​

optional global?: boolean

Defined in: packages/core/src/models/decorator.ts:21

Mark the action as global (class-level) rather than instance-level.


methods?​

optional methods?: string[]

Defined in: packages/core/src/models/decorator.ts:19

HTTP methods accepted by the action; defaults to ["PUT"].


name?​

optional name?: string

Defined in: packages/core/src/models/decorator.ts:15

Override the registered action name (defaults to the method name).


openapi?​

optional openapi?: any

Defined in: packages/core/src/models/decorator.ts:17

OpenAPI overrides for the registered route.


rest?​

optional rest?: object

Defined in: packages/core/src/models/decorator.ts:31

Behavior-only override for the REST route registration.

  • route: "." ⇒ /<plural>/{uuid}/<attribute> (no extra segment)
  • route: "url" ⇒ /<plural>/{uuid}/<attribute>/url
  • route: "{hash}" ⇒ /<plural>/{uuid}/<attribute>/{hash}

method overrides the HTTP verb; defaults to "PUT" when omitted.

method?​

optional method?: string

route?​

optional route?: string


summary?​

optional summary?: string

Defined in: packages/core/src/models/decorator.ts:38

Free-form summary forwarded into operation metadata.