aboutsummaryrefslogtreecommitdiffhomepage
path: root/openapi
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-20 23:32:22 +0900
committernsfisis <nsfisis@gmail.com>2026-02-20 23:32:22 +0900
commit8e73d12a703e90ad908962143951178c13d0d6fe (patch)
tree8bed43aa4b115f8bc50ed258aa192a94b6d2903e /openapi
parentaa07ba2e0a40b0097a4f9aee3c06dcbd9a749105 (diff)
downloadphperkaigi-2026-albatross-8e73d12a703e90ad908962143951178c13d0d6fe.tar.gz
phperkaigi-2026-albatross-8e73d12a703e90ad908962143951178c13d0d6fe.tar.zst
phperkaigi-2026-albatross-8e73d12a703e90ad908962143951178c13d0d6fe.zip
feat: add user submission history page
Allow users to view their own past submissions (code, size, status, timestamp) for each game. Adds API endpoint, backend handler, SQL query, and frontend page with expandable code display. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'openapi')
-rw-r--r--openapi/api-server.yaml64
1 files changed, 64 insertions, 0 deletions
diff --git a/openapi/api-server.yaml b/openapi/api-server.yaml
index ed535d3..9749f25 100644
--- a/openapi/api-server.yaml
+++ b/openapi/api-server.yaml
@@ -153,6 +153,47 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'
+ /games/{game_id}/play/submissions:
+ get:
+ operationId: getGamePlaySubmissions
+ parameters:
+ - name: game_id
+ in: path
+ required: true
+ schema:
+ type: integer
+ responses:
+ '200':
+ description: The request has succeeded.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ submissions:
+ type: array
+ items:
+ $ref: '#/components/schemas/Submission'
+ required:
+ - submissions
+ '401':
+ description: Access is unauthorized.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ '403':
+ description: Access is forbidden.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ '404':
+ description: The server cannot find the requested resource.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
/games/{game_id}/play/submit:
post:
operationId: postGamePlaySubmit
@@ -502,6 +543,29 @@ components:
code:
type: string
nullable: true
+ Submission:
+ type: object
+ required:
+ - submission_id
+ - game_id
+ - code
+ - code_size
+ - status
+ - created_at
+ properties:
+ submission_id:
+ type: integer
+ game_id:
+ type: integer
+ code:
+ type: string
+ code_size:
+ type: integer
+ status:
+ $ref: '#/components/schemas/ExecutionStatus'
+ created_at:
+ type: integer
+ x-go-type: int64
Tournament:
type: object
required: