Open m-mohr opened 1 year ago
In general, it is safer to send the response without $ref
s, since not all clients may support it. This is also what we do in our implementation. The current recommendation for how to construct the schema does not mention $ref
, so implicitly I would say that the guidance is not to use $ref
. Maybe that should be made explicit?
I have concerns about making this required to support, a recommendation should be enough. Almost all guidance on constructing the schema are in a recommendation, so this aspect should be, too. It is very easy to construct a JSON Schema that probably most clients won't be able to parse, but we also do not prohibit that, because at this point we do not have a clear understanding what a good profile of JSON Schema is, to make a firm requirement. I would see the $ref
s in the same context.
Thanks!
Meetings 2024-08-26: Add to the recommendation that $ref
should not be used, because it makes it harder to parse the logical schema.
In STAC I observe that the queryables / schemas returned by the API often use $ref to link to "relatively" simple schemas. I guess in Python and other clients that's not so much of an issue, but I'm implementing a browser-based tool (i.e. STAC Browser) that can show a form for queryables, but loading all the dozens of related schemas and dereferncing them freezes the Browser for multiple seconds. In this use-case it's really bad to have $refs, especially if you link to various files/extensions.
I'm wondering:
?dereference=1
or so). (I think so.)