diff --git a/api/backend/to_judge.yaml b/api/backend/to_judge.yaml index 1aa5926..0fda612 100644 --- a/api/backend/to_judge.yaml +++ b/api/backend/to_judge.yaml @@ -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: ジャッジ結果 @@ -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 @@ -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 @@ -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 \ No newline at end of file + - totalResult diff --git a/api/judge/to_backend.yaml b/api/judge/to_backend.yaml index 0e39464..9c269a7 100644 --- a/api/judge/to_backend.yaml +++ b/api/judge/to_backend.yaml @@ -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: 全てのジャッジ @@ -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 @@ -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 @@ -139,4 +148,4 @@ components: - afterTestExecs - beforeTestConfigMap - onTestConfigMaps - - afterTestConfigMap \ No newline at end of file + - afterTestConfigMap