{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postzen-dev/json-schema/postzen-dev-bulk-upload-result-schema.json",
  "title": "BulkUploadResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postzen-dev-posts-api-openapi.yml#/components/schemas/BulkUploadResult",
  "type": "object",
  "required": [
    "total",
    "valid",
    "invalid",
    "results",
    "warnings"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500
    },
    "valid": {
      "type": "integer",
      "minimum": 0
    },
    "invalid": {
      "type": "integer",
      "minimum": 0
    },
    "results": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "rowIndex",
              "ok"
            ],
            "properties": {
              "rowIndex": {
                "type": "integer",
                "minimum": 1
              },
              "ok": {
                "type": "boolean",
                "const": true
              },
              "createdPostId": {
                "type": "string",
                "description": "Present when the row was created by this request or replayed from a previous request with the same idempotency inputs. On dry-run, only replayed rows include this field."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "rowIndex",
              "ok",
              "errors"
            ],
            "properties": {
              "rowIndex": {
                "type": "integer",
                "minimum": 1
              },
              "ok": {
                "type": "boolean",
                "const": false
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}