{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/gitea/main/json-schema/gitea-rest-api-issue-schema.json", "title": "Issue", "description": "Issue represents an issue in a repository", "type": "object", "properties": { "assets": { "type": "array", "items": { "$ref": "#/$defs/Attachment" }, "x-go-name": "Attachments" }, "assignee": { "$ref": "#/$defs/User" }, "assignees": { "type": "array", "items": { "$ref": "#/$defs/User" }, "x-go-name": "Assignees" }, "body": { "type": "string", "x-go-name": "Body" }, "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "comments": { "type": "integer", "format": "int64", "x-go-name": "Comments" }, "content_version": { "description": "The version of the issue content for optimistic locking", "type": "integer", "format": "int64", "x-go-name": "ContentVersion" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "due_date": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "is_locked": { "type": "boolean", "x-go-name": "IsLocked" }, "labels": { "type": "array", "items": { "$ref": "#/$defs/Label" }, "x-go-name": "Labels" }, "milestone": { "$ref": "#/$defs/Milestone" }, "number": { "type": "integer", "format": "int64", "x-go-name": "Index" }, "original_author": { "type": "string", "x-go-name": "OriginalAuthor" }, "original_author_id": { "type": "integer", "format": "int64", "x-go-name": "OriginalAuthorID" }, "pin_order": { "type": "integer", "format": "int64", "x-go-name": "PinOrder" }, "pull_request": { "$ref": "#/$defs/PullRequestMeta" }, "ref": { "type": "string", "x-go-name": "Ref" }, "repository": { "$ref": "#/$defs/RepositoryMeta" }, "state": { "type": "string", "enum": [ "open", "closed" ], "x-go-enum-desc": "open StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", "x-go-name": "State" }, "time_estimate": { "type": "integer", "format": "int64", "x-go-name": "TimeEstimate" }, "title": { "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" }, "url": { "type": "string", "x-go-name": "URL" }, "user": { "$ref": "#/$defs/User" } }, "x-go-package": "code.gitea.io/gitea/modules/structs", "$defs": { "PullRequestMeta": { "description": "PullRequestMeta PR info if an issue is a PR", "type": "object", "properties": { "draft": { "type": "boolean", "x-go-name": "IsWorkInProgress" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, "merged": { "type": "boolean", "x-go-name": "HasMerged" }, "merged_at": { "type": "string", "format": "date-time", "x-go-name": "Merged" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Milestone": { "description": "Milestone milestone is a collection of issues on one repository", "type": "object", "properties": { "closed_at": { "type": "string", "format": "date-time", "x-go-name": "Closed" }, "closed_issues": { "description": "ClosedIssues is the number of closed issues in this milestone", "type": "integer", "format": "int64", "x-go-name": "ClosedIssues" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "description": { "description": "Description provides details about the milestone", "type": "string", "x-go-name": "Description" }, "due_on": { "type": "string", "format": "date-time", "x-go-name": "Deadline" }, "id": { "description": "ID is the unique identifier for the milestone", "type": "integer", "format": "int64", "x-go-name": "ID" }, "open_issues": { "description": "OpenIssues is the number of open issues in this milestone", "type": "integer", "format": "int64", "x-go-name": "OpenIssues" }, "state": { "description": "State indicates if the milestone is open or closed\nopen StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", "type": "string", "enum": [ "open", "closed" ], "x-go-enum-desc": "open StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", "x-go-name": "State" }, "title": { "description": "Title is the title of the milestone", "type": "string", "x-go-name": "Title" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "Updated" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, "User": { "description": "User represents a user", "type": "object", "properties": { "active": { "description": "Is user active", "type": "boolean", "x-go-name": "IsActive" }, "avatar_url": { "description": "URL to the user's avatar", "type": "string", "x-go-name": "AvatarURL" }, "created": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "description": { "description": "the user's description", "type": "string", "x-go-name": "Description" }, "email": { "type": "string", "format": "email", "x-go-name": "Email" }, "followers_count": { "description": "user counts", "type": "integer", "format": "int64", "x-go-name": "Followers" }, "following_count": { "type": "integer", "format": "int64", "x-go-name": "Following" }, "full_name": { "description": "the user's full name", "type": "string", "x-go-name": "FullName" }, "html_url": { "description": "URL to the user's gitea page", "type": "string", "x-go-name": "HTMLURL" }, "id": { "description": "the user's id", "type": "integer", "format": "int64", "x-go-name": "ID" }, "is_admin": { "description": "Is the user an administrator", "type": "boolean", "x-go-name": "IsAdmin" }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, "last_login": { "type": "string", "format": "date-time", "x-go-name": "LastLogin" }, "location": { "description": "the user's location", "type": "string", "x-go-name": "Location" }, "login": { "description": "login of the user, same as `username`", "type": "string", "x-go-name": "UserName" }, "login_name": { "description": "identifier of the user, provided by the external authenticator (if configured)", "type": "string", "default": "empty", "x-go-name": "LoginName" }, "prohibit_login": { "description": "Is user login prohibited", "type": "boolean", "x-go-name": "ProhibitLogin" }, "restricted": { "description": "Is user restricted", "type": "boolean", "x-go-name": "Restricted" }, "source_id": { "description": "The ID of the user's Authentication Source", "type": "integer", "format": "int64", "x-go-name": "SourceID" }, "starred_repos_count": { "type": "integer", "format": "int64", "x-go-name": "StarredRepos" }, "visibility": { "description": "User visibility level option: public, limited, private", "type": "string", "x-go-name": "Visibility" }, "website": { "description": "the user's website", "type": "string", "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, "RepositoryMeta": { "description": "RepositoryMeta basic repository information", "type": "object", "properties": { "full_name": { "type": "string", "x-go-name": "FullName" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "type": "string", "x-go-name": "Name" }, "owner": { "type": "string", "x-go-name": "Owner" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Label": { "description": "Label a label to an issue or a pr", "type": "object", "properties": { "color": { "type": "string", "x-go-name": "Color", "example": "00aabb" }, "description": { "description": "Description provides additional context about the label's purpose", "type": "string", "x-go-name": "Description" }, "exclusive": { "type": "boolean", "x-go-name": "Exclusive", "example": false }, "id": { "description": "ID is the unique identifier for the label", "type": "integer", "format": "int64", "x-go-name": "ID" }, "is_archived": { "type": "boolean", "x-go-name": "IsArchived", "example": false }, "name": { "description": "Name is the display name of the label", "type": "string", "x-go-name": "Name" }, "url": { "description": "URL is the API endpoint for accessing this label", "type": "string", "x-go-name": "URL" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Attachment": { "description": "Attachment a generic attachment", "type": "object", "properties": { "browser_download_url": { "description": "DownloadURL is the URL to download the attachment", "type": "string", "x-go-name": "DownloadURL" }, "created_at": { "type": "string", "format": "date-time", "x-go-name": "Created" }, "download_count": { "description": "DownloadCount is the number of times the attachment has been downloaded", "type": "integer", "format": "int64", "x-go-name": "DownloadCount" }, "id": { "description": "ID is the unique identifier for the attachment", "type": "integer", "format": "int64", "x-go-name": "ID" }, "name": { "description": "Name is the filename of the attachment", "type": "string", "x-go-name": "Name" }, "size": { "description": "Size is the file size in bytes", "type": "integer", "format": "int64", "x-go-name": "Size" }, "uuid": { "description": "UUID is the unique identifier for the attachment file", "type": "string", "x-go-name": "UUID" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" } } }