{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.3/commands/type.duplicate.schema.json",
  "$comment": "Written by hand from Part V and the member names of the reference vocabulary; tools/generate-schemas.mjs does not make it yet (schemas/commands/README.md).",
  "title": "type.duplicate",
  "description": "Copies a type under a new id and name, optionally assigning it to one element. A member the kind does not define is refused, not dropped (Part V, 1.4).",
  "type": "object",
  "properties": {
    "kind": {
      "const": "type.duplicate"
    },
    "sourceId": {
      "type": "string",
      "minLength": 1,
      "x-eik-ref": "type"
    },
    "expectedSourceRevision": {
      "type": "integer",
      "minimum": 0
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "pattern": "\\S",
      "description": "Read trimmed of surrounding white space."
    },
    "assignTo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element"
        },
        "expectedRevision": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "id",
        "expectedRevision"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "kind",
    "sourceId",
    "expectedSourceRevision",
    "id",
    "name"
  ],
  "additionalProperties": false
}
