typeForSchema(schema) {
    if (schema.$ref) {
      // Peek into the reference, if we're calling typeForSchema from the
      // allOf case below then we will need to know the destination type
      const ref = lookupReference(schema.$ref, this.root);
      return this.typeForSchema(ref.referenced);
    }

    if (schema.type === undefined) {
      if (schema.allOf && schema.allOf.length > 0) {
        // Try to infer type from allOf values
        const allTypes = schema.allOf.map(this.typeForSchema, this);
        const uniqueTypes = _.uniq(allTypes);

        if (uniqueTypes.length === 1) {
          return uniqueTypes[0];
        }
      }
    }

    return schema.type;
  }
/**
   * Retrieve the type from the schema
   * In the case where there is no provided type, the allOf types are matched.
   * @param {object} schema
   * @returns {string} type
   */
Retrieve the type from the schema
In the case where there is no provided type, the allOf types are matched.
@param {object} schema
@returns {string} type
Retrieve the type from the schema In the case where there is no provided type the allOf types are matched . @param { object } schema @returns { string } type
typeForSchema(schema) {
    if (schema.$ref) {
      const ref = lookupReference(schema.$ref, this.root);
      return this.typeForSchema(ref.referenced);
    }
    if (schema.type === undefined) {
      if (schema.allOf && schema.allOf.length > 0) {
        const allTypes = schema.allOf.map(this.typeForSchema, this);
        const uniqueTypes = _.uniq(allTypes);
        if (uniqueTypes.length === 1) {
          return uniqueTypes[0];
        }
      }
    }
    return schema.type;
  }
typeForSchema ( schema ) { if ( schema . $ref ) { const ref = lookupReference ( schema . $ref , this . root ) ; return this . typeForSchema ( ref . referenced ) ; } if ( schema . type === undefined ) { if ( schema . allOf && schema . allOf . length > 0 ) { const allTypes = schema . allOf . map ( this . typeForSchema , this ) ; const uniqueTypes = _ . uniq ( allTypes ) ; if ( uniqueTypes . length === 1 ) { return uniqueTypes [ 0 ] ; } } } return schema . type ; }
Retrieve the type from the schema
 In the case where there is no provided type, the allOf types are matched.
Retrieve the type from the schema In the case where there is no provided type the allOf types are matched .
// Peek into the reference, if we're calling typeForSchema from the // allOf case below then we will need to know the destination type // Try to infer type from allOf values