{
  "$id": "https://schemas.opendd.eu/opendd-entityref.1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Entity reference",
  "type": "object",
  "$comment": "This is implementation specific addition to the standard and it is not part of the 12006-3 standard",
  "properties": {
    "ReferenceUuid": {
      "$ref": "/xtduuid.1.schema.json"
    },
    "ReferenceSchema": {
      "$comment": "Experimental, might change in future release.",
      "type": "string",
      "format": "uri"
    },
    "ReferenceResolverUrl": {
      "$comment": "Experimental, might change in future release.",
      "type": "string",
      "format": "uri",
      "description": "URL to resolver for the GUID."
    },
    "ReferenceUri": {
      "$comment": "According to ISO/FDIS 23387.",
      "type": "string",
      "format": "uri",
      "description": "URIs can be used alongside UUIDs. URIs should be prioritized UUIDs for external referencing whenever feasible."
    }
  },
  "anyOf": [
    {
      "required": [
        "ReferenceUuid"
      ]
    },
    {
      "required": [
        "ReferenceUri"
      ]
    }
  ],
  "unevaluatedProperties": false
}
