{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.8/commands/view.camera.schema.json",
  "$comment": "OpenEik 0.5: folded by tools/fold-schemas-0.5.mjs from the proposal domainCommands, which 0.5 makes a rule (open questions, 139). Written by hand, not generated.",
  "title": "view.camera",
  "description": "Sets a 3D view's camera for a sheet (Part V, 2.3.1, rule 4): a corner, the true isometric from there or top, straight down; or a position toward a target. Its origin, direction and axonometricElevation are written, rounded; with fit false, its crop stays. A crop fitted round what the view shows (fit true, or left out) is not defined, and is refused (kind-not-implemented). Run as a view.upsert at the view's revision.",
  "type": "object",
  "properties": {
    "kind": {
      "const": "view.camera"
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "x-eik-ref": "view"
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "description": "The view's revision as read."
    },
    "corner": {
      "type": "string",
      "enum": [
        "SW",
        "SE",
        "NE",
        "NW",
        "top"
      ]
    },
    "position": {
      "type": "array",
      "minItems": 3,
      "maxItems": 3,
      "prefixItems": [
        {
          "type": "number"
        },
        {
          "type": "number"
        },
        {
          "type": "number"
        }
      ],
      "description": "Where the camera stands, [x, y, z], mm; at or above the target."
    },
    "target": {
      "type": "array",
      "minItems": 3,
      "maxItems": 3,
      "prefixItems": [
        {
          "type": "number"
        },
        {
          "type": "number"
        },
        {
          "type": "number"
        }
      ],
      "description": "What it looks at, [x, y, z], mm."
    },
    "fit": {
      "type": "boolean",
      "description": "false keeps the view's crop. Fitting it (true, or left out) is not defined, and is refused."
    },
    "margin": {
      "type": "number",
      "minimum": 0,
      "maximum": 100000,
      "description": "Room round a fitted crop, mm; read only where the crop is fitted."
    }
  },
  "required": [
    "kind",
    "id",
    "expectedRevision"
  ],
  "additionalProperties": false
}
