src/dt2js.js
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
}
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
}
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 }
Change RAML `file` type to proper JSON type.

@param  {Object} data
@returns  {Object}
Change RAML file type to proper JSON type .