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
Question:
Is the $ref to #/properties/fee/properties/modificationFee/properties/amount a valid $ref?
The first part points to #/properties/fee/properties/modificationFee, which contains a second $ref to #/properties/purchaseRate/allOf/0. And the second part /properties/amount relates on this second $ref.
It appears incorrect to me. Is there a section in the specifications that addresses this topic? I couldn’t find anything related.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
It is not a valid $ref, no. It's also slightly odd.
First, in draft 7, $ref causes all other sibling keywords to be ignored, so the "type": "object" is irrelevant. This isn't a "problem" it's just odd.
Then, a $ref resolves relative to the base uri for the schema. There is no such property at this path #/properties/fee/properties/modificationFee/properties/amount so the ref is unresolved.
It doesn't work by "copying" the referenced value in the document and then resolving against the "expanded" document, which is what it looks like the schema is intending.
Hello together,
I have a small question about references. I’m currently in a discussion with a library owner whether the provided
$ref
is valid or invalid.Given is the following schema:
Question:
Is the
$ref
to#/properties/fee/properties/modificationFee/properties/amount
a valid$ref
?The first part points to
#/properties/fee/properties/modificationFee
, which contains a second$ref
to#/properties/purchaseRate/allOf/0
. And the second part/properties/amount
relates on this second$ref
.It appears incorrect to me. Is there a section in the specifications that addresses this topic? I couldn’t find anything related.
Thanks in advance.
The text was updated successfully, but these errors were encountered: