Browse Source

swagger: add 'required: true' for params in URL (#4097)

* Partial fix for #4010

Swagger validation needs 'required: true' for parameters that are in
the URL path.

Signed-off-by: Steve Traugott <stevegt@t7a.org>
tags/v1.5.0-dev
stevegt Lauris BH 7 years ago
parent
commit
73557311bc
3 changed files with 6 additions and 2 deletions
  1. +4
    -2
      public/swagger.v1.json
  2. +1
    -0
      routers/api/v1/org/org.go
  3. +1
    -0
      routers/api/v1/user/watch.go

+ 4
- 2
public/swagger.v1.json View File

@@ -5005,7 +5005,8 @@
"type": "string",
"description": "username of user",
"name": "username",
"in": "path"
"in": "path",
"required": true
}
],
"responses": {
@@ -5279,7 +5280,8 @@
"type": "string",
"description": "username of the user",
"name": "username",
"in": "path"
"in": "path",
"required": true
}
],
"responses": {


+ 1
- 0
routers/api/v1/org/org.go View File

@@ -51,6 +51,7 @@ func ListUserOrgs(ctx *context.APIContext) {
// in: path
// description: username of user
// type: string
// required: true
// responses:
// "200":
// "$ref": "#/responses/OrganizationList"


+ 1
- 0
routers/api/v1/user/watch.go View File

@@ -43,6 +43,7 @@ func GetWatchedRepos(ctx *context.APIContext) {
// type: string
// in: path
// description: username of the user
// required: true
// responses:
// "200":
// "$ref": "#/responses/RepositoryList"


Loading…
Cancel
Save