Closed Reedian closed 7 years ago
@Reedian in general, references to external files are supported.
Where is the properties: { "$ref": "show_confirmation.json#/properties" }
part? I don't see it in either file. Also, what are the file names of each of these and are they in the same directory? Is the second one show_confirmation.json
?
@handrews I haven't included properties
because it is not the part of my question, only the sidenote. Updated original message with file names.
@Reedian assuming those two files are in the same directory, that should work.
What is the error you are seeing?
@handrews exactly, they are in the same directory. I'm not seeing any error. It just does not get rendered.
As you can see on the screenshot above the response object is empty. My expectations were rather to see the response which I have defined in show_confirmation.json
.
@Reedian I have reproduced this with both the bootstrap and internal cloudflare theme, and I am baffled. Although this seems to be the same as #75 which I have shamefully forgotten about repeatedly (for a variety of reasons). I'm going to poke at both examples a bit more, but may close this in favor of tracking the issue in the older ticket.
@handrews okay I will close the issue. Just for information please tell me are you planning to fix it anytime soon?
@Reedian I'm still trying to figure out why it happens, given that a similar construct works in numerous other doca-generated projects. I definitely want to fix it.
@handrews closing this one. Fingers crossed that you will find solution :)
I have a project where during the tests I'm validating API JSON responses against written JSON schemas. My idea is to generate API documentation from it with minimal effort.
I have tried to reference to my schemas from the base schema without any result.
For example, I have base schema file for
/confirmation
resource -confirmation_api.json
:and my schema file which I use for testing etc.
show_confirmation.json
I was only able to load it to the base schema properties by
properties: { "$ref": "show_confirmation.json#/properties" }
but that is not what I want to achieve.Is doca supporting reference to the schema from an external file? If yes what am I missing?