Giter Site home page Giter Site logo

Comments (5)

ms-AlexDavis avatar ms-AlexDavis commented on May 22, 2024

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.

from msrc-microsoft-security-updates-api.

ms-AlexDavis avatar ms-AlexDavis commented on May 22, 2024

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?

from msrc-microsoft-security-updates-api.

jcoryatjr avatar jcoryatjr commented on May 22, 2024

@ms-AlexDavis I did exactly as you mentioned in your first response. That is what generated the error.
I just tried the older editor importing the following url:
https://github.com/Microsoft/MSRC-Microsoft-Security-Updates-API/blob/master/docs/swagger.json

and got the following error:

YAML Syntax Error
End of the stream or a document separator is expected at line 290, column 22:
Jump to line 289
Details
Object
yamlError: n(t,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString
level: 900
type: "YAML Syntax Error"
description: "End of the stream or a document separator is expected at line 290, column 22:
<!-- blob contrib key: blob_contributors:v21:4f00b4e7 ...
^"
lineNumber: 289

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.

from msrc-microsoft-security-updates-api.

jcoryatjr avatar jcoryatjr commented on May 22, 2024

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.

from msrc-microsoft-security-updates-api.

ms-AlexDavis avatar ms-AlexDavis commented on May 22, 2024

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,

from msrc-microsoft-security-updates-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.