Skip to content

How to correctly point to refs with JSON Schema emitter, when generated as single file. #4084

Discussion options

You must be logged in to vote

The root cause here is that our emitter is producing JSON Schema 2020-12 and VSCode supports (I think) draft 7 or so? I am guessing you are emitting a single file via the bundleId option, which produces a bundle as specified in 2020-12 and which unfortunately VSCode doesn't support.

One thing that might work - if you have a root object for your schemas, you can put the @jsonSchema decorator directly on that root object, and then any references to other schemas will be inlined and use a ref format that should be compatible. So it would look something this.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Devon-White
Comment options

@drpump
Comment options

@drpump
Comment options

Answer selected by Devon-White
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants