{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-list-spot-dto-schema.json",
  "title": "ListSpotDto",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-yms-spot-api-openapi.yml#/components/schemas/ListSpotDto",
  "type": "object",
  "properties": {
    "entity": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "Spot"
      ]
    },
    "action": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "read"
      ]
    },
    "data": {
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/SpotItemDto"
      }
    }
  },
  "required": [
    "entity",
    "action",
    "data"
  ],
  "$defs": {
    "SpotAssignment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier of the record",
          "readOnly": true
        },
        "createDateTime": {
          "format": "date-time",
          "type": "string",
          "description": "The date and time when the record was created",
          "readOnly": true
        },
        "createdBy": {
          "type": "object",
          "description": "The ID of the user who created the record",
          "readOnly": true
        },
        "lastChangedDateTime": {
          "format": "date-time",
          "type": "string",
          "description": "The date and time when the record was last changed",
          "readOnly": true
        },
        "spotId": {
          "type": "string",
          "format": "uuid",
          "description": "The id of the spot"
        },
        "assetVisitId": {
          "type": "object",
          "format": "uuid",
          "description": "The id of the asset visit"
        },
        "assetContainerId": {
          "type": "object",
          "format": "uuid",
          "description": "The id of the asset container"
        },
        "observation": {
          "type": "string",
          "description": "Extra data for the spot assignment"
        }
      },
      "required": [
        "id",
        "createDateTime",
        "createdBy",
        "lastChangedDateTime",
        "spotId",
        "assetVisitId",
        "assetContainerId"
      ]
    },
    "SpotItemDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true,
          "format": "uuid"
        },
        "createDateTime": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "createdBy": {
          "type": "string",
          "readOnly": true,
          "format": "uuid"
        },
        "lastChangedDateTime": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "lastChangedBy": {
          "type": "string",
          "readOnly": true,
          "format": "uuid"
        },
        "isActive": {
          "type": "boolean",
          "readOnly": true
        },
        "tags": {
          "type": "array",
          "readOnly": true
        },
        "orgId": {
          "type": "string",
          "readOnly": true,
          "format": "uuid"
        },
        "warehouseId": {
          "type": "string",
          "readOnly": true,
          "format": "uuid"
        },
        "code": {
          "type": "string",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "parking",
            "docking"
          ]
        },
        "spotAreaId": {
          "type": "string",
          "readOnly": true,
          "format": "uuid"
        },
        "observation": {
          "type": "string",
          "readOnly": true
        },
        "spotAssignments": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/SpotAssignment"
          }
        }
      },
      "required": [
        "id",
        "createDateTime",
        "createdBy",
        "lastChangedDateTime",
        "lastChangedBy",
        "isActive",
        "tags",
        "orgId",
        "warehouseId",
        "code",
        "type",
        "spotAreaId",
        "observation",
        "spotAssignments"
      ]
    }
  }
}