aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-28 02:08:57 +0900
committernsfisis <nsfisis@gmail.com>2024-07-28 02:08:57 +0900
commitec5fa50956c7f7f7f57c2dde4fb85ad0f3eb441f (patch)
treeca3cdad344526380c95b19c6ed4566625737d885
parentab2a49654a7964bf9e6222b17676ca87588b88d8 (diff)
downloadiosdc-japan-2024-albatross-ec5fa50956c7f7f7f57c2dde4fb85ad0f3eb441f.tar.gz
iosdc-japan-2024-albatross-ec5fa50956c7f7f7f57c2dde4fb85ad0f3eb441f.tar.zst
iosdc-japan-2024-albatross-ec5fa50956c7f7f7f57c2dde4fb85ad0f3eb441f.zip
add openapi.yaml
-rw-r--r--openapi.yaml75
1 files changed, 75 insertions, 0 deletions
diff --git a/openapi.yaml b/openapi.yaml
new file mode 100644
index 0000000..217c4f1
--- /dev/null
+++ b/openapi.yaml
@@ -0,0 +1,75 @@
+openapi: 3.0.0
+info:
+ title: Albatross internal web API
+ version: 0.1.0
+paths:
+ /api/login:
+ post:
+ summary: User login
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ username:
+ type: string
+ example: "john"
+ password:
+ type: string
+ example: "password123"
+ required:
+ - username
+ - password
+ responses:
+ '200':
+ description: Successfully authenticated
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ token:
+ type: string
+ example: "xxxxx.xxxxx.xxxxx"
+ required:
+ - token
+ '401':
+ description: Invalid username or password
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ example: "Invalid credentials"
+ required:
+ - message
+components:
+ schemas:
+ JwtPayload:
+ type: object
+ properties:
+ user_id:
+ type: number
+ example: 123
+ username:
+ type: string
+ example: "john"
+ display_username:
+ type: string
+ example: "John Doe"
+ icon_path:
+ type: string
+ nullable: true
+ example: "/images/john.jpg"
+ is_admin:
+ type: boolean
+ example: false
+ required:
+ - user_id
+ - username
+ - display_username
+ - is_admin