Hi,
I am having an issue referenceing a schema inside another.
I have an entity ‘Orders’, and in that entity I have a paramater called ‘Orderdetails’ which is an array of OrderDetail objects.
I have successfully created the Schema for both entities, and they validate correctly on API responses.
When I go to the Order schema and create a new parameter for OrderDetails, I give it the type of ‘Array’ and the items inside the array as linked Schema ‘OrderDetails’. This works and looks fine in the Schema view, it pulls all the correct properties through into the array object.
However now when I try to validate the Order schema against the API response, it gives this error:
‘can’t resolve reference #/definitions/3133027 from id http://json-schema.org/draft-04/Order’.
If I go back to the Order schema, and dereference the orderdetail schema, it validates fine. As soon as there is a link between the Order and OrderDetails schemas, I always get that error message.
Any help in correctly validating this linked schema is greatly appreciated. Thankyou very much.