Missing $id in generated json-schema
Closed this issue ยท 3 comments
Hi,
I was looking to add/modify validations rules, and found an issue about it here. I do agree with your choice of keeping it away from this library. It is also quite easy to use $ref to do the job. But to do that, the original json-schema must have an $id to reference it.
Is it ok if i open a PR to fix it (along with the test)?
Thanks @valentinpalkovic
Hey @FabioReact!
Thank you for opening this issue. Can you explain a bit further, how the generated JSON schema should look like after your changes? I would like to understand what your exact proposal is!
It should only add a new key/value pair, such as:
{ "$id": "prisma-json-schema", "$schema": "http://json-schema.org/draft-07/schema#" ... }
That way, each time you generate a new json-schema from a new prisma schema, you will keep the same $id (in json-schema.json) in case you need to reference it.
๐ This issue has been resolved in version 1.5.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐