Skip to content

Commit

Permalink
Merge pull request #35 from traP-jp/feat/auth-selection
Browse files Browse the repository at this point in the history
feat: 認証の話を追加
  • Loading branch information
mathsuky authored Oct 18, 2024
2 parents 43e1fe6 + b57f636 commit 5704754
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 25 deletions.
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

0 comments on commit 5704754

Please sign in to comment.