Skip to content

Function: ODataPatch()

ODataPatch(entitySetName, options?): MethodDecorator

Defined in: packages/core/src/decorators/odata-patch.decorator.ts:22

Composite method decorator for OData PATCH (update) endpoints.

Composes:

  1. Patch(path) — NestJS route decorator, defaults to ':key'
  2. SetMetadata(ODATA_ROUTE_KEY, { entitySetName, operation: 'update', isSingleEntity: true })
  3. UseInterceptors(ODataResponseInterceptor) — wraps result in single-entity OData envelope
  4. UseFilters(ODataExceptionFilter) — formats errors as OData v4 error bodies

Per D-01: merge-patch semantics. Per D-02: parenthetical key via ':key' param. Zero TypeORM imports — per PKG-01 architecture constraint.

Parameters

entitySetName

string

options?

ODataPatchOptions

Returns

MethodDecorator