Closed Ognian closed 10 years ago
The way I read the JSON ref spec, this seems correct. Otherwise some sort of merging behavior would have to be defined.
Any members other than "$ref" in a JSON Reference object SHALL be ignored.
You are right, but this doesn't help. I need to use a $ref since I want to define that "sub" schema only once. And by using it in several places I need to name it different...
I think that there was a discussion on the JSON Schema google group explaining the problem. Think of an address schema. Now you want to use a $ref everywhere where you have an address, regardless if it is a delivery address or and invoice address etc. So in my opinion there must be a way to define this with $ref, I would think that merging is the solution, and that this should be changed in json-ref-04... help...
Would something like this work for your case?
{
"title": "Title of X",
"allOf": [{"$ref": "/v1/dbRef"}]
}
Yes indeed this works! Thank you
I'm pretty sure that this was working. the following property:
Is shown as xxx instead of "Titel of X", any idea why? Thanks Ognian