aboutsummaryrefslogtreecommitdiffhomepage
path: root/openapi/fortee.yaml
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-14 20:32:47 +0900
committernsfisis <nsfisis@gmail.com>2026-02-14 20:32:47 +0900
commit9185367fcd7d95af89fac36dd892d8b064dbd94f (patch)
tree6085f0c4ab695d0f83348f32b49b5481f1da6548 /openapi/fortee.yaml
parent6bd35e345a4c5d74578b0f8a5c969027e7e15f02 (diff)
downloadphperkaigi-2026-albatross-9185367fcd7d95af89fac36dd892d8b064dbd94f.tar.gz
phperkaigi-2026-albatross-9185367fcd7d95af89fac36dd892d8b064dbd94f.tar.zst
phperkaigi-2026-albatross-9185367fcd7d95af89fac36dd892d8b064dbd94f.zip
feat(openapi): generate OpenAPI specs from TypeSpec sources
Migrate hand-written OpenAPI YAML to TypeSpec (.tsp) source files. TypeSpec compiles to OpenAPI 3.0 YAML, enabling type-safe API definitions. - Add typespec/ directory with api-server and fortee definitions - Integrate TypeSpec build into `just gen` and `just build` pipelines - Update backend handler code to match new generated type names (inlined error responses, separate GameType/ProblemLanguage enums) - Regenerate frontend TypeScript types from new OpenAPI output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'openapi/fortee.yaml')
-rw-r--r--openapi/fortee.yaml52
1 files changed, 23 insertions, 29 deletions
diff --git a/openapi/fortee.yaml b/openapi/fortee.yaml
index 7e27f30..89a1842 100644
--- a/openapi/fortee.yaml
+++ b/openapi/fortee.yaml
@@ -2,30 +2,15 @@ openapi: 3.0.0
info:
title: fortee API
version: 0.1.0
+tags: []
paths:
/api/user/login:
post:
operationId: postLogin
- summary: User login
- requestBody:
- required: true
- content:
- application/x-www-form-urlencoded:
- schema:
- type: object
- properties:
- username:
- type: string
- example: "john"
- password:
- type: string
- example: "password123"
- required:
- - username
- - password
+ parameters: []
responses:
'200':
- description: Successfully authenticated
+ description: The request has succeeded.
content:
application/json:
schema:
@@ -33,30 +18,41 @@ paths:
properties:
loggedIn:
type: boolean
- example: true
user:
type: object
properties:
username:
type: string
- example: "john"
required:
- username
required:
- loggedIn
+ requestBody:
+ required: true
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ username:
+ type: string
+ password:
+ type: string
+ required:
+ - username
+ - password
/api/user/view/{username}:
get:
operationId: getUser
- summary: Get a user
parameters:
- - in: path
- name: username
+ - name: username
+ in: path
+ required: true
schema:
type: string
- required: true
responses:
'200':
- description: User found
+ description: The request has succeeded.
content:
application/json:
schema:
@@ -64,16 +60,14 @@ paths:
properties:
uuid:
type: string
- example: "11111111-1111-1111-1111-111111111111"
username:
type: string
- example: "john"
avatar_url:
type: string
- example: "/files/_user/11111111-1111-1111-1111-111111111111.jpg"
required:
- uuid
- username
- avatar_url
'404':
- description: User not found
+ description: The server cannot find the requested resource.
+components: {}