From 70d5a080124912e9b946b09ada1e4a8d21d6835e Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Wed, 1 Nov 2023 23:32:32 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=E3=81=99=E3=81=B9=E3=81=A6=E3=81=AE?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E6=83=85=E5=A0=B1=E3=82=92?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8B=E3=82=A8=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E3=81=AE=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/openapi.yml | 2 ++ schema/paths/users/index.yml | 1 + schema/paths/users/list/index.yml | 23 +++++++++++++++++++++++ schema/types/users/definitions.yml | 7 +++++++ 4 files changed, 33 insertions(+) create mode 100644 schema/paths/users/list/index.yml diff --git a/schema/openapi.yml b/schema/openapi.yml index 4a13385..3d7501e 100644 --- a/schema/openapi.yml +++ b/schema/openapi.yml @@ -49,3 +49,5 @@ paths: $ref: "./paths/users/index.yml" /users/{uuid}: $ref: "./paths/users/[uuid]/index.yml" + /users/list: + $ref: "./paths/users/list/index.yml" diff --git a/schema/paths/users/index.yml b/schema/paths/users/index.yml index 94fd4fd..51f49be 100644 --- a/schema/paths/users/index.yml +++ b/schema/paths/users/index.yml @@ -2,6 +2,7 @@ get: tags: - users operationId: getUserInfo + summary: 自身のユーザー情報の取得 description: | Bearer TokenにMicrosoftから取得したトークンを含めて実行すると 自身のユーザー情報が帰ってきます diff --git a/schema/paths/users/list/index.yml b/schema/paths/users/list/index.yml new file mode 100644 index 0000000..4ba95e7 --- /dev/null +++ b/schema/paths/users/list/index.yml @@ -0,0 +1,23 @@ +get: + tags: + - users + operationId: getUsersList + summary: すべてのユーザーの取得 + description: ユーザーリストを返します + responses: + "200": + description: 自身のユーザー情報の取得成功 + content: + application/json: + schema: + $ref: "../../../types/users/definitions.yml#/definitions/users" + "400": + $ref: "../../../errors/errorResponses.yml#/components/responses/syntaxError" + "401": + $ref: "../../../errors/errorResponses.yml#/components/responses/unauthorized" + "403": + $ref: "../../../errors/errorResponses.yml#/components/responses/forbidden" + "404": + $ref: "../../../errors/errorResponses.yml#/components/responses/notFound" + "500": + $ref: "../../../errors/errorResponses.yml#/components/responses/internalServerError" diff --git a/schema/types/users/definitions.yml b/schema/types/users/definitions.yml index 14810c0..b09eaef 100644 --- a/schema/types/users/definitions.yml +++ b/schema/types/users/definitions.yml @@ -9,3 +9,10 @@ definitions: $ref: "./components.yml#/components/schemas/name" role: $ref: "./components.yml#/components/schemas/role" + users: + description: ユーザーの配列 + type: array + uniqueItems: true + minItems: 0 + items: + $ref: "#/definitions/user"