Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Referencing other local JSON Schemas #63
I have strong doubts whether this is a bug or not, but it is definitely a nice-to-have feature which is foreseen by the JSON Schema specification.
What the specification states
The Schema References With "$ref" section states the following:
As an example it provides the following simple case:
And this is how it works in the latest version of the Manifold, no offense here.
At the same time, it is impossible to introduce any hierarchical structure on top of one's schemas, i.e. to use subdirectories and reference other schemas relatively in both directions: forth with
But there are these "can be identified by any URI" and "In all cases <...> resolving its value as a URI reference against the current base URI" parts that make me believe that such a scenario is also considered possible, yet omitted in the current Manifold's implementation.
What the specification doesn't state yet
What causes my doubts is an associated cite reference:
While it is not feasible in the wild (a.k.a. World Wild Web), we are dealing with a special case of "static resources as Java Types" and it would seem that it doesn't matter much. However, there might be matters to discuss.
What everyone (including myself) definitely wants to be able to do is to work with such references without fuss in the Manifold's "dynamic mode".
Scenarios in scope
Checks an ability to reference the
Manifold is unable to compile such a schema in the current implementation:
It also happens that Manifold's IntelliJ plugin is dealing fine (w/o
Checks an ability to back-reference the
Now it gives almost the same compilation error:
And is equally located by the IntelliJ plugin.
As always, test project is available here: