Forgejo · Schema

ChangeFileOperation

ChangeFileOperation for creating, updating or deleting a file

GitSource Code ManagementSelf-HostedDevOpsCI/CDOpen SourceForgeRepositoriesIssuesPull Requests

Properties

Name Type Description
content string new or updated file content, must be base64 encoded
from_path string old path of the file to move
operation string indicates what to do with the file
path string path to the existing or new file
sha string sha is the SHA for the file that already exists, required for update or delete
View JSON Schema on GitHub

JSON Schema

changefileoperation.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ChangeFileOperation",
  "description": "ChangeFileOperation for creating, updating or deleting a file",
  "type": "object",
  "required": [
    "operation",
    "path"
  ],
  "properties": {
    "content": {
      "description": "new or updated file content, must be base64 encoded",
      "type": "string",
      "x-go-name": "ContentBase64"
    },
    "from_path": {
      "description": "old path of the file to move",
      "type": "string",
      "x-go-name": "FromPath"
    },
    "operation": {
      "description": "indicates what to do with the file",
      "type": "string",
      "enum": [
        "create",
        "update",
        "delete"
      ],
      "x-go-name": "Operation"
    },
    "path": {
      "description": "path to the existing or new file",
      "type": "string",
      "x-go-name": "Path"
    },
    "sha": {
      "description": "sha is the SHA for the file that already exists, required for update or delete",
      "type": "string",
      "x-go-name": "SHA"
    }
  },
  "x-go-package": "forgejo.org/modules/structs"
}