{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.1/proposed/drawings/detail-item.schema.json",
  "$comment": "Proposed for OpenEik 0.2: Part XIV, drawings. Written by hand from the outline of Part XIV, not generated: tools/generate-schemas.mjs keeps this folder and lists none of it in index.json. In 0.1, provenance and anchors are members a detail item's schema does not know, kept at any depth; a validator holds them to this schema only when asked for the proposal (@openeik/tools: proposals [\"drawings\"]).",
  "title": "Detail item, with provenance and anchors",
  "description": "A detail item of a view (Part II, 10; drawings/detail-item.schema.json), with the two members Part XIV, 3 adds (proposed for 0.2): provenance, who made it (provenance.schema.json), and anchors, its references tried in order. The members that hold a feature and a position in the feature's frame are to be fixed with the reference implementation's anchor work (XIV.3.3): the anchor here is provisional, an element, a named feature and a position [s, t].",
  "allOf": [
    {
      "$ref": "../../drawings/detail-item.schema.json"
    }
  ],
  "properties": {
    "provenance": {
      "$ref": "provenance.schema.json"
    },
    "anchors": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "$ref": "#/$defs/anchor"
      }
    }
  },
  "$defs": {
    "anchor": {
      "type": "object",
      "properties": {
        "element": {
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element"
        },
        "feature": {
          "$ref": "defs.schema.json#/$defs/feature"
        },
        "position": {
          "$ref": "defs.schema.json#/$defs/point"
        }
      },
      "required": [
        "element"
      ],
      "x-eik-closed": true
    }
  }
}
