From d148be21ee2e1bf02ea6e8dbde82125c9b4c0708 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:47:02 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:sparkles:=20getDocs=20API=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi/openapi.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/openapi/openapi.yml b/openapi/openapi.yml index a8d0323..f35d0f8 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -17,6 +17,10 @@ tags: description: "インスタンスに関するAPI" - name: "benchmark" description: "ベンチマークに関するAPI" + - name: "score" + description: "スコアに関するAPI" + - name: "docs" + description: "ドキュメントに関するAPI" paths: /oauth2/code: @@ -606,6 +610,29 @@ paths: 500: $ref: "#/components/responses/InternalServerError" + /docs: + get: + tags: ["docs"] + summary: "ドキュメント取得" + description: "Markdown形式のドキュメントを取得します" + operationId: "getDocs" + security: + - UserAuth: [] + responses: + 200: + description: "ドキュメントの取得に成功" + content: + application/json: + schema: + type: "object" + properties: + body: + $ref: "#/components/schemas/MarkdownDocument" + 401: + $ref: "#/components/responses/Unauthorized" + 500: + $ref: "#/components/responses/InternalServerError" + components: requestBodies: NewTeam: @@ -1005,6 +1032,11 @@ components: - teamId - score + MarkdownDocument: + type: "string" + example: "# Title\n\n## Subtitle\n\nContent" + description: "Markdown形式のドキュメント" + ErrorBadRequest: type: "object" properties: From 9b371576492bf381de4a412b5ddea6350e7cc54e Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:49:55 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:sparkles:=20patchDocs=20API=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi/openapi.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/openapi/openapi.yml b/openapi/openapi.yml index f35d0f8..23016f7 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -633,6 +633,43 @@ paths: 500: $ref: "#/components/responses/InternalServerError" + patch: + tags: ["docs"] + summary: "ドキュメント更新" + description: "Markdown形式のドキュメントを更新します" + operationId: "patchDocs" + security: + - AdminAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: "object" + properties: + body: + $ref: "#/components/schemas/MarkdownDocument" + required: + - body + responses: + 200: + description: "ドキュメントの更新に成功" + content: + application/json: + schema: + type: "object" + properties: + body: + $ref: "#/components/schemas/MarkdownDocument" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthorized" + 403: + $ref: "#/components/responses/Forbidden" + 500: + $ref: "#/components/responses/InternalServerError" + components: requestBodies: NewTeam: