How to use the swagger-parser.YAML function in swagger-parser

To help you get started, we’ve selected a few swagger-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kong / insomnia / packages / insomnia-importers / src / importers / openapi3.js View on Github external
async function parseDocument(rawData) {
  try {
    return utils.unthrowableParseJson(rawData) || SwaggerParser.YAML.parse(rawData);
  } catch (err) {
    return null;
  }
}
github Kong / insomnia / packages / insomnia-importers / src / importers / swagger2.js View on Github external
async function parseDocument(rawData) {
  try {
    return utils.unthrowableParseJson(rawData) || SwaggerParser.YAML.parse(rawData);
  } catch (err) {
    return null;
  }
}