async function parseDocument(rawData) {
  try {
    return utils.unthrowableParseJson(rawData) || SwaggerParser.YAML.parse(rawData);
  } catch (err) {
    return null;
  }
}
async function parseDocument(rawData) {
  try {
    return utils.unthrowableParseJson(rawData) || SwaggerParser.YAML.parse(rawData);
  } catch (err) {
    return null;
  }
}
async function parseDocument ( rawData ) { try { return utils . unthrowableParseJson ( rawData ) || SwaggerParser . YAML . parse ( rawData ) ; } catch ( err ) { return null ; } }
Parse string data into swagger 2.0 object (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swagger-object)

@param {string} rawData

@returns {Object|null} Swagger 2.0 object
Parse string data into swagger 2 . 0 object ( https : // github . com / OAI / OpenAPI - Specification / blob / master / versions / 2 . 0 . md#swagger - object )
Parses a Swagger document