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

feat: 認証の話を追加 #35

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
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
33 changes: 21 additions & 12 deletions api/backend/to_judge.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
openapi: '3.0.3'
openapi: "3.0.3"
info:
title: Backend to Judge API
version: '0.1'
version: "0.1"
license:
name: MIT
url: 'https://github.com/traP-jp/traO-Judge-docs/blob/main/LICENSE'
url: "https://github.com/traP-jp/traO-Judge-docs/blob/main/LICENSE"
servers:
- url: https://api.server.test/v1
paths:
'/submit-result':
"/submit-result":
post:
operationId: submitResult
description: ジャッジ結果
Expand All @@ -18,14 +18,23 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/SubmitResult'
$ref: "#/components/schemas/SubmitResult"
required: true
summary: 通常のテストケースのジャッジ
responses:
'200':
"200":
description: OK

'400':
description: Bad Request
security:
- bearerAuth: []

components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
JudgeStatus:
title: JudgeStatus
Expand All @@ -47,12 +56,12 @@ components:
properties:
status:
title: status
$ref: '#/components/schemas/JudgeStatus'
$ref: "#/components/schemas/JudgeStatus"
text:
title: text
type: string
description: 追加情報
example: 'Alice win'
example: "Alice win"
score:
title: score
type: number
Expand Down Expand Up @@ -89,11 +98,11 @@ components:
type: array
description: テストケースのリスト
items:
$ref: '#/components/schemas/TestResult'
$ref: "#/components/schemas/TestResult"
totalResult:
title: totalResult
$ref: '#/components/schemas/TestResult'
$ref: "#/components/schemas/TestResult"
required:
- judgeId
- testResults
- totalResult
- totalResult
35 changes: 22 additions & 13 deletions api/judge/to_backend.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
openapi: '3.0.3'
openapi: "3.0.3"
info:
title: Judge to Backend API
version: '0.1'
version: "0.1"
license:
name: MIT
url: 'https://github.com/traP-jp/traO-Judge-docs/blob/main/LICENSE'
url: "https://github.com/traP-jp/traO-Judge-docs/blob/main/LICENSE"
servers:
- url: https://api.server.test/v1
paths:
'/judge':
"/judge":
post:
operationId: judge
description: 全てのジャッジ
Expand All @@ -18,13 +18,22 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Judge'
$ref: "#/components/schemas/Judge"
required: true
summary: 全てのジャッジ
responses:
'200':
"200":
description: OK
"400":
description: Bad Request
security:
- bearerAuth: []
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Execution:
title: Execution
Expand Down Expand Up @@ -116,21 +125,21 @@ components:
description: テストケースの数
example: 3
beforeTestExecs:
$ref: '#/components/schemas/Execution'
$ref: "#/components/schemas/Execution"
onTestExecs:
$ref: '#/components/schemas/Execution'
$ref: "#/components/schemas/Execution"
afterTestExecs:
$ref: '#/components/schemas/Execution'
$ref: "#/components/schemas/Execution"
beforeTestConfigMap:
$ref: '#/components/schemas/ExecutionConfigMap'
$ref: "#/components/schemas/ExecutionConfigMap"
onTestConfigMaps:
title: onTestConfigMaps
type: array
description: テストケース実行時に実行されるコマンドの設定
items:
$ref: '#/components/schemas/ExecutionConfigMap'
$ref: "#/components/schemas/ExecutionConfigMap"
afterTestConfigMap:
$ref: '#/components/schemas/ExecutionConfigMap'
$ref: "#/components/schemas/ExecutionConfigMap"
required:
- judgeId
- testCount
Expand All @@ -139,4 +148,4 @@ components:
- afterTestExecs
- beforeTestConfigMap
- onTestConfigMaps
- afterTestConfigMap
- afterTestConfigMap