Commit 723b3145 authored by MaxGranzow's avatar MaxGranzow

Add API specification for user-search endpoint

parent 277327ea
Pipeline #2214 passed with stage
in 4 minutes and 21 seconds
...@@ -83,6 +83,56 @@ paths: ...@@ -83,6 +83,56 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/error' $ref: '#/components/schemas/error'
'/user/search':
get:
summary: Search for users by their username.
description: >-
Returns an array of objects representing the app users
whose usernames start with the search term.
Casing is ignored.
The user objects are stripped down to what is necessary
to know as an app user.
parameters:
- name: s
description: The term to search for. Must be at least two characters.
in: query
required: true
schema:
type: string
minLength: 2
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/userinfo'
'400':
description: Search term is invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/input-error'
'401':
description: Authentication failure.
content:
text/plain:
schema:
type: string
'500':
description: The server cannot deliver due to an internal error.
content:
application/json:
schema:
$ref: '#/components/schemas/internal-error'
default:
description: Some unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'/user': '/user':
get: get:
summary: Get the data of the user. summary: Get the data of the user.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment