{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nukez-xyz/json-schema/nukez-xyz-create-file-request-schema.json",
  "title": "CreateFileRequest",
  "description": "Request body for create_file.\n\nNotes:\n  - filename is optional (server can auto-generate).\n  - ttl_min controls the signed URL lifetime.\n  - expected_hash and expected_size_bytes are the client's\n    pre-commitment for the object it is about to upload; confirm\n    refuses to record the manifest hash unless the stored bytes agree\n    with both. They bring the single-file route to parity with the\n    batch route, which already accepted expected_hash.\n  - upload_mode selects the data plane: \"put\" (default) returns the\n    single signed PUT URL; \"resumable\" additionally returns a\n    resumable_upload block for large objects (provider must support\n    it; GCS does). See file_ops.create_file.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nukez-xyz-openapi.json#/components/schemas/CreateFileRequest",
  "properties": {
    "filename": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Filename"
    },
    "content_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content Type"
    },
    "ttl_min": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 1440.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Ttl Min"
    },
    "expected_hash": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Hash",
      "description": "Optional sha256 precommit hash (with or without 'sha256:' prefix)"
    },
    "expected_size_bytes": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Size Bytes",
      "description": "Optional declared object size in bytes; confirm verifies it"
    },
    "upload_mode": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(put|resumable)$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Upload Mode",
      "description": "Data plane: 'put' (default, single signed PUT) or 'resumable'"
    }
  },
  "type": "object"
}