Page MenuHomePhabricator
Paste P27829

Gerrit CommentAdded generated Json schema
ActivePublic

Authored by hashar on May 13 2022, 10:05 PM.
Tags
None
Referenced Files
F35139279: Gerrit CommentAdded generated Json schema
May 13 2022, 10:05 PM
Subscribers
None
{
"$schema" : "https://json-schema.org/draft/2019-09/schema",
"$defs" : {
"AccountAttribute" : {
"type" : "object",
"properties" : {
"email" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"username" : {
"type" : "string"
}
}
},
"ApprovalAttribute" : {
"type" : "object",
"properties" : {
"by" : {
"$ref" : "#/$defs/AccountAttribute"
},
"description" : {
"type" : "string"
},
"grantedOn" : {
"type" : "integer"
},
"oldValue" : {
"type" : "string"
},
"type" : {
"type" : "string"
},
"value" : {
"type" : "string"
}
}
},
"DependencyAttribute" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string"
},
"isCurrentPatchSet" : {
"type" : "boolean"
},
"number" : {
"type" : "integer"
},
"ref" : {
"type" : "string"
},
"revision" : {
"type" : "string"
}
}
},
"PatchSetAttribute" : {
"type" : "object",
"properties" : {
"approvals" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ApprovalAttribute"
}
},
"author" : {
"$ref" : "#/$defs/AccountAttribute"
},
"comments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"file" : {
"type" : "string"
},
"line" : {
"type" : "integer"
},
"message" : {
"type" : "string"
},
"reviewer" : {
"$ref" : "#/$defs/AccountAttribute"
}
}
}
},
"createdOn" : {
"type" : "integer"
},
"files" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"deletions" : {
"type" : "integer"
},
"file" : {
"type" : "string"
},
"fileOld" : {
"type" : "string"
},
"insertions" : {
"type" : "integer"
},
"type" : {
"type" : "string",
"enum" : [ "ADDED", "MODIFIED", "DELETED", "RENAMED", "COPIED", "REWRITE" ]
}
}
}
},
"kind" : {
"type" : "string",
"enum" : [ "REWORK", "TRIVIAL_REBASE", "MERGE_FIRST_PARENT_UPDATE", "NO_CODE_CHANGE", "NO_CHANGE" ]
},
"number" : {
"type" : "integer"
},
"parents" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"ref" : {
"type" : "string"
},
"revision" : {
"type" : "string"
},
"sizeDeletions" : {
"type" : "integer"
},
"sizeInsertions" : {
"type" : "integer"
},
"uploader" : {
"$ref" : "#/$defs/AccountAttribute"
}
}
}
},
"type" : "object",
"properties" : {
"TYPE" : {
"type" : "string",
"const" : "comment-added"
},
"approvals" : {
"type" : "object",
"patternProperties" : {
"^[a-zA-Z]+$" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/ApprovalAttribute"
}
}
}
},
"author" : {
"type" : "object",
"patternProperties" : {
"^[a-zA-Z]+$" : {
"$ref" : "#/$defs/AccountAttribute"
}
}
},
"change" : {
"type" : "object",
"patternProperties" : {
"^[a-zA-Z]+$" : {
"type" : "object",
"properties" : {
"allReviewers" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/AccountAttribute"
}
},
"assignee" : {
"$ref" : "#/$defs/AccountAttribute"
},
"branch" : {
"type" : "string"
},
"cherryPickOfChange" : {
"type" : "integer"
},
"cherryPickOfPatchSet" : {
"type" : "integer"
},
"comments" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"message" : {
"type" : "string"
},
"reviewer" : {
"$ref" : "#/$defs/AccountAttribute"
},
"timestamp" : {
"type" : "integer"
}
}
}
},
"commitMessage" : {
"type" : "string"
},
"createdOn" : {
"type" : "integer"
},
"currentPatchSet" : {
"$ref" : "#/$defs/PatchSetAttribute"
},
"dependsOn" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/DependencyAttribute"
}
},
"hashtags" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"id" : {
"type" : "string"
},
"isPrivate" : {
"type" : "boolean"
},
"lastUpdated" : {
"type" : "integer"
},
"neededBy" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/DependencyAttribute"
}
},
"number" : {
"type" : "integer"
},
"open" : {
"type" : "boolean"
},
"owner" : {
"$ref" : "#/$defs/AccountAttribute"
},
"patchSets" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/PatchSetAttribute"
}
},
"plugins" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"message" : {
"type" : "string"
},
"name" : {
"type" : "string"
}
}
}
},
"project" : {
"type" : "string"
},
"status" : {
"type" : "string",
"enum" : [ "NEW", "MERGED", "ABANDONED" ]
},
"subject" : {
"type" : "string"
},
"submitRecords" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"labels" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"by" : {
"$ref" : "#/$defs/AccountAttribute"
},
"label" : {
"type" : "string"
},
"status" : {
"type" : "string"
}
}
}
},
"requirements" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"fallbackText" : {
"type" : "string"
},
"type" : {
"type" : "string"
}
}
}
},
"status" : {
"type" : "string"
}
}
}
},
"topic" : {
"type" : "string"
},
"trackingIds" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string"
},
"system" : {
"type" : "string"
}
}
}
},
"url" : {
"type" : "string"
},
"wip" : {
"type" : "boolean"
}
}
}
}
},
"changeKey" : {
"type" : "object"
},
"comment" : {
"type" : "string"
},
"eventCreatedOn" : {
"type" : "integer"
},
"instanceId" : {
"type" : "string"
},
"patchSet" : {
"type" : "object",
"patternProperties" : {
"^[a-zA-Z]+$" : {
"$ref" : "#/$defs/PatchSetAttribute"
}
}
},
"project" : {
"type" : "object",
"properties" : {
"name" : {
"type" : "string"
},
"serialVersionUID" : {
"type" : "integer",
"const" : 1
}
}
},
"refName" : {
"type" : "string"
},
"type" : {
"type" : "string"
}
}
}

Event Timeline

Automatically generated schema for Gerrit CommentAdded event for T304947

A CommentAdded json event is P27828