{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dpf-it-com/json-schema/dpf-it-com-check-spec-files-response-schema.json",
  "title": "Check Spec Files Response",
  "description": "Whether the spec's uploaded files are actually in storage. Always 200 — a missing file is a\nreportable state, not a request error. Specs with nothing to upload (sourceType \"tables\" without\na target schema file, sourceType \"compaction\") return an empty `files` list and canAnalyze true.\n",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dpf-it-com-openapi.yml#/components/schemas/CheckSpecFilesResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "properties": {
        "specId": {
          "type": "string",
          "format": "uuid"
        },
        "specName": {
          "type": "string"
        },
        "canAnalyze": {
          "type": "boolean",
          "description": "True when every file the spec names is present and non-empty — i.e. start-analysis will not refuse."
        },
        "files": {
          "type": "array",
          "description": "One entry per file the spec names, in sample/format/target-schema order.",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string",
                "enum": [
                  "sample",
                  "format",
                  "targetSchema"
                ]
              },
              "fileName": {
                "type": "string"
              },
              "exists": {
                "type": "boolean",
                "description": "Present AND non-empty. A 0-byte object reports false (see reason)."
              },
              "size": {
                "type": "integer",
                "description": "Object size in bytes. Absent when the object is not there at all."
              },
              "lastModified": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "string",
                "description": "Why the file is unusable. Only set when exists is false."
              }
            }
          }
        },
        "missing": {
          "type": "array",
          "description": "The subset of files that are not usable, with the update-spec changedFiles key to use when asking for a new upload URL.",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string",
                "enum": [
                  "sample",
                  "format",
                  "targetSchema"
                ]
              },
              "fileName": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "changedFilesKey": {
                "type": "string",
                "enum": [
                  "sampleFile",
                  "formatFile",
                  "schemaFile"
                ]
              }
            }
          }
        },
        "signedUrls": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Fresh presigned PUT URL per missing file, keyed by file name. Only returned to callers with\nfull workspace access (minting an upload URL is a write); read-only members get the diagnosis\nwithout URLs.\n"
        },
        "expiresIn": {
          "type": "integer",
          "description": "Seconds the signed URLs remain valid. Omitted when none were issued."
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}