mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-20 06:08:29 +02:00
Clarify owner and parent field descriptions in response/request models
This commit is contained in:
parent
3aacd7bf37
commit
0dec2d15f9
@ -35,8 +35,9 @@ type PullRequestMeta struct {
|
|||||||
|
|
||||||
// RepositoryMeta basic repository information
|
// RepositoryMeta basic repository information
|
||||||
type RepositoryMeta struct {
|
type RepositoryMeta struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
// username of the user or organization owning the repository
|
||||||
Owner string `json:"owner"`
|
Owner string `json:"owner"`
|
||||||
FullName string `json:"full_name"`
|
FullName string `json:"full_name"`
|
||||||
}
|
}
|
||||||
@ -264,7 +265,8 @@ func (it IssueTemplate) Type() IssueTemplateType {
|
|||||||
type IssueMeta struct {
|
type IssueMeta struct {
|
||||||
Index int64 `json:"index"`
|
Index int64 `json:"index"`
|
||||||
Owner string `json:"owner"`
|
Owner string `json:"owner"`
|
||||||
Name string `json:"repo"`
|
// name of the repo
|
||||||
|
Name string `json:"repo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LockIssueOption options to lock an issue
|
// LockIssueOption options to lock an issue
|
||||||
|
@ -10,13 +10,14 @@ import (
|
|||||||
// StopWatch represent a running stopwatch
|
// StopWatch represent a running stopwatch
|
||||||
type StopWatch struct {
|
type StopWatch struct {
|
||||||
// swagger:strfmt date-time
|
// swagger:strfmt date-time
|
||||||
Created time.Time `json:"created"`
|
Created time.Time `json:"created"`
|
||||||
Seconds int64 `json:"seconds"`
|
Seconds int64 `json:"seconds"`
|
||||||
Duration string `json:"duration"`
|
Duration string `json:"duration"`
|
||||||
IssueIndex int64 `json:"issue_index"`
|
IssueIndex int64 `json:"issue_index"`
|
||||||
IssueTitle string `json:"issue_title"`
|
IssueTitle string `json:"issue_title"`
|
||||||
RepoOwnerName string `json:"repo_owner_name"`
|
// username of the user or organization owning the repository
|
||||||
RepoName string `json:"repo_name"`
|
RepoOwnerName string `json:"repo_owner_name"`
|
||||||
|
RepoName string `json:"repo_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StopWatches represent a list of stopwatches
|
// StopWatches represent a list of stopwatches
|
||||||
|
@ -9,7 +9,8 @@ import (
|
|||||||
|
|
||||||
// Package represents a package
|
// Package represents a package
|
||||||
type Package struct {
|
type Package struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
|
// username of the user or organization owning the package
|
||||||
Owner *User `json:"owner"`
|
Owner *User `json:"owner"`
|
||||||
Repository *Repository `json:"repository"`
|
Repository *Repository `json:"repository"`
|
||||||
Creator *User `json:"creator"`
|
Creator *User `json:"creator"`
|
||||||
|
@ -48,15 +48,17 @@ type ExternalWiki struct {
|
|||||||
|
|
||||||
// Repository represents a repository
|
// Repository represents a repository
|
||||||
type Repository struct {
|
type Repository struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Owner *User `json:"owner"`
|
// username of the user or organization owning the repository
|
||||||
Name string `json:"name"`
|
Owner *User `json:"owner"`
|
||||||
FullName string `json:"full_name"`
|
Name string `json:"name"`
|
||||||
Description string `json:"description"`
|
FullName string `json:"full_name"`
|
||||||
Empty bool `json:"empty"`
|
Description string `json:"description"`
|
||||||
Private bool `json:"private"`
|
Empty bool `json:"empty"`
|
||||||
Fork bool `json:"fork"`
|
Private bool `json:"private"`
|
||||||
Template bool `json:"template"`
|
Fork bool `json:"fork"`
|
||||||
|
Template bool `json:"template"`
|
||||||
|
// the original repository if the repository in the parameter is a fork; else empty
|
||||||
Parent *Repository `json:"parent"`
|
Parent *Repository `json:"parent"`
|
||||||
Mirror bool `json:"mirror"`
|
Mirror bool `json:"mirror"`
|
||||||
Size int `json:"size"`
|
Size int `json:"size"`
|
||||||
@ -228,11 +230,11 @@ type EditRepoOption struct {
|
|||||||
// GenerateRepoOption options when creating repository using a template
|
// GenerateRepoOption options when creating repository using a template
|
||||||
// swagger:model
|
// swagger:model
|
||||||
type GenerateRepoOption struct {
|
type GenerateRepoOption struct {
|
||||||
// The organization or person who will own the new repository
|
// username of the user or organization who will own the repository
|
||||||
//
|
//
|
||||||
// required: true
|
// required: true
|
||||||
Owner string `json:"owner"`
|
Owner string `json:"owner"`
|
||||||
// Name of the repository to create
|
// name of the repository to create
|
||||||
//
|
//
|
||||||
// required: true
|
// required: true
|
||||||
// unique: true
|
// unique: true
|
||||||
@ -293,6 +295,7 @@ type UpdateBranchRepoOption struct {
|
|||||||
// TransferRepoOption options when transfer a repository's ownership
|
// TransferRepoOption options when transfer a repository's ownership
|
||||||
// swagger:model
|
// swagger:model
|
||||||
type TransferRepoOption struct {
|
type TransferRepoOption struct {
|
||||||
|
// username of the user or organization who will own the repository
|
||||||
// required: true
|
// required: true
|
||||||
NewOwner string `json:"new_owner"`
|
NewOwner string `json:"new_owner"`
|
||||||
// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
|
// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
|
||||||
@ -354,8 +357,9 @@ type MigrateRepoOptions struct {
|
|||||||
CloneAddr string `json:"clone_addr" binding:"Required"`
|
CloneAddr string `json:"clone_addr" binding:"Required"`
|
||||||
// deprecated (only for backwards compatibility)
|
// deprecated (only for backwards compatibility)
|
||||||
RepoOwnerID int64 `json:"uid"`
|
RepoOwnerID int64 `json:"uid"`
|
||||||
// Name of User or Organisation who will own Repo after migration
|
// username of the user or organization who will own the repository after migration
|
||||||
RepoOwner string `json:"repo_owner"`
|
RepoOwner string `json:"repo_owner"`
|
||||||
|
// name of the repo
|
||||||
// required: true
|
// required: true
|
||||||
RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`
|
RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`
|
||||||
|
|
||||||
|
@ -15,9 +15,10 @@ type PublicKey struct {
|
|||||||
Title string `json:"title,omitempty"`
|
Title string `json:"title,omitempty"`
|
||||||
Fingerprint string `json:"fingerprint,omitempty"`
|
Fingerprint string `json:"fingerprint,omitempty"`
|
||||||
// swagger:strfmt date-time
|
// swagger:strfmt date-time
|
||||||
Created time.Time `json:"created_at"`
|
Created time.Time `json:"created_at"`
|
||||||
Updated time.Time `json:"last_used_at"`
|
Updated time.Time `json:"last_used_at"`
|
||||||
Owner *User `json:"user,omitempty"`
|
// username of the user or organization owning the key
|
||||||
ReadOnly bool `json:"read_only,omitempty"`
|
Owner *User `json:"user,omitempty"`
|
||||||
KeyType string `json:"key_type,omitempty"`
|
ReadOnly bool `json:"read_only,omitempty"`
|
||||||
|
KeyType string `json:"key_type,omitempty"`
|
||||||
}
|
}
|
||||||
|
537
templates/swagger/v1_json.tmpl
generated
537
templates/swagger/v1_json.tmpl
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user