resolveValueOfParameter = (context, param,
    { schemaFormat = SCHEMA_FORMATS.DEFAULT, isResponseSchema = false } = {}
  ) => {
    if (!param || !param.hasOwnProperty('schema')) {
      return '';
    }

    const { indentCharacter } = context.computedOptions,
      resolvedSchema = resolveSchema(context, param.schema, { isResponseSchema }),
      { parametersResolution } = context.computedOptions,
      shouldGenerateFromExample = parametersResolution === 'example',
      hasExample = param.example !== undefined ||
        param.schema.example !== undefined ||
        param.examples !== undefined ||
        param.schema.examples !== undefined;

    if (shouldGenerateFromExample && hasExample) {
      /**
       * Here it could be example or examples (plural)
       * For examples, we'll pick the first example
       */
      let example;

      if (param.example !== undefined) {
        example = param.example;
      }
      else if (param.schema.example !== undefined) {
        example = _.has(param.schema.example, 'value') ? param.schema.example.value : param.schema.example;
      }
      else {
        example = getExampleData(context, param.examples || param.schema.examples);
      }

      return example;
    }

    schemaFaker.option({
      useExamplesValue: true
    });

    if (resolvedSchema.properties) {
      // If any property exists with format:binary (and type: string) schemaFaker crashes
      // we just delete based on format=binary
      for (const prop in resolvedSchema.properties) {
        if (resolvedSchema.properties.hasOwnProperty(prop)) {
          if (
            resolvedSchema.properties[prop].format === 'byte' ||
            resolvedSchema.properties[prop].format === 'decimal'
          ) {
            delete resolvedSchema.properties[prop].format;
          }
        }
      }
    }

    try {
      if (schemaFormat === SCHEMA_FORMATS.XML) {
        return xmlFaker(null, resolvedSchema, indentCharacter, parametersResolution);
      }

      // for JSON, the indentCharacter will be applied in the JSON.stringify step later on
      return fakeSchema(context, resolvedSchema, shouldGenerateFromExample);
    }
    catch (e) {
      console.warn(
        'Error faking a schema. Not faking this schema. Schema:', resolvedSchema,
        'Error', e
      );

      return '';
    }
  }
Resolve value of a given parameter

@param {Object} context - Required context from related SchemaPack function
@param {Object} param - Parameter that is to be resolved from schema
@param {Object} options - Addition options
@param {String} options.schemaFormat - Corresponding schema format (can be one of xml/default)
@param {Boolean} options.isResponseSchema - Whether schema is from response or not
@returns {*} Value of the parameter