-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error messages for diagnosis #113
Comments
@natke, yes this error message definitely should be improved. Actually, this error message comes from tool I use for reference resolving so most likely your spec has some unresolvable references. Try to validate your spec using Regarding |
Thanks for the quick reply. Is the tool you talking about: https://www.npmjs.com/package/json-schema-ref-parser? I ran the spec through the tool manually and it generated the resolved spec fine. But maybe I didn't exactly replicate the calls to this tool in the way that redoc is doing? Is it possible to summarize the API calls you are using? |
@natke, would be great if you're able to provide me with a minimal reproducible spec or the actual spec you are trying to visualize with ReDoc? |
Hi again, I did manage to get it working. I think the problem was that I was trying to serve a file. Once I served both my index.html and my spec over http it worked fine. I think that error message is not actually from the parser - it is from your code, but it looks like there is an unresolved promise somewhere in the call chain. Might be worth looking into, and adding some better diagnostics and tests. |
@natke, If you don't mind I will keep this issue open as it is not fixed: error messages sometimes are not clear |
No problem - just wanted to indicate that I didn't have any further issues |
@natke curious if I'm getting the same thing you were. What I was trying to do was run redoc with a local index.html and swagger file (i.e. just open them from the filesystem vs serving via HTTP). Is this what you were originally doing when you received the error? In my case I get a full error as:
The HTML had:
|
Yep, that's exactly what I saw |
This actually looks like a bug. Faced the same issue here doing the same thing.
Same file is properly validated on the online editor. It is also properly displayed from a local web server, which has been my workaround so far. |
@pupi1985 yes, I had a look at this and this is actually the issue. I will fix this but this is not on the next-to-do queue coz this can be workarounded by simply running webserver |
Will track this issue here: #149 Closing this as obsolete. |
When I try to render the documentation for my swagger.json spec, I get the following error:
Oops... ReDoc failed to render this spec
Unable to resolve $ref pointer
It's a rather large specification and probably has an error in it, but I need some more information to locate the error (if there is one). Is it possible to get access to some more information about the error?
I tried to run the demo locally but could not run the following step:
npm run jspm-install
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "jspm-install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! missing script: jspm-install
The text was updated successfully, but these errors were encountered: