{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api-evangelist.github.io/svn/json-schema/svn-commit-schema.json",
  "title": "SVN Commit",
  "description": "Schema representing an Apache Subversion commit (revision).",
  "type": "object",
  "required": ["revision", "author", "date", "message"],
  "properties": {
    "revision": {
      "type": "integer",
      "minimum": 1,
      "description": "The revision number created by this commit."
    },
    "author": {
      "type": "string",
      "description": "Username of the person who created this commit."
    },
    "date": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp of when the commit was created."
    },
    "message": {
      "type": "string",
      "description": "The commit log message describing the changes."
    },
    "changedPaths": {
      "type": "array",
      "description": "List of paths changed in this commit.",
      "items": {
        "$ref": "#/$defs/ChangedPath"
      }
    }
  },
  "$defs": {
    "ChangedPath": {
      "type": "object",
      "required": ["path", "action"],
      "properties": {
        "path": {
          "type": "string",
          "description": "Repository path that was changed."
        },
        "action": {
          "type": "string",
          "enum": ["A", "M", "D", "R"],
          "description": "Change action: A=Added, M=Modified, D=Deleted, R=Replaced"
        },
        "copyFromPath": {
          "type": "string",
          "description": "If this path was copied, the source path."
        },
        "copyFromRevision": {
          "type": "integer",
          "description": "If this path was copied, the source revision."
        }
      }
    }
  }
}
