src/js2dt.js
function convertPatternProperties (data) {
  if (!data.patternProperties) {
    return data
  }
  data.properties = data.properties || {}
  const patternProperties = data.patternProperties
  delete data.patternProperties
  Object.keys(patternProperties).map(function (pattern) {
    data.properties['/' + pattern + '/'] = patternProperties[pattern]
  })
  if (data.additionalProperties) delete data.additionalProperties
  return data
}
function convertPatternProperties (data) {
  if (!data.patternProperties) {
    return data
  }
  data.properties = data.properties || {}
  const patternProperties = data.patternProperties
  delete data.patternProperties
  Object.keys(patternProperties).map(function (pattern) {
    data.properties['/' + pattern + '/'] = patternProperties[pattern]
  })
  if (data.additionalProperties) delete data.additionalProperties
  return data
}
function convertPatternProperties ( data ) { if ( ! data . patternProperties ) { return data } data . properties = data . properties || { } const patternProperties = data . patternProperties delete data . patternProperties Object . keys ( patternProperties ) . map ( function ( pattern ) { data . properties [ '/' + pattern + '/' ] = patternProperties [ pattern ] } ) if ( data . additionalProperties ) delete data . additionalProperties return data }
Change JSON patternProperties to RAML pattern properties.

@param  {Object} data
@returns  {Object}
Change JSON patternProperties to RAML pattern properties .