Skip to content

Commit

Permalink
docs: すべてのユーザー情報を取得するエンドポイントの定義
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Nov 1, 2023
1 parent 11562aa commit 70d5a08
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions schema/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions schema/paths/users/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ get:
tags:
- users
operationId: getUserInfo
summary: 自身のユーザー情報の取得
description: |
Bearer TokenにMicrosoftから取得したトークンを含めて実行すると
自身のユーザー情報が帰ってきます
Expand Down
23 changes: 23 additions & 0 deletions schema/paths/users/list/index.yml
Original file line number Diff line number Diff line change
@@ -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"
7 changes: 7 additions & 0 deletions schema/types/users/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 70d5a08

Please sign in to comment.