Skip to main content

@webda/coreReadme | API


Function: Operation()

Operation(properties?, route?): (target, executor) => void

Register an Operation within the framework

An operation is a callable method with an input and output The method will receive a Context from where it can execute

Parameters

properties?: Object

properties.id?: string

Id of the Operation

Default

methodName

properties.permission?: string

WebdaQL to execute on session object to ensure it can access

route?: Object

route.method?: HttpMethodType

route.openapi?: OpenAPIWebdaDefinition

route.url?: string

Returns

Function

Parameters

target: any

executor: string

Returns

void

Source

packages/core/src/services/service.ts:117