-
Notifications
You must be signed in to change notification settings - Fork 36
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
ignoreRelatedModels (but include foreign key fields) #504
Comments
I also really need this. |
@Flax95 Thank you for opening up this issue! Should the relations only be dropped, If they are not available in the schema or always? |
You are already able to also generate the relational scalar fields by enabling it in the settings: generator jsonSchema {
provider = "prisma-json-schema-generator"
keepRelationScalarFields = "true"
} Then userRoleId will be generated as well. And the only feature you would like to have is to ditch the relation fields. Am I right? |
Correct. Edit: |
I actually ended up forking your plugin to make it produce the output suitable for Mongo $jsonSchema. Will publish it later (giving the credit of course). |
Great work on this!
I was thinking of using a generated schema as a starting point for user input validation.
In most cases, I would have no use for the relations.
Currently produces:
I would have liked:
Foreign keys would be included.
Is this a feature that you have plans for?
The text was updated successfully, but these errors were encountered: