Function: ODataGetByKey()
ODataGetByKey(
entitySetName,options?):MethodDecorator
Defined in: packages/core/src/decorators/odata-get-by-key.decorator.ts:23
Composite method decorator for OData GET-by-key (single entity) endpoints.
Composes:
- Get(path) — NestJS route decorator, defaults to ':key'
- SetMetadata(ODATA_ROUTE_KEY, { entitySetName, operation: 'getByKey', isSingleEntity: true })
- UseInterceptors(ODataResponseInterceptor) — returns entity directly (not wrapped in value array)
- UseFilters(ODataExceptionFilter) — formats errors as OData v4 error bodies
Per D-05: Returns single entity, not wrapped in value array. Context URL uses /$entity suffix for single-entity responses. Zero TypeORM imports — per PKG-01 architecture constraint.
Parameters
entitySetName
string
options?
Returns
MethodDecorator