Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Hidden models and model properties #27

Open
germanamz opened this issue Nov 22, 2024 · 0 comments
Open

[feat] Hidden models and model properties #27

germanamz opened this issue Nov 22, 2024 · 0 comments

Comments

@germanamz
Copy link
Owner

germanamz commented Nov 22, 2024

Background
Currently all models and their keys get generated and are readable from apis.

Task
Prisma-rest should provide a way to hide models or properties based of comments in the prisma schema using prisma's 3 slash comments

Example of a hidden property

model SomeModel {
  /// @crud.hidden
  property PropType
}

Example of a hidden model

/// @crud.hidden
model SomeModel {
  property PropType
}

CRUD:

  • If a model is hidden should not generate models service
  • If a property is hidden it should be accessible from crud

APIs:

  • If a model is hidden should not generate models api
  • If a property is hidden it should be accessible from apis
@germanamz germanamz converted this from a draft issue Nov 22, 2024
@germanamz germanamz changed the title Readonly models and model properties Hidden models and model properties Nov 22, 2024
@germanamz germanamz changed the title Hidden models and model properties [feat] Hidden models and model properties Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant