From 791ff84515e76ad10eaa3f5fe6a34ab56e313658 Mon Sep 17 00:00:00 2001 From: DSeeLP <46624152+DSeeLP@users.noreply.github.com> Date: Mon, 24 Mar 2025 19:09:10 +0100 Subject: [PATCH] document key based user data --- openapi-def.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/openapi-def.yaml b/openapi-def.yaml index 0614179..73159bd 100644 --- a/openapi-def.yaml +++ b/openapi-def.yaml @@ -126,6 +126,29 @@ paths: default: $ref: '#/components/responses/Default' /api/users/@me/data: + get: + operationId: self-list-data + summary: List user data keys + tags: + - Users + security: + - bearer: [] + parameters: + - $ref: '#/components/parameters/UserDataKey' + responses: + 200: + description: Ok + content: + application/json: + schema: + type: array + items: + type: string + 401: + $ref: '#/components/responses/Unauthorized' + default: + $ref: '#/components/responses/Default' + /api/users/@me/data/{key}: get: operationId: self-get-data summary: User data @@ -133,6 +156,8 @@ paths: - Users security: - bearer: [] + parameters: + - $ref: '#/components/parameters/UserDataKey' responses: 200: description: Ok @@ -150,6 +175,8 @@ paths: - Users security: - bearer: [] + parameters: + - $ref: '#/components/parameters/UserDataKey' requestBody: content: application/json: @@ -545,6 +572,13 @@ components: schema: type: string format: uuid + UserDataKey: + name: key + in: path + required: true + schema: + type: string + maxLength: 64 ChatId: name: chatId in: path