mirror of
https://github.com/go-gitea/gitea
synced 2025-09-28 03:28:13 +00:00
Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418)
This commit is contained in:
@@ -9,15 +9,24 @@ import (
|
||||
|
||||
// Comment represents a comment on a commit or issue
|
||||
type Comment struct {
|
||||
ID int64 `json:"id"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
PRURL string `json:"pull_request_url"`
|
||||
IssueURL string `json:"issue_url"`
|
||||
Poster *User `json:"user"`
|
||||
OriginalAuthor string `json:"original_author"`
|
||||
OriginalAuthorID int64 `json:"original_author_id"`
|
||||
Body string `json:"body"`
|
||||
Attachments []*Attachment `json:"assets"`
|
||||
// ID is the unique identifier for the comment
|
||||
ID int64 `json:"id"`
|
||||
// HTMLURL is the web URL for viewing the comment
|
||||
HTMLURL string `json:"html_url"`
|
||||
// PRURL is the API URL for the pull request (if applicable)
|
||||
PRURL string `json:"pull_request_url"`
|
||||
// IssueURL is the API URL for the issue
|
||||
IssueURL string `json:"issue_url"`
|
||||
// Poster is the user who posted the comment
|
||||
Poster *User `json:"user"`
|
||||
// OriginalAuthor is the original author name (for imported comments)
|
||||
OriginalAuthor string `json:"original_author"`
|
||||
// OriginalAuthorID is the original author ID (for imported comments)
|
||||
OriginalAuthorID int64 `json:"original_author_id"`
|
||||
// Body contains the comment text content
|
||||
Body string `json:"body"`
|
||||
// Attachments contains files attached to the comment
|
||||
Attachments []*Attachment `json:"assets"`
|
||||
// swagger:strfmt date-time
|
||||
Created time.Time `json:"created_at"`
|
||||
// swagger:strfmt date-time
|
||||
@@ -27,25 +36,34 @@ type Comment struct {
|
||||
// CreateIssueCommentOption options for creating a comment on an issue
|
||||
type CreateIssueCommentOption struct {
|
||||
// required:true
|
||||
// Body is the comment text content
|
||||
Body string `json:"body" binding:"Required"`
|
||||
}
|
||||
|
||||
// EditIssueCommentOption options for editing a comment
|
||||
type EditIssueCommentOption struct {
|
||||
// required: true
|
||||
// Body is the updated comment text content
|
||||
Body string `json:"body" binding:"Required"`
|
||||
}
|
||||
|
||||
// TimelineComment represents a timeline comment (comment of any type) on a commit or issue
|
||||
type TimelineComment struct {
|
||||
ID int64 `json:"id"`
|
||||
// ID is the unique identifier for the timeline comment
|
||||
ID int64 `json:"id"`
|
||||
// Type indicates the type of timeline event
|
||||
Type string `json:"type"`
|
||||
|
||||
HTMLURL string `json:"html_url"`
|
||||
PRURL string `json:"pull_request_url"`
|
||||
// HTMLURL is the web URL for viewing the comment
|
||||
HTMLURL string `json:"html_url"`
|
||||
// PRURL is the API URL for the pull request (if applicable)
|
||||
PRURL string `json:"pull_request_url"`
|
||||
// IssueURL is the API URL for the issue
|
||||
IssueURL string `json:"issue_url"`
|
||||
Poster *User `json:"user"`
|
||||
Body string `json:"body"`
|
||||
// Poster is the user who created the timeline event
|
||||
Poster *User `json:"user"`
|
||||
// Body contains the timeline event content
|
||||
Body string `json:"body"`
|
||||
// swagger:strfmt date-time
|
||||
Created time.Time `json:"created_at"`
|
||||
// swagger:strfmt date-time
|
||||
|
Reference in New Issue
Block a user