-
Notifications
You must be signed in to change notification settings - Fork 35
$ref
properties in json schemas not resolved?
#5
Comments
Unfortunately this has been a long running issue with the JavaScript parser (raml-org/raml-js-parser#115) and there's currently no solution available. This is something will definitely be fixed in future versions of the RAML specification itself. |
Hi Alwin. I have found that the most reliable way to make use of the $ref element (which, as Blake says, is not directly supported in RAML) is to use a single schema for all elements and to add a unique "id" element to each schema element. This appears to be the only guarantee currently of Is this a possibility for you? |
Thanks Barbara, I'll give that a try. |
I'm having a similar problem, when using a reference to the schema with the name. Assume you have the schemas included as follows
Then in player you have defined a property
When running osprey-mock-service I get: EDIT 2015-02-08: just figured out this is only happening when the schema is in the body for the request. Therefore affects mainly POST and PUT, when using a schema with a reference in the response, seems to be working OK |
@dmalanij The |
Is there any update on this? This is currently the only issue I have with the package. |
Hi,
We're using this project for mocking api calls and we've set up json schemas with references to definitions in another file, like so:
schemas/authentication/login.json
schemas/definitions.json
When we run the
osprey-mock-service
these refered definitions seem not to do anything with the validation, whereas when we inline the type and pattern from thedefinitions.json
in thelogin.json
the validation does happen.Is there a way to make the
$ref
property work for the schemas?Thanks!
The text was updated successfully, but these errors were encountered: