Files
TEMP_spec_system_noad/swagger.json
2025-09-25 08:44:44 +08:00

339 lines
8.8 KiB
JSON

{
"basePath": "/api",
"consumes": [
"application/json"
],
"definitions": {
"Error": {
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"success": {
"example": false,
"type": "boolean"
}
},
"type": "object"
},
"User": {
"properties": {
"email": {
"example": "sharnading@panjit.com.tw",
"type": "string"
},
"id": {
"example": 1,
"type": "integer"
},
"loginid": {
"example": "92460",
"type": "string"
},
"username": {
"example": "\u4e01\u4e8e\u8ed2",
"type": "string"
}
},
"type": "object"
}
},
"host": "0.0.0.0:12023",
"info": {
"contact": {
"email": "it@panjit.com.tw",
"name": "Panjit IT Department"
},
"description": "Panjit \u5bc6\u78bc\u7ba1\u7406\u7cfb\u7d71 API",
"title": "Panjit Password Management API",
"version": "1.0.0"
},
"paths": {
"/change-password": {
"post": {
"description": "\u4fee\u6539\u7528\u6236\u7684\u767b\u5165\u5bc6\u78bc",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"account": {
"description": "\u7528\u6236\u5e33\u865f\uff08loginid \u6216 email\uff09",
"example": "92460",
"type": "string"
},
"new_password": {
"description": "\u65b0\u5bc6\u78bc\uff086-50\u5b57\u5143\uff0c\u9700\u5305\u542b\u5b57\u6bcd\u548c\u6578\u5b57\uff09",
"example": "MyNewPassword123",
"type": "string"
},
"old_password": {
"description": "\u820a\u5bc6\u78bc",
"example": "Panjit92460",
"type": "string"
}
},
"required": [
"account",
"old_password",
"new_password"
],
"type": "object"
}
}
],
"responses": {
"200": {
"description": "\u5bc6\u78bc\u4fee\u6539\u6210\u529f",
"schema": {
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
}
},
"type": "object"
}
},
"400": {
"description": "\u8acb\u6c42\u932f\u8aa4",
"schema": {
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"success": {
"type": "boolean"
}
},
"type": "object"
}
},
"401": {
"description": "\u820a\u5bc6\u78bc\u4e0d\u6b63\u78ba",
"schema": {
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"success": {
"type": "boolean"
}
},
"type": "object"
}
}
},
"summary": "\u4fee\u6539\u7528\u6236\u5bc6\u78bc",
"tags": [
"Password Management"
]
}
},
"/health": {
"get": {
"description": "\u6aa2\u67e5 API \u670d\u52d9\u548c\u8cc7\u6599\u5eab\u9023\u7dda\u72c0\u614b",
"responses": {
"200": {
"description": "\u7cfb\u7d71\u6b63\u5e38",
"schema": {
"properties": {
"database": {
"type": "string"
},
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"timestamp": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "\u7cfb\u7d71\u5065\u5eb7\u6aa2\u67e5",
"tags": [
"System"
]
}
},
"/login": {
"post": {
"description": "\u4f7f\u7528\u5e33\u865f\u548c\u5bc6\u78bc\u9032\u884c\u767b\u5165\u9a57\u8b49",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"properties": {
"account": {
"description": "\u7528\u6236\u5e33\u865f\uff08loginid \u6216 email\uff09",
"example": "92460",
"type": "string"
},
"password": {
"description": "\u7528\u6236\u5bc6\u78bc",
"example": "Panjit92460",
"type": "string"
}
},
"required": [
"account",
"password"
],
"type": "object"
}
}
],
"responses": {
"200": {
"description": "\u767b\u5165\u6210\u529f",
"schema": {
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"user": {
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "integer"
},
"loginid": {
"type": "string"
},
"username": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"401": {
"description": "\u767b\u5165\u5931\u6557",
"schema": {
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"success": {
"type": "boolean"
}
},
"type": "object"
}
}
},
"summary": "\u7528\u6236\u767b\u5165\u9a57\u8b49",
"tags": [
"Authentication"
]
}
},
"/user/{account}": {
"get": {
"description": "\u6839\u64da\u5e33\u865f\u67e5\u8a62\u7528\u6236\u57fa\u672c\u8cc7\u8a0a",
"parameters": [
{
"description": "\u7528\u6236\u5e33\u865f\uff08loginid \u6216 email\uff09",
"example": "92460",
"in": "path",
"name": "account",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "\u67e5\u8a62\u6210\u529f",
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"user": {
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "integer"
},
"loginid": {
"type": "string"
},
"username": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"404": {
"description": "\u7528\u6236\u4e0d\u5b58\u5728",
"schema": {
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"success": {
"type": "boolean"
}
},
"type": "object"
}
}
},
"summary": "\u67e5\u8a62\u7528\u6236\u8cc7\u8a0a",
"tags": [
"User Management"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
],
"swagger": "2.0"
}