Skip to content

Validating yaml which is stored as an object #38

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

Closed
bhar629 opened this issue Feb 9, 2016 · 1 comment
Closed

Validating yaml which is stored as an object #38

bhar629 opened this issue Feb 9, 2016 · 1 comment

Comments

@bhar629
Copy link

bhar629 commented Feb 9, 2016

Is the swagger parser capable of parsing the swagger yaml/json stored as an object in node.js?
Can you give me an example?

@JamesMessinger
Copy link
Member

Yep. All of the methods, such as validate(), dereference(), etc, take a string or an object as the first parameter. Most of the examples show a string (URL or file path) being passed, but you can just as easily pass an object.

Here's an example: https://tonicdev.com/bigstickcarpet/swagger-parser-with-object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants