Open ShaunSHamilton opened 1 month ago
More or less a duplicate of https://github.com/valentinpalkovic/prisma-json-schema-generator/issues/13
@valentinpalkovic Thank you. The added context does help. Here is what I am not understanding still:
As in the tests example mentioned above, why is the posts
field "optional", but keywords
and biography
required? They have the same annotations (none).
This appears to be a bug, but if not, then a work around be be appreciated:
https://github.com/valentinpalkovic/prisma-json-schema-generator/blob/d2d6fba55bbe1caff0979be27e39a6ed5506452d/src/tests/generator.test.ts#L28
https://github.com/valentinpalkovic/prisma-json-schema-generator/blob/d2d6fba55bbe1caff0979be27e39a6ed5506452d/src/tests/generator.test.ts#L592-L595
https://github.com/valentinpalkovic/prisma-json-schema-generator/blob/d2d6fba55bbe1caff0979be27e39a6ed5506452d/src/tests/generator.test.ts#L619-L620
Surely
Posts
should be a required field?In my case, I have the following type:
Same goes for
TagConfig
andQuestionConfig
- they are required, but do not get treated as such.I am happy to contribute a fix, if this is unintentional