src/js2dt.js
function convertAdditionalProperties (data, additionalProperties) {
  if (additionalProperties !== undefined) {
    let val = data
    if (typeof additionalProperties === 'boolean') val = additionalProperties
    if (typeof additionalProperties === 'object' && Object.keys(additionalProperties).length === 0) val = true
    if (typeof additionalProperties === 'object' && Object.keys(additionalProperties).length > 0) {
      const type = additionalProperties.type
      data.properties['//'] = { type: type }
      val = false
    }
    data.additionalProperties = val
  }
  return data
}
function convertAdditionalProperties (data, additionalProperties) {
  if (additionalProperties !== undefined) {
    let val = data
    if (typeof additionalProperties === 'boolean') val = additionalProperties
    if (typeof additionalProperties === 'object' && Object.keys(additionalProperties).length === 0) val = true
    if (typeof additionalProperties === 'object' && Object.keys(additionalProperties).length > 0) {
      const type = additionalProperties.type
      data.properties['//'] = { type: type }
      val = false
    }
    data.additionalProperties = val
  }
  return data
}
function convertAdditionalProperties ( data , additionalProperties ) { if ( additionalProperties !== undefined ) { let val = data if ( typeof additionalProperties === 'boolean' ) val = additionalProperties if ( typeof additionalProperties === 'object' && Object . keys ( additionalProperties ) . length === 0 ) val = true if ( typeof additionalProperties === 'object' && Object . keys ( additionalProperties ) . length > 0 ) { const type = additionalProperties . type data . properties [ '//' ] = { type : type } val = false } data . additionalProperties = val } return data }
convert additionalProperties from jsonSchema to raml form

@param  {Object} data - current data
@param  {*} additionalProperties - potential additional properties
@returns  {Object} raml form
convert additionalProperties from jsonSchema to raml form