code: function (value, modelsToIgnore) {
      modelsToIgnore = modelsToIgnore || {};
  
      modelsToIgnore[value.name] = value;
  
      // Response support
      if (value.examples && _.isPlainObject(value.examples) && value.examples['application/json']) {
        value.definition.example = value.examples['application/json'];
  
        if (_.isString(value.definition.example)) {
          value.definition.example = jsyaml.safeLoad(value.definition.example);
        }
      } else if (!value.definition.example) {
        value.definition.example = value.examples;
      }
  
      return schemaToJSON(value.definition, value.models, modelsToIgnore, value.modelPropertyMacro);
    }
docs: copy-pasted from swagger-js