diff --git a/hr/open-api-3/api-schema.json b/hr/open-api-3/api-schema.json index 13d1823..e42edf7 100644 --- a/hr/open-api-3/api-schema.json +++ b/hr/open-api-3/api-schema.json @@ -3756,6 +3756,273 @@ } } } + }, + "post": { + "tags": [ + "役職" + ], + "summary": "役職情報の作成\n", + "description": "\n指定した事業所の役職を新規作成します。\n- 管理者権限を持ったユーザのみ実行可能です。", + "operationId": "create_position", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiV1PositionRequest" + } + } + } + }, + "responses": { + "201": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiV1PositionResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unauthorizedError" + } + } + } + }, + "403": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/forbiddenError" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/accessDeniedError" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/internalServerError" + } + } + } + } + } + } + }, + "/api/v1/positions/{id}": { + "put": { + "tags": [ + "役職" + ], + "summary": "役職情報の更新\n", + "description": "\n指定した事業所の役職の情報を更新します。\n- 管理者権限を持ったユーザのみ実行可能です。", + "operationId": "update_position", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "役職ID", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiV1PositionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiV1PositionResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unauthorizedError" + } + } + } + }, + "403": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/forbiddenError" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/accessDeniedError" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/notfoundError" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/internalServerError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "役職" + ], + "summary": "役職情報の削除\n", + "description": "\n指定した事業所の役職の情報を削除します。\n- 管理者権限を持ったユーザのみ実行可能です。\n- 従業員に役職が適用されている場合、従業員の役職情報も削除されます。", + "operationId": "destroy_position", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "役職ID", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647 + }, + "example": 1 + }, + { + "name": "company_id", + "in": "query", + "description": "事業所ID", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647 + }, + "example": 1 + } + ], + "responses": { + "204": { + "description": "successful operation" + }, + "400": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/unauthorizedError" + } + } + } + }, + "403": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/forbiddenError" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/accessDeniedError" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/notfoundError" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/internalServerError" + } + } + } + } + } } } }, @@ -4367,8 +4634,7 @@ "ApiV1GroupCreateRequestParams": { "type": "object", "required": [ - "name", - "group" + "name" ], "properties": { "code": {