@@ -19,6 +19,7 @@ type Permission struct {
19
19
}
20
20
21
21
// Repository represents a API repository.
22
+ // swagger:response Repository
22
23
type Repository struct {
23
24
ID int64 `json:"id"`
24
25
Owner * User `json:"owner"`
@@ -42,6 +43,10 @@ type Repository struct {
42
43
Permissions * Permission `json:"permissions,omitempty"`
43
44
}
44
45
46
+ // RepositoryList represents a list of API repository.
47
+ // swagger:response RepositoryList
48
+ type RepositoryList []* Repository
49
+
45
50
// ListMyRepos lists all repositories for the authenticated user that has access to.
46
51
func (c * Client ) ListMyRepos () ([]* Repository , error ) {
47
52
repos := make ([]* Repository , 0 , 10 )
@@ -61,14 +66,37 @@ func (c *Client) ListOrgRepos(org string) ([]*Repository, error) {
61
66
}
62
67
63
68
// CreateRepoOption options when creating repository
69
+ //swagger:parameters createOrgRepo
64
70
type CreateRepoOption struct {
65
- Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(100)"`
71
+ // Name of the repository to create
72
+ //
73
+ // in: body
74
+ // unique: true
75
+ Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(100)"`
76
+ // Description of the repository to create
77
+ //
78
+ // in: body
66
79
Description string `json:"description" binding:"MaxSize(255)"`
67
- Private bool `json:"private"`
68
- AutoInit bool `json:"auto_init"`
69
- Gitignores string `json:"gitignores"`
70
- License string `json:"license"`
71
- Readme string `json:"readme"`
80
+ // Is the repository to create private ?
81
+ //
82
+ // in: body
83
+ Private bool `json:"private"`
84
+ // Init the repository to create ?
85
+ //
86
+ // in: body
87
+ AutoInit bool `json:"auto_init"`
88
+ // Gitignores to use
89
+ //
90
+ // in: body
91
+ Gitignores string `json:"gitignores"`
92
+ // License to use
93
+ //
94
+ // in: body
95
+ License string `json:"license"`
96
+ // Readme of the repository to create
97
+ //
98
+ // in: body
99
+ Readme string `json:"readme"`
72
100
}
73
101
74
102
// CreateRepo creates a repository for authenticated user.
0 commit comments