lib/export.js
function makeRef(id, enclosingNamespace, baseSchemaURL) {
  if (id.namespace === enclosingNamespace.namespace) {
    return '#/definitions/' + id.name;
  } else {
    return makeShrDefinitionURL(id, baseSchemaURL);
  }
}
function makeRef(id, enclosingNamespace, baseSchemaURL) {
  if (id.namespace === enclosingNamespace.namespace) {
    return '#/definitions/' + id.name;
  } else {
    return makeShrDefinitionURL(id, baseSchemaURL);
  }
}
Create a JSON Schema reference to the specified type.

@param {Identifier} id - the target type.
@param {Namespace} enclosingNamespace - the current namespace that is being evaluated.
@param {string} baseSchemaURL - the root URL for the schema identifier
@returns {string} - a JSON Schema reference to the target type.