mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-06-22 10:02:15 +00:00
fix(api): swagger docs improvement (#13082)
This PR fixes some minor issues with the swagger API documentation. These issues are:
1. The description for the `template` parameter for the `GET /repo/search` endpoint is incorrect. It says this:
```
include template repositories this user has access to (defaults to true)
```
When the parameter actually functions like this:
```
show only template, non-template or all repositories (defaults to all)
```
2. The the `gitignores` option in the `POST /user/repos` endpoint JSON object has a description that doesn't say how `gitignore` names should be separated. It's like this:
```
Gitignores to use
```
When it should be something like this:
```
Gitignores to use, separated by commas
```
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13082
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
36deaf6ae0
commit
565d60d2f9
3 changed files with 4 additions and 4 deletions
|
|
@ -151,7 +151,7 @@ type CreateRepoOption struct {
|
|||
AutoInit bool `json:"auto_init"`
|
||||
// Whether the repository is template
|
||||
Template bool `json:"template"`
|
||||
// Gitignores to use
|
||||
// Gitignores to use, separated by commas
|
||||
Gitignores string `json:"gitignores"`
|
||||
// License to use
|
||||
License string `json:"license"`
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ func Search(ctx *context.APIContext) {
|
|||
// type: boolean
|
||||
// - name: template
|
||||
// in: query
|
||||
// description: include template repositories this user has access to (defaults to true)
|
||||
// description: show only template, non-template or all repositories (defaults to all)
|
||||
// type: boolean
|
||||
// - name: archived
|
||||
// in: query
|
||||
|
|
|
|||
4
templates/swagger/v1_json.tmpl
generated
4
templates/swagger/v1_json.tmpl
generated
|
|
@ -5414,7 +5414,7 @@
|
|||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "include template repositories this user has access to (defaults to true)",
|
||||
"description": "show only template, non-template or all repositories (defaults to all)",
|
||||
"name": "template",
|
||||
"in": "query"
|
||||
},
|
||||
|
|
@ -25306,7 +25306,7 @@
|
|||
"x-go-name": "Description"
|
||||
},
|
||||
"gitignores": {
|
||||
"description": "Gitignores to use",
|
||||
"description": "Gitignores to use, separated by commas",
|
||||
"type": "string",
|
||||
"x-go-name": "Gitignores"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue