mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Update Swagger API to match the return of /users/search (#4847)
Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -33,7 +33,16 @@ func Search(ctx *context.APIContext) {
 | 
				
			|||||||
	//   type: integer
 | 
						//   type: integer
 | 
				
			||||||
	// responses:
 | 
						// responses:
 | 
				
			||||||
	//   "200":
 | 
						//   "200":
 | 
				
			||||||
	//     "$ref": "#/responses/UserList"
 | 
						//     description: "SearchResults of a successful search"
 | 
				
			||||||
 | 
						//     schema:
 | 
				
			||||||
 | 
						//       type: object
 | 
				
			||||||
 | 
						//       properties:
 | 
				
			||||||
 | 
						//         ok:
 | 
				
			||||||
 | 
						//           type: boolean
 | 
				
			||||||
 | 
						//         data:
 | 
				
			||||||
 | 
						//           type: array
 | 
				
			||||||
 | 
						//           items:
 | 
				
			||||||
 | 
						//             "$ref": "#/definitions/User"
 | 
				
			||||||
	opts := &models.SearchUserOptions{
 | 
						opts := &models.SearchUserOptions{
 | 
				
			||||||
		Keyword:  strings.Trim(ctx.Query("q"), " "),
 | 
							Keyword:  strings.Trim(ctx.Query("q"), " "),
 | 
				
			||||||
		Type:     models.UserTypeIndividual,
 | 
							Type:     models.UserTypeIndividual,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5212,7 +5212,21 @@
 | 
				
			|||||||
        ],
 | 
					        ],
 | 
				
			||||||
        "responses": {
 | 
					        "responses": {
 | 
				
			||||||
          "200": {
 | 
					          "200": {
 | 
				
			||||||
            "$ref": "#/responses/UserList"
 | 
					            "description": "SearchResults of a successful search",
 | 
				
			||||||
 | 
					            "schema": {
 | 
				
			||||||
 | 
					              "type": "object",
 | 
				
			||||||
 | 
					              "properties": {
 | 
				
			||||||
 | 
					                "data": {
 | 
				
			||||||
 | 
					                  "type": "array",
 | 
				
			||||||
 | 
					                  "items": {
 | 
				
			||||||
 | 
					                    "$ref": "#/definitions/User"
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                "ok": {
 | 
				
			||||||
 | 
					                  "type": "boolean"
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user