Not able to reference a domain
I am a bit confused. Not sure if it is something I am doing wrong, or something wrong with SwaggerHub but I am having an issue referencing a domain.
Link to API: https://app.swaggerhub.com/apis/bosch/dx-developer-account-check/1.0#
Link to domain: https://app.swaggerhub.com/domains/bosch/DX-UserModel/1#/
I am unsure which URL I need to use to reference this domain in my API. In my domain, I have a user object within a definitions namespace. However, when I try to reference it using https://app.swaggerhub.com/domains/bosch/DX-UserModel/1#/definitions/User, I get a syntax error saying: "Could not resolve reference: Could not resolve pointer: /responses/User does not exist in document", even though I am able to access the domain using the Jump To popup.
I do not get this error when I remove the '#' from the URL (https://app.swaggerhub.com/domains/bosch/DX-UserModel/1/definitions/Use), but when I make a call, I am not seeing the the data in the UI responses section.
Which URL should I be using to reference the domain?
https://app.swaggerhub.com/domains/bosch/DX-UserModel/1#/definitions/User
or
https://app.swaggerhub.com/domains/bosch/DX-UserModel/1/definitions/Use
And what else should I be doing to make this work?
Sometime, one character breaks everything. Took me a long time to figure it out as well.
When referencing domains, make sure the beginning of the referenced URL is api.swaggerhub.com and not app.swaggerhub.com.
So, in your case, the URL should be:
https://api.swaggerhub.com/domains/bosch/DX-UserModel/1#/definitions/User
The difference being giving the URL of the application, or giving the URL of the Domain itself. This is where our auto-complete feature comes in handy. It will automatically populate your reference options with relevant definitions, whether from the same file, or from Domains within your organization.
You can find all sorts of useful keyboard shortcuts (including the auto-complete) at https://app.swaggerhub.com/help/ui/editor.