mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-06-05 06:22:06 -04:00
fix descriptions generated from struct comments
trailing periods and double quotes caused inconsistent rendering
This commit is contained in:
parent
b58d8e20fd
commit
d04aece7b1
12 changed files with 37 additions and 37 deletions
|
|
@ -131,7 +131,7 @@ type IssueDeadline struct {
|
|||
Deadline *time.Time `json:"due_date"`
|
||||
}
|
||||
|
||||
// IssueFormFieldType defines issue form field type, can be "markdown", "textarea", "input", "dropdown" or "checkboxes"
|
||||
// IssueFormFieldType defines issue form field type, can be `markdown`, `textarea`, `input`, `dropdown` or `checkboxes`
|
||||
type IssueFormFieldType string
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ package structs
|
|||
|
||||
import "time"
|
||||
|
||||
// CreatePushMirrorOption represents need information to create a push mirror of a repository.
|
||||
// CreatePushMirrorOption represents need information to create a push mirror of a repository
|
||||
type CreatePushMirrorOption struct {
|
||||
RemoteAddress string `json:"remote_address"`
|
||||
RemoteUsername string `json:"remote_username"`
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ package structs
|
|||
|
||||
import "time"
|
||||
|
||||
// BlockedUser represents a blocked user.
|
||||
// BlockedUser represents a blocked user
|
||||
type BlockedUser struct {
|
||||
BlockID int64 `json:"block_id"`
|
||||
// swagger:strfmt date-time
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ type Identity struct {
|
|||
Email string `json:"email" binding:"MaxSize(254)"`
|
||||
}
|
||||
|
||||
// CommitMeta contains meta information of a commit in terms of API.
|
||||
// CommitMeta contains meta information of a commit in terms of API
|
||||
type CommitMeta struct {
|
||||
URL string `json:"url"`
|
||||
SHA string `json:"sha"`
|
||||
|
|
@ -23,13 +23,13 @@ type CommitMeta struct {
|
|||
Created time.Time `json:"created"`
|
||||
}
|
||||
|
||||
// CommitUser contains information of a user in the context of a commit.
|
||||
// CommitUser contains information of a user in the context of a commit
|
||||
type CommitUser struct {
|
||||
Identity
|
||||
Date string `json:"date"`
|
||||
}
|
||||
|
||||
// RepoCommit contains information of a commit in the context of a repository.
|
||||
// RepoCommit contains information of a commit in the context of a repository
|
||||
type RepoCommit struct {
|
||||
URL string `json:"url"`
|
||||
Author *CommitUser `json:"author"`
|
||||
|
|
@ -46,7 +46,7 @@ type CommitStats struct {
|
|||
Deletions int `json:"deletions"`
|
||||
}
|
||||
|
||||
// Commit contains information generated from a Git commit.
|
||||
// Commit contains information generated from a Git commit
|
||||
type Commit struct {
|
||||
*CommitMeta
|
||||
HTMLURL string `json:"html_url"`
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package structs
|
||||
|
||||
// Compare represents a comparison between two commits.
|
||||
// Compare represents a comparison between two commits
|
||||
type Compare struct {
|
||||
TotalCommits int `json:"total_commits"` // Total number of commits in the comparison.
|
||||
Commits []*Commit `json:"commits"` // List of commits in the comparison.
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ type ContentsResponse struct {
|
|||
Links *FileLinksResponse `json:"_links"`
|
||||
}
|
||||
|
||||
// FileCommitResponse contains information generated from a Git commit for a repo's file.
|
||||
// FileCommitResponse contains information generated from a Git commit for a repo's file
|
||||
type FileCommitResponse struct {
|
||||
CommitMeta
|
||||
HTMLURL string `json:"html_url"`
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
package structs
|
||||
|
||||
// Reference represents a Git reference.
|
||||
// Reference represents a Git reference
|
||||
type Reference struct {
|
||||
Ref string `json:"ref"`
|
||||
URL string `json:"url"`
|
||||
Object *GitObject `json:"object"`
|
||||
}
|
||||
|
||||
// GitObject represents a Git object.
|
||||
// GitObject represents a Git object
|
||||
type GitObject struct {
|
||||
Type string `json:"type"`
|
||||
SHA string `json:"sha"`
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package structs
|
||||
|
||||
// RegisterRunnerOptions declares the accepted options for registering runners.
|
||||
// RegisterRunnerOptions declares the accepted options for registering runners
|
||||
// swagger:model
|
||||
type RegisterRunnerOptions struct {
|
||||
// Name of the runner to register. The name of the runner does not have to be unique.
|
||||
|
|
@ -22,7 +22,7 @@ type RegisterRunnerOptions struct {
|
|||
Ephemeral bool `json:"ephemeral"`
|
||||
}
|
||||
|
||||
// RegisterRunnerResponse contains the details of the just registered runner.
|
||||
// RegisterRunnerResponse contains the details of the just registered runner
|
||||
// swagger:model
|
||||
type RegisterRunnerResponse struct {
|
||||
ID int64 `json:"id" binding:"Required"`
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ type Secret struct {
|
|||
Created time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
// CreateOrUpdateSecretOption defines the properties of the secret to create or update.
|
||||
// CreateOrUpdateSecretOption defines the properties of the secret to create or update
|
||||
// swagger:model
|
||||
type CreateOrUpdateSecretOption struct {
|
||||
// Data of the secret. Special characters will be retained. Line endings will be normalized to LF to match the
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// AccessToken represents an API access token.
|
||||
// AccessToken represents an API access token
|
||||
// swagger:response AccessToken
|
||||
type AccessToken struct {
|
||||
ID int64 `json:"id"`
|
||||
|
|
@ -43,7 +43,7 @@ type CreateOAuth2ApplicationOptions struct {
|
|||
RedirectURIs []string `json:"redirect_uris" binding:"Required"`
|
||||
}
|
||||
|
||||
// OAuth2Application represents an OAuth2 application.
|
||||
// OAuth2Application represents an OAuth2 application
|
||||
// swagger:response OAuth2Application
|
||||
type OAuth2Application struct {
|
||||
ID int64 `json:"id"`
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package structs
|
||||
|
||||
// CreateVariableOption defines the properties of the variable to create.
|
||||
// CreateVariableOption defines the properties of the variable to create
|
||||
// swagger:model
|
||||
type CreateVariableOption struct {
|
||||
// Value of the variable to create. Special characters will be retained. Line endings will be normalized to LF to
|
||||
|
|
@ -13,7 +13,7 @@ type CreateVariableOption struct {
|
|||
Value string `json:"value" binding:"Required"`
|
||||
}
|
||||
|
||||
// UpdateVariableOption defines the properties of the variable to update.
|
||||
// UpdateVariableOption defines the properties of the variable to update
|
||||
// swagger:model
|
||||
type UpdateVariableOption struct {
|
||||
// New name for the variable. If the field is empty, the variable name won't be updated. Forgejo will convert it to
|
||||
|
|
|
|||
38
templates/swagger/v1_json.tmpl
generated
38
templates/swagger/v1_json.tmpl
generated
|
|
@ -22807,8 +22807,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"AccessToken": {
|
||||
"description": "AccessToken represents an API access token",
|
||||
"type": "object",
|
||||
"title": "AccessToken represents an API access token.",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
|
|
@ -23528,8 +23528,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"BlockedUser": {
|
||||
"description": "BlockedUser represents a blocked user",
|
||||
"type": "object",
|
||||
"title": "BlockedUser represents a blocked user.",
|
||||
"properties": {
|
||||
"block_id": {
|
||||
"type": "integer",
|
||||
|
|
@ -23969,8 +23969,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"Commit": {
|
||||
"description": "Commit contains information generated from a Git commit",
|
||||
"type": "object",
|
||||
"title": "Commit contains information generated from a Git commit.",
|
||||
"properties": {
|
||||
"author": {
|
||||
"$ref": "#/definitions/User"
|
||||
|
|
@ -24051,8 +24051,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"CommitMeta": {
|
||||
"description": "CommitMeta contains meta information of a commit in terms of API",
|
||||
"type": "object",
|
||||
"title": "CommitMeta contains meta information of a commit in terms of API.",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "string",
|
||||
|
|
@ -24142,8 +24142,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"CommitUser": {
|
||||
"description": "CommitUser contains information of a user in the context of a commit",
|
||||
"type": "object",
|
||||
"title": "CommitUser contains information of a user in the context of a commit.",
|
||||
"properties": {
|
||||
"date": {
|
||||
"type": "string",
|
||||
|
|
@ -24162,8 +24162,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"Compare": {
|
||||
"description": "Compare represents a comparison between two commits",
|
||||
"type": "object",
|
||||
"title": "Compare represents a comparison between two commits.",
|
||||
"properties": {
|
||||
"commits": {
|
||||
"type": "array",
|
||||
|
|
@ -24809,8 +24809,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"CreateOrUpdateSecretOption": {
|
||||
"description": "CreateOrUpdateSecretOption defines the properties of the secret to create or update",
|
||||
"type": "object",
|
||||
"title": "CreateOrUpdateSecretOption defines the properties of the secret to create or update.",
|
||||
"required": [
|
||||
"data"
|
||||
],
|
||||
|
|
@ -24980,8 +24980,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"CreatePushMirrorOption": {
|
||||
"description": "CreatePushMirrorOption represents need information to create a push mirror of a repository",
|
||||
"type": "object",
|
||||
"title": "CreatePushMirrorOption represents need information to create a push mirror of a repository.",
|
||||
"properties": {
|
||||
"branch_filter": {
|
||||
"type": "string",
|
||||
|
|
@ -25381,8 +25381,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"CreateVariableOption": {
|
||||
"description": "CreateVariableOption defines the properties of the variable to create",
|
||||
"type": "object",
|
||||
"title": "CreateVariableOption defines the properties of the variable to create.",
|
||||
"required": [
|
||||
"value"
|
||||
],
|
||||
|
|
@ -26560,8 +26560,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"FileCommitResponse": {
|
||||
"description": "FileCommitResponse contains information generated from a Git commit for a repo's file",
|
||||
"type": "object",
|
||||
"title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
|
||||
"properties": {
|
||||
"author": {
|
||||
"$ref": "#/definitions/CommitUser"
|
||||
|
|
@ -27031,8 +27031,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"GitObject": {
|
||||
"description": "GitObject represents a Git object",
|
||||
"type": "object",
|
||||
"title": "GitObject represents a Git object.",
|
||||
"properties": {
|
||||
"sha": {
|
||||
"type": "string",
|
||||
|
|
@ -27414,8 +27414,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"IssueFormFieldType": {
|
||||
"description": "IssueFormFieldType defines issue form field type, can be `markdown`, `textarea`, `input`, `dropdown` or `checkboxes`",
|
||||
"type": "string",
|
||||
"title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"",
|
||||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"IssueFormFieldVisible": {
|
||||
|
|
@ -28142,8 +28142,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"OAuth2Application": {
|
||||
"description": "OAuth2Application represents an OAuth2 application",
|
||||
"type": "object",
|
||||
"title": "OAuth2Application represents an OAuth2 application.",
|
||||
"properties": {
|
||||
"client_id": {
|
||||
"type": "string",
|
||||
|
|
@ -29263,8 +29263,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"Reference": {
|
||||
"description": "Reference represents a Git reference",
|
||||
"type": "object",
|
||||
"title": "Reference represents a Git reference.",
|
||||
"properties": {
|
||||
"object": {
|
||||
"$ref": "#/definitions/GitObject"
|
||||
|
|
@ -29281,8 +29281,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"RegisterRunnerOptions": {
|
||||
"description": "RegisterRunnerOptions declares the accepted options for registering runners",
|
||||
"type": "object",
|
||||
"title": "RegisterRunnerOptions declares the accepted options for registering runners.",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
|
|
@ -29306,8 +29306,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"RegisterRunnerResponse": {
|
||||
"description": "RegisterRunnerResponse contains the details of the just registered runner",
|
||||
"type": "object",
|
||||
"title": "RegisterRunnerResponse contains the details of the just registered runner.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
|
|
@ -29484,8 +29484,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"RepoCommit": {
|
||||
"description": "RepoCommit contains information of a commit in the context of a repository",
|
||||
"type": "object",
|
||||
"title": "RepoCommit contains information of a commit in the context of a repository.",
|
||||
"properties": {
|
||||
"author": {
|
||||
"$ref": "#/definitions/CommitUser"
|
||||
|
|
@ -30525,8 +30525,8 @@
|
|||
"x-go-package": "forgejo.org/modules/structs"
|
||||
},
|
||||
"UpdateVariableOption": {
|
||||
"description": "UpdateVariableOption defines the properties of the variable to update",
|
||||
"type": "object",
|
||||
"title": "UpdateVariableOption defines the properties of the variable to update.",
|
||||
"required": [
|
||||
"value"
|
||||
],
|
||||
|
|
@ -32491,4 +32491,4 @@
|
|||
"TOTPHeader": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue