Skip to content

Function: ODataGet()

ODataGet(entitySetName, options?): MethodDecorator

Defined in: packages/core/src/decorators/odata-get.decorator.ts:36

Composite method decorator for OData GET endpoints.

Composes:

  1. Get(path) — NestJS route decorator
  2. SetMetadata(ODATA_ROUTE_KEY, { entitySetName }) — marks the route as OData
  3. UseInterceptors(ODataResponseInterceptor) — wraps result in OData JSON envelope
  4. UseFilters(ODataExceptionFilter) — formats errors as OData v4 error bodies

Parameters

entitySetName

string

The OData entity set name (e.g. 'Products'). Used to build the @odata.context URL and for response formatting.

options?

ODataGetOptions

Optional configuration

Per D-12, D-13, RESEARCH.md Pattern 5. Zero TypeORM imports — per PKG-01 architecture constraint.

Returns

MethodDecorator