{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://rsasaki0109.github.io/lidar_slam_ros2/schemas/map-edit-receipt-v1.schema.json",
  "title": "lidar_slam map edit receipt v1",
  "type": "object",
  "required": [
    "schema_version",
    "created_at",
    "status",
    "source_dir",
    "output_dir",
    "source_map_bundle_sha256",
    "source_artifacts",
    "candidate_map_bundle_sha256",
    "plan_sha256",
    "operations",
    "point_edit",
    "loop_replay",
    "validation"
  ],
  "properties": {
    "schema_version": {"const": 1},
    "created_at": {"type": "string", "format": "date-time"},
    "status": {"const": "PASS"},
    "source_dir": {"type": "string", "minLength": 1},
    "output_dir": {"type": "string", "minLength": 1},
    "source_map_bundle_sha256": {"$ref": "#/definitions/sha256"},
    "source_artifacts": {
      "type": "object",
      "required": [
        "map_bundle_sha256",
        "full_map_sha256",
        "pointcloud_map_sha256",
        "loop_edges_sha256"
      ],
      "additionalProperties": false,
      "properties": {
        "map_bundle_sha256": {"$ref": "#/definitions/sha256"},
        "full_map_sha256": {"$ref": "#/definitions/sha256"},
        "pointcloud_map_sha256": {"$ref": "#/definitions/sha256"},
        "loop_edges_sha256": {"$ref": "#/definitions/sha256"}
      }
    },
    "candidate_map_bundle_sha256": {"$ref": "#/definitions/sha256"},
    "plan_sha256": {"$ref": "#/definitions/sha256"},
    "operations": {"type": "array", "minItems": 1},
    "point_edit": {"type": "object"},
    "loop_replay": {"type": "object"},
    "validation": {
      "type": "object",
      "required": ["map_bundle", "autoware_pointcloud_map"],
      "properties": {
        "map_bundle": {"const": "PASS"},
        "autoware_pointcloud_map": {"const": "PASS"}
      }
    }
  },
  "definitions": {
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    }
  }
}
