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"