04-20-2017 08:42 PM
I have an API that contains a reference to a definition in a domain that itself contains references to other definitions in that same domain. E.g.:
The Bar definition in the Bar domain refers to several other definitions in the Bar domain, and the Bar domain validates.
Now, for some reason, when I first load the API definition, the UI complains about some of the references in the Bar definition and marks my API definition as invalid. There's a workaround, though: if I just cut and repaste the $ref line above, those errors go away and the API definition validates. But if I reload the page, there the errors are again.
We use SH to communicate w/ outside partners, and even if I could explain the workaround to them, not all of them can edit the definitions. So all they see is this mass of errors when they load the page, which is totally unacceptable. Can you please tell me how to fix or avoid this?
The API in question is private, so I don't feel like sharing the link here, but for staff users, my SH username is 'jboyd'. Thanks!
Solved! Go to Solution.
04-20-2017 08:50 PM
Domains with self-references are certainly supported, so there must be something that the editor isn't understanding. Could you please add "swaggerhub-support" as a collaborator to your API and your domain so we can look into it?
04-20-2017 08:59 PM
Got it, I'm looking. BTW a simple version of domains referencing themselves can be seen here:
I have a feeling something else is tripping up the resolver. I'm looking into it...
04-20-2017 09:03 PM
Oh, I believe it generally works because 1) the UI shows things correctly as long as I hide the errors, and 2) the workaround works. I've seen this a couple times before and just shrugged it off, but with half a dozen errors showing I figured it was time to get y'all involved.
Thanks for the quick investigation!
04-26-2017 11:17 AM
I'm Fernando Mattos, Product Manager for SwaggerHub. Just to let you know that we pushed a hotfix today to resolve the problem above. We've verified it against your API and we cannot reproduce the problem anymore.
Please let us know if this solves the issue and if you need any further help.