{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://zaroz.cloud/contract/units/v1/allocation.schema.json",
  "title": "/zaroz/allocation.json",
  "description": "null while the unit is not allocated. When allocated, user-data.json already holds the allocation's user_data.",
  "oneOf": [
    { "type": "null" },
    {
      "type": "object",
      "required": ["id", "allocated_at", "generation"],
      "properties": {
        "id": { "type": "string", "minLength": 1, "maxLength": 128 },
        "allocated_at": { "type": "string", "format": "date-time" },
        "generation": { "type": "integer" }
      }
    }
  ]
}
