-
Notifications
You must be signed in to change notification settings - Fork 112
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
Swagger JSON fails to load #6
Comments
Hi jcoryatjr, I'm unable to reproduce the error you are referring to. You can download the yaml or JSON file from this projects docs directory and then import it on http://editor.swagger.io/#!/ If you wish to use the swagger UI, (A demo can be found at http://petstore.swagger.io/) you can paste in the URL from github in the top right. If you do this, make sure you use the raw link. (for instance, https://raw.githubusercontent.com/Microsoft/MSRC-Microsoft-Security-Updates-API/master/docs/swagger.yaml ). Can you tell me if the swagger fails to validate on either of those sites for you? You should expect there to be a warning on the yaml (there are two response definitions, one for xml, one for json... you will get a warning that one isn't being used). and two warnings in the json (the one above, plus a warning that there is an unknown JSON tag for a comment). Both of these should be there, and won't cause the swagger to not validate. |
I have identified an issue which might be the source of your error message. Swagger just released a new editor which does not validate our swagger document. The error message was different than yours however. Can you check http://editor2.swagger.io/ (which is the old editor) to see if your error persists? |
@ms-AlexDavis I did exactly as you mentioned in your first response. That is what generated the error. and got the following error: YAML Syntax Error I am behind a corporate firewall, would that have an effect on using the swagger UI? I did download and run the client version and came up with the same errors as initially mentioned. |
What I was able to do is to view the swagger definition as raw, copy it to the buffer and paste it into the UI editor to get it to load successfully. Going to http://editor2.swagger.io/ and then importing a url supplying github url to the swagger definition continues to return the error. |
I assume it must be something on your corporate network. pasting the raw json url link into editor2 works for me the same as copy pasting the actual json. Im going to close the issue since you found a suitable work around, if you run into any more issues, feel free to open another issue, |
Following the directions, open the Swagger demo, place the link to the swagger definition (in this case JSON) and explore, causes an error to be thrown by the swagger app "Failed T Load Spec".
Details shows:
{"messages":["malformed or unreadable swagger supplied"],"schemaValidationMessages":[{"level":"error","domain":"validation","keyword":"type","message":"instance type (string) does not match any allowed primitive type (allowed: [\"object\"])","schema":{"loadingURI":"#","pointer":""},"instance":{"pointer":""}}]}
The text was updated successfully, but these errors were encountered: