You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm following the instructions on resolving json refeferences using the new referencing package, and it works for validation. However, the resource.contents continues to provide the schema in its original form (without refs resolved). For some use cases (apart from validation), I would like to be able to get the fully-resolved schema, including with resolved $refs that point to $defs -- but I can't figure out how to do this. The resolved schema clearly exists somewhere for the final validation to work -- would it be possible to make this somehow accessible so that said resolved schema could be used for other purposes as well?
The text was updated successfully, but these errors were encountered:
This is actually in general impossible (in general being when you take into account $dynamicRef and not just $ref). It's also discouraged by the JSON Schema team!
In general the main reasons to do this are indeed for non-validation, and generally for tooling which has poor support for $ref itself (thankfully this library now not being one of those).
The recommended solution (by the JSON Schema team) to do what generally is needed for said tooling -- namely to reduce the amount of fancy ref resolution needed such that it's "easier" and self contained -- is the official bundling process. An issue to track adding a bundler to referencing is here.
I'm following the instructions on resolving json refeferences using the new
referencing
package, and it works for validation. However, theresource.contents
continues to provide the schema in its original form (without refs resolved). For some use cases (apart from validation), I would like to be able to get the fully-resolved schema, including with resolved $refs that point to$defs
-- but I can't figure out how to do this. The resolved schema clearly exists somewhere for the final validation to work -- would it be possible to make this somehow accessible so that said resolved schema could be used for other purposes as well?The text was updated successfully, but these errors were encountered: