jsonSchema: loading $ref error while viewing / publishing the hub

(Vadim Drapkin) #1


In many of my APIs, I use the same pattern of referring the request body/response to the common modeling file containing all models/responses definition.
As a result, in the definition of the request body of the operation, the raw schema looks like:
“$ref”: “./shared_data_models.oas2.yml#/definitions/user”
When I see the page in the read mode, I see that the request schema is not loaded and the “jsonSchema: loading $ref” is shown instead. (Please see attached images)

What is needed to be changed in order for the schema to load properly?


(Taylor Barnett) #2

Hey @vadimdr, do you have any errors on the OAS document that you are referencing (shared_data_models.oas2)? It might be having trouble resolving the reference if there are issues with the specification.

(Vadim Drapkin) #3


There are 4 errors related to my previous support post, see the image attached:


There is the same type of error (RESOLVE_AUTHORITY) I am unable to resolve - see the image attached below:

(Taylor Barnett) #4

Okay, it looks like we may be having a bug when the property field name is $ref. I’m opening up an issue for this internally. The resolve authority errors appear to go away when I change one in a same project I tested it out with.

(Taylor Barnett) #5

@vadimdr, it would help me explain your use case a bit more if I had a bit more context on the use case were you have "$ref" as the property field name. Thanks!

(Vadim Drapkin) #6


Please check http://www.simplecloud.info/ -it contains all the info related to SCIM 2.0 protocol. In Example Group object you will see the usage of the $ref property name which is part of the RFC of the protocol


(Taylor Barnett) #7

Hey @vadimdr,

We have got a fix for this in code review right now. It will hopefully be out in our next release later this week. Thanks for calling it out.

(Marc) #8

For anybody else running into this, you can follow the open PR that fixes the issue here: https://github.com/stoplightio/json-ref-resolver/pull/8.

(Taylor Barnett) #9

Just wanted to update that the fix for this is currently being tested and will go out in the next release.

RESOLVE_AUTHORITY multiple errors
(Taylor Barnett) #10

@vadimdr hi! Just wanted to check in to see if you are still seeing this issue. It should have been fixed in the last release about a week ago.

(Taylor Barnett) #11

@vadimdr hi again! just wanted to make sure this is resolved on your end. thanks!