mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-19 19:18:43 +02:00
Clarify owner and parent field descriptions in response/request models
This commit is contained in:
parent
3aacd7bf37
commit
0dec2d15f9
@ -37,6 +37,7 @@ type PullRequestMeta struct {
|
|||||||
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,6 +265,7 @@ 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 of the repo
|
||||||
Name string `json:"repo"`
|
Name string `json:"repo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ type StopWatch struct {
|
|||||||
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"`
|
||||||
|
// username of the user or organization owning the repository
|
||||||
RepoOwnerName string `json:"repo_owner_name"`
|
RepoOwnerName string `json:"repo_owner_name"`
|
||||||
RepoName string `json:"repo_name"`
|
RepoName string `json:"repo_name"`
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ 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"`
|
||||||
|
@ -49,6 +49,7 @@ 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"`
|
||||||
|
// username of the user or organization owning the repository
|
||||||
Owner *User `json:"owner"`
|
Owner *User `json:"owner"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
FullName string `json:"full_name"`
|
FullName string `json:"full_name"`
|
||||||
@ -57,6 +58,7 @@ type Repository struct {
|
|||||||
Private bool `json:"private"`
|
Private bool `json:"private"`
|
||||||
Fork bool `json:"fork"`
|
Fork bool `json:"fork"`
|
||||||
Template bool `json:"template"`
|
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)"`
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ type PublicKey struct {
|
|||||||
// 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"`
|
||||||
|
// username of the user or organization owning the key
|
||||||
Owner *User `json:"user,omitempty"`
|
Owner *User `json:"user,omitempty"`
|
||||||
ReadOnly bool `json:"read_only,omitempty"`
|
ReadOnly bool `json:"read_only,omitempty"`
|
||||||
KeyType string `json:"key_type,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