Closed
Description
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:
{
"$id": "schemaA/1.0",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"fee": {
"type": "object",
"properties": {
"modificationFee": {
"$ref": "#/properties/purchaseRate/allOf/0"
}
}
},
"purchaseRate": {
"allOf": [
{
"type": "object",
"properties": {
"amount": {
"type": "number",
"format": "float"
}
}
},
{
"type": "object",
"$ref": "#/properties/fee/properties/modificationFee/properties/amount"
}
]
}
}
}
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.
Metadata
Metadata
Assignees
Labels
No labels