Get settings schema
@param {object} schemaJson default settings schema
@param {object} curSettings current settings
@return {object} schema json or Promise
541101
async function onUIGetSettingsSchema(schemaJson, curSettings) {
    const readJSON = (basename) => {
        return JSON.parse(pi.pluginfs.readFileSync(basename).toString());
    };
    const schemaDefaultJson = readJSON('settings_schema_default.json');
    const schemaWlanJson = readJSON('settings_schema_wlan.json');
    if (!curSettings) curSettings
        = {webapi:{api_filter:{}},mqtt:{},network:{}};

    let setProp = {};// schema_json.properties;
    // API Filters settings are not implemented yet
    let filters = localStorage.getItem('API_FILTERS'
        ,{clientA:{filter:''},clientB:{filter:''},clientC:{filter:''}}); // Sample clients
    for( let clname in filters ){
        setProp[clname] = {
            title: clname+' client allowed path in regexp',
            type: 'string',
        };
        let filter = filters[clname].filter;

        if (filter != null) {
            setProp[clname].default = filter;
        }

        curSettings.webapi.api_filter[clname] = filter;
    }
    schemaJson.properties.webapi.properties.api_filter.properties = setProp;


    return listNetInterfaces().then(([interfaces, bWlanExist]) => {
        let curInterf;
        let curAp;
        if (typeof curSettings.network.interfaces == 'object') {
            for (let k of Object.keys(curSettings.network.interfaces)) {
                curInterf = k;
                if (k.indexOf('wlan')==0) {
                    curAp = curSettings.network.interfaces[k].apname;
                }
            }
        }

        // Previously set interface does not exist any more..
        if (curInterf != undefined && interfaces.indexOf(curInterf)<0) {
            log(`Previously set interface ${curInterf} does not exist now`);
            interfaces.unshift(curInterf);
        }

        interfaces.forEach((interf)=>{
            let prop = {};

            prop[interf] = (interf.indexOf('wlan')==0 ?
                schemaWlanJson : schemaDefaultJson);

            schemaJson.properties.network.properties.interfaces.oneOf.push({
                title: interf,
                type: 'object',
                additionalProperties: false,
                properties: prop,
            });
        });

        if (schemaJson.properties.network.properties.interfaces.oneOf.length==0) {
            throw new Error({error: 'No network available.'});
        }

        if (!bWlanExist) {
            return schemaJson;
        }

        return scanWiFi().then((aps) => {
            const enumap = schemaWlanJson.properties.apname.enum;
            for (const ap of aps) {
                enumap.push(ap);
            }
            if (enumap.length == 0) {
                log('No valid Wifi IP found.');
            }
            if (curAp !=undefined && enumap.indexOf(curAp)<0) {
                log(`Previously set AP ${curAp} is invisible now`);
                enumap.unshift(curAp);
            }
            return schemaJson;
        });
    }).catch((err) => {
        //console.error('err:'+JSON.stringify(err));
        delete schemaJson.properties.network.properties.interfaces;
        delete schemaJson.properties.network.properties.detail;
        delete schemaJson.properties.network.properties.root_passwd;
        /* eslint-disable max-len */
        schemaJson.properties.network.properties.network_settings = {
            type: 'object',
            description:
`nmcli should be installed to setup network configuration. Execute

"$ sudo apt-get install network-manager"

or

"$ sudo yum install NetworkManager"

Also, you need to free your network devices from existing framework by, for example, edit /etc/network/interfaces to contain only two lines:

"auto lo",
"iface lo inet loopback"

and reboot. In addition, you may want to uninstall dhcpcd5 (if exist) by

"$ sudo apt-get purge dhcpcd5"`,
        };
        /* eslint-enable max-len */
        return schemaJson;
    });
}
258658
function  getQueryTableSchema(tables, cb) {
	var  tableSchema = {};

	async.each(tables, function(t, callback) {
		var  tbName = t.name;
		schemaTool.getSchema(tbName, function(err, schema) {
			if (!err)  {
				tableSchema[tbName] = schema;
				if (t.alias)
					tableSchema[t.alias] = schema;
			}
			callback(err);
		});
	},
	function(err) {
		cb(err, tableSchema);
	});
}
1088295
public static function getJsonSchema($deprecated=null)
    {
        $class = get_called_class();

        /**
         * Look in local cache
         */
        if (array_key_exists($class, self::$jsonSchema)) {
            return self::$jsonSchema[$class];
        }

        /**
         * If not in local cache, we ask to the adaptor
         */
        $adapter = StoreManager::getAdapter($class);
        if ($adapter && ($adapter instanceof CachedJsonSchemaInterface )) {
            $schema = $adapter->getJsonSchema($class);
            if ($schema) {
                if (!array_key_exists($class, self::$jsonSchema)) {
                    self::$jsonSchema[$class] = $schema;
                }

                return $schema;
            }
        }

        $annotationReader = StoreManager::getAnnotationReader();
        $definition = array();

        $reflect = new \ReflectionClass($class);
        $props = $reflect->getProperties(\ReflectionProperty::IS_PROTECTED);

        foreach ($props as $prop) {
            $property = $prop->getName();
            $annotations = $annotationReader->getPropertyAnnotations($prop);
            $definition[$property]  = array();
            $definition[$property]['storeClasses'] = array();
            $definition[$property]['allowedId'] = array();
            $definition[$property]['validationConstraints'] = array();

            foreach ($annotations as $annotation) {
                if ($annotation instanceof Store\Property) {
                    $definition[$property]['description'] = $annotation->description;
                    $definition[$property]['keepIfNull'] = $annotation->keepIfNull;
                    $definition[$property]['private'] = $annotation->private;

                    if (substr($property,0,1) == "_") {
                        $definition[$property]['internal'] = true;
                    } else {
                        $definition[$property]['internal'] = false;
                    }

                    $definition[$property]['alias'] = $annotation->alias;
                    $definition[$property]['recommended'] = $annotation->recommended;
                } elseif ($annotation instanceof Store\StoreClass) {
                    $definition[$property]['storeClasses'] = (array) $annotation->value;
                } elseif ($annotation instanceof Assert\Type) {
                    $definition[$property]['type'] = $annotation->type;
                } elseif ($annotation instanceof Constraint) {
                    $definition[$property]['validationConstraints'][] = static::getClassName($annotation);
                } elseif ($annotation instanceof Store\AllowedId) {
                    $definition[$property]['allowedId'] = (array) $annotation->value;
                }

                if ($adapter) {
                    $newDef = $adapter->extendStoreSchema($annotation, $property, $definition);
                    if (is_array($newDef)) {
                        $definition[$property] = array_merge($newDef, $definition[$property]);
                    }
                }
            }
        }

        /**
         * Check the schema integrity.
         * When close to relase, should move this to a store
         */
        $error = StoreException::STORE_003;
        foreach ($definition as $prop => $propertyDefinition) {
            //Remove added properties that are not store property.
            if (!isset($propertyDefinition['description'])) {
                unset($definition[$prop]);
                continue;
            }

            if (!isset($propertyDefinition['type']))
                //throw new \Exception ("$class->$prop must have Assert\Type(\"type\") defined.");
                throw new StoreException("$class->$prop must have Assert\Type(\"type\") defined.", $error);
            if (!$propertyDefinition['type'])
                throw new StoreException("$class->$prop must have Assert\Type(\"type\") defined.", $error);
        }

        self::$jsonSchema[$class] = array();
        self::$jsonSchema[$class]['definition'] = $definition;
        self::$jsonSchema[$class]['configuration'] = array();
        self::$jsonSchema[$class]['configuration']['_className'] = $class;

        if ($adapter && $adapter instanceof CachedJsonSchemaInterface) {
            $adapter->cacheJsonSchema($class, self::$jsonSchema[$class]);
        }

        return self::$jsonSchema[$class];
    }
1123419
function load(schema) {
  var obj;
  if (typeof schema == 'string' && schema !== 'null') {
    try {
      obj = JSON.parse(schema);
    } catch (err) {
      // No file loading here.
    }
  }
  if (obj === undefined) {
    obj = schema;
  }
  return obj;
}
209711
function getSchema(connection) {
  const schemaSql = getPrestoSchemaSql(
    connection.prestoCatalog,
    connection.prestoSchema
  );
  return runQuery(schemaSql, connection).then(queryResult =>
    formatSchemaQueryResults(queryResult)
  );
}
201816
function convertLegacyPluginSchema(schema) {
      var result = {properties: {}, type: 'object'};
      Object.keys(schema.fields).forEach(function (propertyName) {
        result.properties[propertyName] = {
          type: schema.fields[propertyName].type
        };
        if (schema.fields[propertyName].enum) {
          result.properties[propertyName].enum = schema.fields[propertyName].enum;
        }
        if (schema.fields[propertyName].hasOwnProperty('default')) {
          result.properties[propertyName].default = schema.fields[propertyName].default;
        }
        if (schema.fields[propertyName].hasOwnProperty('required')) {
          result.properties[propertyName].required = schema.fields[propertyName].required;
        }
        if (result.properties[propertyName].type === 'table') {
          result.properties[propertyName].type = 'object';
          if (schema.fields[propertyName].schema.flexible) {
            result.properties[propertyName].additionalProperties = convertLegacyPluginSchema(schema.fields[propertyName].schema);
          } else {
            result.properties[propertyName].properties = convertLegacyPluginSchema(schema.fields[propertyName].schema).properties;
          }
        }

        if (result.properties[propertyName].type === 'array') {
          // by default, assuming the elements of a property of type array is a string, since it's
          // the case most of the time, and Kong doesn't provide the types of the elements of array properties :(
          result.properties[propertyName].items = {type: 'string'}
        }

      });
      return result;
    }
1369399
def get_settings_json(self):
        
        return {
            'scanner': None if self.scanner is None else self.scanner.save(),
            'parser': None if self.parser is None else self.parser.save()
        }
306241
function(schemaName, schemaJSON) {
  if (typeof schemaName != 'string' || typeof schemaJSON != 'object') {
    console.error('redblade@schema parameter error')
    return
  }

  SCHEMA[schemaName] = initSchema(schemaJSON, schemaName)
}
501790
public Json jsonSchema(String jsonSchema) {
		Preconditions.checkNotNull(jsonSchema);
		this.jsonSchema = jsonSchema;
		this.schema = null;
		this.deriveSchema = null;
		return this;
	}
383692
function (schema) {
		if (!schema.key || schema.key === 'base' || !Array.isArray(schema.fields)) {
			return null;
			// throw exception?
		}
		// store it for later reference
		Schemas[schema.key] = schema;
		// add this schema to the NPC object so we can use it as a constructor
		// this could overwrite is that ok?
		const Base = NPC[schema.key] = function () {
			// in case we add something to NPC constructor that we need to call?
			// NPC.Base.call(this);
		};
		Base.prototype = new NPC.Base();
		Base.prototype.constructor = Base;
		Base.prototype.schema = schema.key;
		Base.prototype.fields = [];
		Base.prototype.helpers = {};
		
		// initialize schema properties...
		schema.fields.forEach((f) => {
			let default_ = null;
			switch (f.type) {
				case 'string':
				case 'text':
					default_ = '';
					break;
				case 'array':
					default_ = [];
					break;
				case 'number':
				case 'modifier':
					default_ = 0;
					break;
				case undefined:
					// ?
					break;
			}
			Base.prototype.fields[f.key] = default_;
		});
		
		if (!schema.helpers || typeof schema.helpers !== 'object') { return; }
		const helpers = Object.keys(schema.helpers);
		helpers.forEach((h) => {
			// if (typeof schema.helpers[h] === 'function') {
			//	Base.prototype.helpers[h] = schema.helpers[h];
			// }
			// create a function from the array
			Base.prototype.helpers[h] = new Function(...schema.helpers[h]);
		});
	}
249747
function(text, settings) {
            var that = this;
            settings = settings || {};

            var getTypeId = settings.getTypeId || function(object) { return that.getTypeId(object); };
            var getConstructor = settings.getConstructor || function(id) { return that.typeMap[id]; };
            var reviver = settings.reviver || function(key, value) { return that.reviver(key, value, getTypeId, getConstructor); };

            return JSON.parse(text, reviver);
        }
1080414
function addAnother(schema) {

    var config = {
        properties: {
            another: {
                description: 'Add another collection? (y/n)'.magenta
            }
        }
    };

    prompt.start();
    prompt.message = ' > ';
    prompt.delimiter = '';

    return new Promise(function(resolve, reject) {
        prompt.get(config, function(err, result) {

            if (err) return reject(err);

            switch (result.another.toLowerCase()) {
                case 'n':
                    return resolve({
                        answer: false,
                        schema: schema
                    });
                case 'y':
                default:
                    return resolve({
                        answer: true,
                        schema: schema
                    });
            }
        });
    });
}
95526
function JsonSchemaLib (config, plugins) {
  if (plugins === undefined && Array.isArray(config)) {
    plugins = config;
    config = undefined;
  }

  /**
   * The configuration for this instance of {@link JsonSchemaLib}.
   *
   * @type {Config}
   */
  this.config = new Config(config);

  /**
   * The plugins that have been added to this instance of {@link JsonSchemaLib}
   *
   * @type {object[]}
   */
  this.plugins = new PluginManager(plugins);
}
814665
def layout_json_schema(self):
        """"""
        if self._layout_json_schema is None and self.layout_json_schema_file is not None:
            if os.path.isfile(self.layout_json_schema_file):
                with open(self.layout_json_schema_file) as fh:
                    self._layout_json_schema = json.load(fh)
        return self._layout_json_schema
714284
function _getMappedFields(schema) {
    if (schema === undefined ||
        schema === null) {
        return;
    }
    if (schema instanceof Array) {
        return schema
            .reduce(function (memo, key) {
                var mappedField = _getMappedFields(key);
                if (mappedField !== undefined) {
                    memo = memo.concat(mappedField);
                }
                return memo;
            }, []);
    }
    if (typeof schema === 'object') {
        return Object
            .keys(schema)
            .reduce(function (memo, key) {
                var mappedField = _getMappedFields(schema[key]);
                if (mappedField !== undefined) {
                    memo = memo.concat(mappedField);
                }
                return memo;
            }, []);
    }
    if (typeof schema === 'string' ||
        typeof schema === 'number') {
        return schema;
    }
}
382771
function Model(schema, config = {}) {
  let relationshipMap = {};
  let jsonSchema = schema.jsonSchema.withoutRefs;

  const {
    tableName,
    timestamps = false,
    validateOnInit = false,
    idColumn: idColumnInput,
    deletedAtColumn = null,
    createdAtColumn,
    updatedAtColumn,
    modelName,
    autoRestEnabled
  } = config;

  Object.keys(schema._formatted).forEach((key) => {
    if ([Types.Models, Types.Model].includes(schema._formatted[key].type)) {
      relationshipMap[key] = schema._formatted[key];
    }
  });

  const ajv = new AJV({
    allErrors: true,
    coerceTypes: true
  });

  /**
   * @prop {knex.Knex} knex A context specific knex instance
   * 
   * @class ModelInstance
   */
  return class extends Strategy {
    /**
     * Creates an instance of ModelInstance.
     * @param {object} props 
     * @memberof ModelInstance
     */
    constructor(props) {
      super();

      let validate = ajv.compile(jsonSchema);
      let result = validate(props);

      if (!result && validateOnInit) {
        throw validate.errors;
      }

      this._setProps(props);

      // default to not-persisted
      this._persisted = false;
      this._fetching = false;
      this._relationships = {};
    }

    static formatRelationship({
      relatedModel,
      foreignField,
      localField,
      type,
      through,
      throughLocalField,
      throughForeignField
    }, attr) {
      if (!relatedModel) {
        let formattedRelatedAttr = attr[0].toUpperCase() + attr.slice(1);
        relatedModel = inflect.singular(formattedRelatedAttr);
      }

      if (is(String)(relatedModel)) relatedModel = this.registry[relatedModel];

      const many = type === Types.Models;
      
      localField = localField || (many ? this.idColumn : this.guessColumnName(relatedModel.tableName, relatedModel.idColumn));

      foreignField = foreignField || (many ? this.guessColumnName(this.tableName, this.idColumn) : relatedModel.idColumn);

      if (through) {
        if (!is(String)(through)) through = this.guessTableName(this.tableName, relatedModel.tableName, true);
 
        throughLocalField = throughLocalField || this.guessColumnName(this.tableName, this.idColumn);
        throughForeignField = throughForeignField || this.guessColumnName(relatedModel.tableName, relatedModel.idColumn);
      }

      return {
        relatedModel,
        foreignField,
        localField,
        type,
        through,
        throughLocalField,
        throughForeignField,
        many
      };
    }

    static get tableName() {
      return tableName || inflect.plural(this.modelName);
    }

    get tableName() {
      return this.constructor.tableName;
    }

    static get relationshipMap() {
      return relationshipMap;
    }

    static get schema() {
      return schema;
    }

    static get autoRestEnabled() {
      return autoRestEnabled;
    }

    static get toSwagger() {
      return schema.jsonSchema.withRefs;
    }

    static get modelName() {
      return modelName || this.name;
    }

    static get idColumn() {
      return idColumnInput || this.guessIdColumn();
    }

    get idColumn() {
      return this.constructor.idColumn;
    }

    static get _softDelete() {
      return isString(deletedAtColumn);
    }
    /**
     * @param {object} registry
     * 
     * @private
     * @static
     * @memberof ModelInstance
     */
    static attachToRegistry(registry) {
      registry[this.modelName] = this;
      this.registry = registry;
    }

    /**
     * Returns a query with configuration parameters applied
     * 
     * @static
     * @returns Knex.Knex
     * @memberof ModelInstance
     */
    static getQuery() {
      let query = this.knex(this.tableName);
      if (this._softDelete) {
        query.whereNull(deletedAtColumn);
      }
      return query;
    }

    static create(props) {
      let newInstance = new this(props);
      return newInstance.save();
    }

    static async find(queryInput, {fields = '*', withRelated = []} = {}) {
      let query = this.getQuery().select(fields);
      
      if (isFunction(queryInput)) {
        queryInput(query);
      } else if (isObject(queryInput)) {
        query.where(queryInput);
      }

      let foundRows = (await query).map(row => {
        row = new this(row);
        row._persisted = true;
        return row;
      });

      for (let i = 0; i < withRelated.length; i++) {
        await this._handleWithRelated(foundRows, withRelated[i]);
      }

      return foundRows;
    }

    static async _handleWithRelated(instances, withRelated) {
      let relatedTree = withRelated.split('.').filter(val => val);

      if (instances.length > 0) {
        let [relatedAttr] = relatedTree;

        if (!relationshipMap[relatedAttr]) throw new ReferenceError('No such attribute ' + relatedAttr);
        
        let relDef = Object.assign({ instances }, this.formatRelationship(relationshipMap[relatedAttr], relatedAttr));

        let { relatedModel } = relDef;

        let results;

        if (!instances[0]._relationships[relatedAttr]) {
          results = await this._pullRelated(relDef, true);
          instances.forEach(instance => instance._relationships[relatedAttr] = results);
        } else {
          results = instances[0]._relationships[relatedAttr];
        }
        let relatedRelDef;

        Object.keys(relatedModel.relationshipMap).forEach(relName => {
          let currentRelDef = relatedModel.formatRelationship(relatedModel.relationshipMap[relName], relName);
          if (currentRelDef.foreignField === relDef.localField ||
            (
              currentRelDef.through && relDef.through &&
              currentRelDef.through === relDef.through &&
              currentRelDef.throughForeignField === relDef.throughLocalField &&
              currentRelDef.throughLocalField === relDef.throughForeignField
            )
            ) {
            relatedRelDef = Object.assign({ relName }, currentRelDef);
          }
        });

        instances.forEach(instance => {
          instance[relatedAttr] = results.map[instance[relDef.localField]];
          if (!instance[relatedAttr] && (relDef.type === Types.Models)) {
            instance[relatedAttr] = [];
          }
          if (relatedRelDef) {
            results.array.forEach(result => {
              if (!relatedRelDef.through && (result[relatedRelDef.localField] === instance[relDef.localField])) {
                if (relatedRelDef.type === Types.Models) {
                  (result[relatedRelDef.relName] = result[relatedRelDef.relName] || []).push(instance);
                  result;
                } else {
                  result[relatedRelDef.relName] = instance;
                }
              }
            });
          }
        });
        if (relatedTree.length > 1) {
          await relatedModel._handleWithRelated(results.array, relatedTree.slice(1).join('.'));
        }
      } else {
        return instances;
      }
    }

    static async findById(id, {fields = '*', withRelated = []} = {}) {
      let [props] = await this.getQuery().where(this.idColumn, id).select(fields);
      if (props) {
        let foundRecord = new this(props);
        for (let i = 0; i < withRelated.length; i++) {
          await this._handleWithRelated([foundRecord], withRelated[i]);
        }
        foundRecord._persisted = true;
        return foundRecord;
      } else {
        return null;
      }
    }

    static update(query, updates) {
      let updateQuery = this.getQuery();
      if (isFunction(query)) {
        query(updateQuery);
      } else {
        updateQuery.where(query);
      }

      return updateQuery.update(updates, '*');
    }

    static async restore(id) {
      if (!this._softDelete) {
        throw new ReferenceError(this.modelName + ' does not support soft deletes');
      }
      await this.knex(this.tableName)
        .where(this.idColumn, id)
        .update(deletedAtColumn, null);
    }

    static async remove(queryInput) {
      let results = await this.find(queryInput);
      return Promise.all(results.map(async result => result.destroy()));
    }

    get changes() {
      return clone(this._changes);
    }

    get knex() {
      return this.constructor.knex;
    }

    get query() {
      return this.constructor.getQuery();
    }

    async save(options = defaultSaveOptions) {

      if (options.validate && !this.validate()) {
        throw this.errors;
      }

      if (timestamps) {
        if (!this._persisted) {
          this._props[createdAtColumn || this.constructor.guessColumnName('created', 'at')] = new Date();
        }

        this._props[updatedAtColumn || this.constructor.guessColumnName('updated', 'at')] = new Date();
      }

      if (this._persisted) {
        await this.knex(this.tableName)
          .where(this.idColumn, this[this.idColumn])
          .update(this._changes);

      } else {
        let results = await this.knex(this.tableName).insert(this._props).returning('id');
        this._props[this.idColumn] = results[0];
        this._persisted = true;
      }
      this._setProps(this._props);
      return this;
    }

    reset() {
      this._setProps(this._original);
    }

    destroy() {
      let deleteQuery = this.query
        .where(this.idColumn, this[this.idColumn]);
      if (this.constructor._softDelete) {
        return deleteQuery.update(deletedAtColumn, new Date);
      } else {
        return deleteQuery.del();
      }
    }

    _setProps(props) {
      this._original = clone(props);
      this._props = props;
      this._changes = {};

      for (let key in props) {
        this.__defineGetter__(key, () => this._props[key]);
        this.__defineSetter__(key, (value) => {
          this._props[key] = value;

          this._changes[key] = value;
        });
      }
    }

    toJSON(ignoredRecord) {
      let relMap = Object.keys(relationshipMap).reduce((map, relName) => {
        if (this[relName] && (this[relName] !== ignoredRecord)) {
          map[relName] = is(Array)(this[relName]) ?
            this[relName].filter(rec => rec !== ignoredRecord).map(rec => rec.toJSON(this)) :
            this[relName].toJSON(this);
        }
        return map;
      }, {});
      return Object.assign(relMap, this._props);
    }

    validate() {
      let valid = ajv.validate(jsonSchema, this);
      this.errors = ajv.errors;
      return valid;
    }

    async pullRelated(key) {
      let relDef = relationshipMap[key.tableName || key];
      if (relDef) {
        relDef = this.constructor.formatRelationship(relDef, key);
        return this[key] = (await this.constructor._pullRelated(Object.assign({ instances: this }, relDef))).array;
      } else {
        throw new ReferenceError('No such relationship: ' + key);
      }
    }

    static async _pullRelated(relDef) {
      const {
        relatedModel,
        foreignField,
        localField,
        through,
        throughLocalField,
        throughForeignField,
        many
      } = this.formatRelationship(relDef);
      const { instances } = relDef;
      let relatedValue = is(Array)(instances) ? pluck(localField)(instances) : [instances[localField]];

      let relatedQuery;

      switch (relatedValue.length) {
      case 1:
        relatedQuery = query => {
          query.where(foreignField, relatedValue[0]);
          return query;
        };
        break;
      default:
        relatedQuery = query => {
          query.whereIn(foreignField, relatedValue);
          return query;
        };
      }

      if (through) {
        relatedQuery = query => {
          query.join(through, `${relatedModel.tableName}.${relatedModel.idColumn}`, `${through}.${throughForeignField}`);

          query.whereIn(`${throughLocalField}`, relatedValue);

          return query;
        };
      }

      let results = await relatedModel.find(relatedQuery, {}, true);

      let map = {};
      results.forEach(result => {
        const mapKey = through ? result[throughLocalField] : result[foreignField];
        if (many) {
          (map[mapKey] = map[mapKey] || []).push(result);
        } else {
          map[mapKey] = result;
        }
      });
      return {map, array: results};
    }
  };
}
467434
function mixed_jsonSchema(name) {
  var result = __describe(name, this.options.type);
  __processOptions(result, this.options);
  return result;
}