{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/looot/json-schema/looot-workspace-read-schema.json",
  "title": "WorkspaceRead",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/looot-workspace-files-api-openapi.yml#/components/schemas/WorkspaceRead",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "file",
    "contentBase64"
  ],
  "properties": {
    "file": {
      "$ref": "#/$defs/WorkspaceFile"
    },
    "contentBase64": {
      "type": "string",
      "minLength": 4,
      "maxLength": 699052,
      "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
    }
  },
  "$defs": {
    "WorkspaceFile": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "fileId",
        "tenantId",
        "path",
        "contentType",
        "byteLength",
        "digest",
        "createdAt",
        "updatedAt",
        "expiresAt",
        "revision"
      ],
      "properties": {
        "fileId": {
          "type": "string",
          "pattern": "^wfl_[a-f0-9]{32}$"
        },
        "tenantId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "path": {
          "type": "string",
          "minLength": 2,
          "maxLength": 1024,
          "pattern": "^/(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)\\.(?:/|$))(?!.*//)(?!.*\\\\)(?!.*[\\u0000-\\u001f\\u007f])[^/]{1,255}(?:/[^/]{1,255})*$"
        },
        "contentType": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "byteLength": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "digest": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        }
      }
    }
  }
}