@Field
Use @Field for properties exposed in request or response schemas. The decorator infers primitive types from TypeScript metadata and accepts Swagger property options such as description, example, nullable, minLength, maxLength, minimum, maximum, and enum.
todo-item-input.dto.ts
nullable: true on optional update properties. Required fields receive validation metadata by default.
@FilterableField
@FilterableField includes the property in the schema just like @Field and exposes it as an equality query parameter on collection and export endpoints.
todo-item.dto.ts
filterRequired: truemakes the query parameter mandatory whenever the generated filter is used.filterOnly: trueaccepts the property as a filter but excludes it from serialized response fields.filterDecoratorsapplies additional decorators to the generated query property.- Standard
Field/Swagger options control transformation and validation.
@IDField
@IDField identifies the property used by GET, PUT, and DELETE single-record routes. Declare it on the response DTO so the generated :id parameter is transformed to the correct type.
idOnly: true when an identifier should be accepted as a route parameter but omitted from generated mutation bodies.
@QueryOptions
Use @QueryOptions to set collection defaults on the DTO. Endpoint-level options override decorator options.