From a85cdc63561bbd04e4b8b0e5901e38e9c6fafc59 Mon Sep 17 00:00:00 2001 From: Kilian Hofmann Date: Mon, 29 Jul 2024 22:07:26 +0200 Subject: [PATCH] Docs pt. 2 --- exam/api/docs/api.yaml | 17 ++++++++++++++++- exam/api/docs/index.html | 6 ++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/exam/api/docs/api.yaml b/exam/api/docs/api.yaml index ac669ce..6ada450 100644 --- a/exam/api/docs/api.yaml +++ b/exam/api/docs/api.yaml @@ -560,13 +560,21 @@ paths: schema: type: integer format: int14 + - in: query + name: l + schema: + type: integer + minimum: 0 + maximum: 30 + default: 10 + description: Number of items per page, influences returned pages count. responses: 200: description: Success. content: application/json: schema: - $ref: "#/components/schemas/UserResponse" + $ref: "#/components/schemas/UserDeleteResponse" 404: description: User not found. content: @@ -903,6 +911,13 @@ components: refreshToken: type: string format: uuid4 + UserDeleteResponse: + type: object + properties: + pages: + type: number + post: + $ref: "#/components/schemas/UserResponse" securitySchemes: BasicAuth: type: apiKey diff --git a/exam/api/docs/index.html b/exam/api/docs/index.html index e9199ff..b24e208 100644 --- a/exam/api/docs/index.html +++ b/exam/api/docs/index.html @@ -512,11 +512,13 @@ data-styled.g137[id="sc-kvXgyf"]{content:"fBvPoH,"}/*!sc*/ " class="sc-euGpHm sc-exayXG fwfkcU kqJXdD">

Delete user with ID.

Authorizations:
BasicAuth
path Parameters
id
required
integer <int14>

User ID

+
query Parameters
l
integer [ 0 .. 30 ]
Default: 10

Number of items per page, influences returned pages count.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "status": 0,
  • "email": "string",
  • "image": "string",
  • "isAdmin": true,
  • "memberSince": {
    },
  • "postCount": 0
}

Update user image

Response samples

Content type
application/json
{
  • "pages": 0,
  • "post": {
    }
}

Update user image

Update user image with ID.
Use special ID self to update logged in user.
Requires logged in user to have admin permissions for any ID other than self.

Authorizations:
BasicAuthBasicAuth
path Parameters
id
required
integer <int14>

User ID

@@ -542,7 +544,7 @@ data-styled.g137[id="sc-kvXgyf"]{content:"fBvPoH,"}/*!sc*/ " class="sc-euGpHm sc-exayXG fwfkcU kqJXdD sc-dHrNzZ dRdjww">

User not found.

Response samples

Content type
application/json
{
  • "pages": 0,
  • "data": [
    ]
}