Skip to content

v2.2.5

Choose a tag to compare

@github-actions github-actions released this 11 Jun 12:43
· 17 commits to master since this release
9d98f37

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 only myService, writing implements 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 field P in the resulting type. Alternatively, drop implements entirely — 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 includeDeleted anywhere in their descriptions. Resources with soft delete enabled carry the includeDeleted note only on the endpoints that honour it (getMany, getOne). Library-internal validation prose has been removed from all generated descriptions.