{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-codecommit/json-schema/amazon-codecommit-create-commit-input-schema.json",
  "title": "CreateCommitInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-codecommit-commit-api-openapi.yml#/components/schemas/CreateCommitInput",
  "type": "object",
  "properties": {
    "repositoryName": {
      "type": "string",
      "description": "The name of the repository where you create the commit."
    },
    "branchName": {
      "type": "string",
      "description": "The name of the branch where you create the commit."
    },
    "parentCommitId": {
      "type": "string",
      "description": "The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository."
    },
    "authorName": {
      "type": "string",
      "description": "The name of the author who created the commit. This information is used as both the author and committer for the commit."
    },
    "email": {
      "type": "string",
      "description": "The email address of the person who created the commit."
    },
    "commitMessage": {
      "type": "string",
      "description": "The commit message you want to include in the commit. Commit messages are limited to 256 KB. If no message is specified, a default message is used."
    },
    "keepEmptyFolders": {
      "type": "boolean",
      "description": "If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a ..gitkeep file is created for empty folders. The default is false."
    },
    "putFiles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PutFileEntry"
      },
      "description": "The files to add or update in this commit."
    },
    "deleteFiles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DeleteFileEntry"
      },
      "description": "The files to delete in this commit. These files still exist in earlier commits."
    },
    "setFileModes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SetFileModeEntry"
      },
      "description": "The file modes to update for files in this commit."
    }
  },
  "required": [
    "repositoryName",
    "branchName"
  ],
  "$defs": {
    "DeleteFileEntry": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The full path of the file to be deleted, including the name of the file."
        }
      },
      "required": [
        "filePath"
      ]
    },
    "PutFileEntry": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The full path to the file in the repository, including the name of the file."
        },
        "fileMode": {
          "type": "string",
          "enum": [
            "EXECUTABLE",
            "NORMAL",
            "SYMLINK"
          ],
          "description": "The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL."
        },
        "fileContent": {
          "type": "string",
          "format": "byte",
          "description": "The content of the file, if a source file is not specified."
        },
        "sourceFile": {
          "$ref": "#/$defs/SourceFileSpecifier"
        }
      },
      "required": [
        "filePath"
      ]
    },
    "SetFileModeEntry": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The full path to the file, including the name of the file."
        },
        "fileMode": {
          "type": "string",
          "enum": [
            "EXECUTABLE",
            "NORMAL",
            "SYMLINK"
          ],
          "description": "The file mode for the file."
        }
      },
      "required": [
        "filePath",
        "fileMode"
      ]
    },
    "SourceFileSpecifier": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The full path to the file, including the name of the file."
        },
        "isMove": {
          "type": "boolean",
          "description": "Whether to remove the source file from the parent commit."
        }
      },
      "required": [
        "filePath"
      ]
    }
  }
}