@@ -19,6 +19,7 @@ type Permission struct {
1919}
2020
2121// Repository represents a API repository.
22+ // swagger:response Repository
2223type Repository struct {
2324 ID int64 `json:"id"`
2425 Owner * User `json:"owner"`
@@ -42,6 +43,10 @@ type Repository struct {
4243 Permissions * Permission `json:"permissions,omitempty"`
4344}
4445
46+ // RepositoryList represents a list of API repository.
47+ // swagger:response RepositoryList
48+ type RepositoryList []* Repository
49+
4550// ListMyRepos lists all repositories for the authenticated user that has access to.
4651func (c * Client ) ListMyRepos () ([]* Repository , error ) {
4752 repos := make ([]* Repository , 0 , 10 )
@@ -61,14 +66,37 @@ func (c *Client) ListOrgRepos(org string) ([]*Repository, error) {
6166}
6267
6368// CreateRepoOption options when creating repository
69+ //swagger:parameters createOrgRepo
6470type 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
6679 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"`
72100}
73101
74102// CreateRepo creates a repository for authenticated user.
0 commit comments