v2.2.5
Patch release — adds a type helper for controllers that rename their service field via serviceProperty, and corrects the generated OpenAPI descriptions to be truthful about soft-delete configuration.
Added
CrudControllerFor<Entity, 'fieldName'>type helper — when a controller uses@Crud({ serviceProperty: 'myService' })and declares onlymyService, writingimplements CrudController<Entity>raises TypeScript TS2559 ("has no properties in common") because the all-optional interface has no discriminant to match.CrudControllerFor<T, P>resolves this by naming the service fieldPin the resulting type. Alternatively, dropimplementsentirely — NestJS does not require it for routing. Available from@nestjs-crud/core.
Changed
- Generated OpenAPI descriptions are now soft-delete–truthful. Resources without soft-delete enabled no longer mention
includeDeletedanywhere in their descriptions. Resources with soft delete enabled carry theincludeDeletednote only on the endpoints that honour it (getMany,getOne). Library-internal validation prose has been removed from all generated descriptions.