code: function convertFileType (data) {
    data['type'] = 'string'
    data['media'] = { 'binaryEncoding': 'binary' }
    if (data.fileTypes) {
      data['media']['anyOf'] = []
      data.fileTypes.forEach(function (el) {
        data['media']['anyOf'].push({ 'mediaType': el })
      })
      delete data.fileTypes
    }
    return data
  }
docs: Change RAML `file` type to proper JSON type.
  
  @param  {Object} data
  @returns  {Object}