{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assignar/json-schema/assignar-order-attachment-schema.json",
  "title": "OrderAttachment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assignar-orders-api-openapi.yml#/components/schemas/OrderAttachment",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "order_id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "size": {
      "type": "string",
      "description": "File size in KB rounded to 2 decimal places."
    },
    "attachment": {
      "type": "string",
      "description": "(See instructions how to upload files.)"
    },
    "attachment_url": {
      "$ref": "#/$defs/UrlAttachment"
    },
    "date_created": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  },
  "$defs": {
    "UrlAttachment": {
      "type": "object",
      "readOnly": true,
      "properties": {
        "url": {
          "type": "string",
          "format": "url",
          "description": "Download URL for the file."
        },
        "expiry": {
          "type": "integer",
          "description": "Expiry date of the download url in timestamp."
        }
      }
    }
  }
}