Generate JSON Schema consistency - #4
Conversation
jakubfiala
left a comment
There was a problem hiding this comment.
hey @wittydeveloper, thanks for the pull requests! I'm going to bundle this with your other PR in one release and give you a shout when it's published.
|
Hi @jakubfiala , thanks! However, please wait, this PR is not ready yet 🙏 |
|
oh sure, not merging it yet :) |
|
Hi @jakubfiala, After many work on the JSON-Schema standard compliance, I found that many things generated by the lib are "invalid" JSON-Schema properties. I maintain a fork of this project with a partial fix. In order to ship a version fully compliant with the JSON Schema standard, I will need to refactor a lot of the code and i'm not sure if this changes make senses for the purpose of this repo? I was thinking creating a different project that generate strictly valid JSON Schema (by ignoring not compatible GraphQL types, etc), what do you think? Cheers, |
|
Hey @wittydeveloper – really sorry for only getting back to this after a few months, they've been very busy ones. I think what you're proposing makes sense, my approach was to represent as much as possible of the GSL at the cost of potential non-compliance with JSON Schema, while your approach is the other way around. Thanks for your contributions to this project! |
|
@jakubfiala No problem! Sorry on my side too, considering I needed a GraphQL to JSON Schema tool pretty quick and also another result (compliant), I started a new package: I didn't want to edit too many things in your library, and especially I prefer working with TypeScript 😅 |
Pull request still in development
draft-07transformreturns a valid JSON Schema usingajvlibGRAPHQL_SCALAR,GRAPHQL_UNIONandGRAPHQL_ENUMin generated strict schema