zenstackhq / zenstack

Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
https://zenstack.dev
MIT License
2.07k stars 88 forks source link

Abstract model implementations cannot have empty body #734

Closed Lordfirespeed closed 12 months ago

Lordfirespeed commented 1 year ago

Description and expected behavior

As per the title. Currently, any empty model body signifies user error and raises a validation error. This behaviour is correct for 'base' models (models that do not inherit from any abstract models). However, a model with an empty body that extends an abstract model would yield a valid model and therefore should not raise a validation error.

Screenshots

image image image

Environment (please complete the following information):

Additional context

N/A

ymc9 commented 1 year ago

Thank you. Good catch!

ymc9 commented 12 months ago

Fixed in v1.1.0.