{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnm-io/json-schema/arcnm-io-part-revision-dataset-public-schema.json",
  "title": "PartRevisionDatasetPublic",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnm-io-datasets-api-openapi.yml#/components/schemas/PartRevisionDatasetPublic",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id",
      "description": "Unique identifier of the uploaded file attached to the revision."
    },
    "part_revision_id": {
      "type": "string",
      "format": "uuid",
      "title": "Part Revision Id",
      "description": "ID of the revision this file is attached to."
    },
    "data_source_id": {
      "type": "string",
      "format": "uuid",
      "title": "Data Source Id",
      "description": "ID of the underlying stored file this attachment points to."
    },
    "role": {
      "type": "string",
      "title": "Role",
      "description": "The file's role on the revision (e.g. 3D CAD, 2D drawing, spec)."
    },
    "is_primary": {
      "type": "boolean",
      "title": "Is Primary",
      "description": "Whether this is the primary CAD file used for analysis on the revision."
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active",
      "description": "Whether this is the current file; superseded re-uploads are marked inactive.",
      "default": true
    },
    "attributes": {
      "additionalProperties": true,
      "type": "object",
      "title": "Attributes",
      "description": "Free-form key/value metadata for the file attachment."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "Timestamp when the file was attached (UTC, ISO 8601)."
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Filename",
      "description": "Original filename of the uploaded file."
    },
    "content_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content Type",
      "description": "MIME type of the uploaded file (e.g. application/pdf)."
    },
    "size_bytes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Size Bytes",
      "description": "Size of the uploaded file in bytes."
    }
  },
  "type": "object",
  "required": [
    "id",
    "part_revision_id",
    "data_source_id",
    "role",
    "is_primary",
    "created_at"
  ]
}