Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ドキュメント関係のOpenAPI #19

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions openapi/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ tags:
description: "インスタンスに関するAPI"
- name: "benchmark"
description: "ベンチマークに関するAPI"
- name: "score"
description: "スコアに関するAPI"
- name: "docs"
description: "ドキュメントに関するAPI"

paths:
/oauth2/code:
Expand Down Expand Up @@ -642,6 +646,66 @@ 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"

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:
Expand Down Expand Up @@ -1041,6 +1105,11 @@ components:
- teamId
- score

MarkdownDocument:
type: "string"
example: "# Title\n\n## Subtitle\n\nContent"
description: "Markdown形式のドキュメント"

ErrorBadRequest:
type: "object"
properties:
Expand Down
Loading