valentinpalkovic/prisma-json-schema-generator

Generate schemas without `definitions` and `$ref`

Closed this issue · 2 comments

A use case I see for this tool is to use prisma schemas as $jsonSchema validators in mongodb (mongo takes draft 4, but draft 7 and draft 4 are mostly compatible). But mongo doen't support $ref. Could there be a config to generate everything inline?

Hey @Zizico2,

Thank you very much for opening up this issue.

I have a question in mind regarding self-references. How should they work without a reference? Take the User type as an example, which is described in the Readme. The predecessor field is a self-reference to the User type. How would we avoid an infinite deep inlining of the User type?

Closing due to inactivity