Forum Discussion
What happens if you type the $ref: and then press control-space ?
This should show you a pick-box list of all the domain anchors that you have access to. Remember, you must have at lease Consumer level access to the domain in order to consume components from it.
The hyphen in your url should not be an issue.
If you continue to see this error, please open a Support case and out amazing support team will get on it. Include you Sales rep in cc on the ticket.
When I type $ref: and pres control-space i shows me the list of objects from domain and, then put a root to the object as $ref value.
Then it indicates an error (red square with "error could not resolve reference: undefined undefined") in front of the $ref line inmediately.
- DEF19634 years agoOccasional Contributor
- mhiggins4 years agoStaff
Ok, so you can "see" the Domain and SwaggerHub can auto-complete it.
Domain auto-complete is context sensitive, so it will only show you anchors that make sense in the context of where you are in the API (e.g. Parameters, Schema, etc.).
If you have tried both a full browser refresh and a logout and login, then here are my ideas:
1. Copy paste the component yaml from the Domain directly into the API and see if there are any errors
2. Restart SwaggerHub (requires admin ui access)
3. If these don't work, then please open a Support Case - put your Sales rep and me (micheal.higgins@smartbear.com) on copy of the support ticket.
To open a Support Case: https://support.smartbear.com/open-ticket/
- mhiggins4 years agoStaff
also: please try moving the ErrorModel to Components > Responses.
- DEF19634 years agoOccasional Contributor
The previos example was Swagger 2.0. no components.responses then.
I created a new domain in Openapi 3.0 and new API, tryint to reference response. The same result:
Domain:
####################
# Common responses
####################
responses:
GeneralError:
description: An error occurred
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel':Following you advice I have generated support ticket.
Related Content
- 4 years ago
- 4 years ago
Recent Discussions
- 8 days ago
- 2 months ago