-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from GiganticMinecraft/docs/addUserEndpoints
ユーザー操作に関するAPIを定義
- Loading branch information
Showing
7 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
patch: | ||
tags: | ||
- users | ||
operationId: updateUser | ||
summary: ユーザー情報を変更する | ||
parameters: | ||
- $ref: "../../../types/users/parameters.yml#/parameters/uuid" | ||
- $ref: "../../../types/users/parameters.yml#/parameters/role" | ||
responses: | ||
"200": | ||
description: ユーザー情報の変更に成功 | ||
"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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
get: | ||
tags: | ||
- users | ||
operationId: getUserInfo | ||
summary: 自身のユーザー情報の取得 | ||
description: | | ||
Bearer TokenにMicrosoftから取得したトークンを含めて実行すると | ||
自身のユーザー情報が帰ってきます | ||
responses: | ||
"200": | ||
description: 自身のユーザー情報の取得成功 | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../types/users/definitions.yml#/definitions/user" | ||
"401": | ||
$ref: "../../errors/errorResponses.yml#/components/responses/unauthorized" | ||
"500": | ||
$ref: "../../errors/errorResponses.yml#/components/responses/internalServerError" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
definitions: | ||
user: | ||
description: ユーザー | ||
type: object | ||
properties: | ||
uuid: | ||
$ref: "./components.yml#/components/schemas/uuid" | ||
name: | ||
$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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
parameters: | ||
uuid: | ||
name: uuid | ||
in: path | ||
description: プレイヤーUUID | ||
required: true | ||
schema: | ||
$ref: "./components.yml#/components/schemas/uuid" | ||
role: | ||
name: role | ||
in: query | ||
description: ユーザー権限 | ||
required: false | ||
schema: | ||
$ref: "./components.yml#/components/schemas/role" |