{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hostilo-app/json-schema/hostilo-app-publish-files-request-schema.json",
  "title": "PublishFilesRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hostilo-app-openapi.json#/components/schemas/PublishFilesRequest",
  "type": "object",
  "required": [
    "site_id",
    "files"
  ],
  "properties": {
    "site_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "description": "Site id (number) or site name."
    },
    "files": {
      "type": "array",
      "minItems": 1,
      "maxItems": 300,
      "items": {
        "type": "object",
        "required": [
          "path",
          "content"
        ],
        "additionalProperties": false,
        "properties": {
          "path": {
            "type": "string",
            "description": "Path from the site root, e.g. index.html, css/style.css, img/logo.png."
          },
          "content": {
            "type": "string",
            "description": "Text content, or base64 when encoding is base64."
          },
          "encoding": {
            "type": "string",
            "enum": [
              "utf-8",
              "base64"
            ],
            "default": "utf-8"
          }
        }
      }
    },
    "clear_assets": {
      "type": "boolean",
      "default": false,
      "description": "Delete current files in assets/ first."
    },
    "dry_run": {
      "type": "boolean",
      "default": false,
      "description": "Only report what would be published."
    },
    "expected_version": {
      "type": "string",
      "description": "Optional. Version from getSite (field version). If someone saved the site since then, the call returns 409 version_conflict and changes nothing."
    }
  }
}