lib/transformers/query-param.schema.transformer.js
function transformIntoQueryParamSchema(processedSchema) {
  return _.transform(
    processedSchema.items.properties,
    (result, value, key) => {
      const parameter = Object.assign(
        {
          name: key
        },
        value,
        {
          type: Array.isArray(value.type) ? value.type[0] : value.type,
          required: !_.includes(value.type, "null")
        }
      );
      result.push(parameter);
    },
    []
  );
}
function transformIntoQueryParamSchema(processedSchema) {
  return _.transform(
    processedSchema.items.properties,
    (result, value, key) => {
      const parameter = Object.assign(
        {
          name: key
        },
        value,
        {
          type: Array.isArray(value.type) ? value.type[0] : value.type,
          required: !_.includes(value.type, "null")
        }
      );
      result.push(parameter);
    },
    []
  );
}
function transformIntoQueryParamSchema ( processedSchema ) { return _ . transform ( processedSchema . items . properties , ( result , value , key ) => { const parameter = Object . assign ( { name : key } , value , { type : Array . isArray ( value . type ) ? value . type [ 0 ] : value . type , required : ! _ . includes ( value . type , "null" ) } ) ; result . push ( parameter ) ; } , [ ] ) ; }
Transforms JSON-Schema to be usable as Swagger endpoint query param schema
@param {Object} processedSchema
@returns {*}
Transforms JSON - Schema to be usable as Swagger endpoint query param schema