api-platform/docs/swagger.json
2024-11-21 19:25:32 +08:00

101 lines
2.9 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "API Docs",
"contact": {},
"version": "1.0"
},
"paths": {
"/api/v1/ping": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "测试接口,将会返回当前用户的信息",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ping"
],
"summary": "Greet",
"deprecated": true,
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/schema.ResponseBody"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/schema.CurrentUserResponse"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/schema.ResponseBody"
}
}
}
}
}
},
"definitions": {
"schema.CurrentUserResponse": {
"type": "object",
"properties": {
"ip": {
"type": "string"
},
"userEmail": {
"type": "string"
},
"userId": {
"type": "string"
},
"userName": {
"type": "string"
},
"valid": {
"type": "boolean"
}
}
},
"schema.ResponseBody": {
"type": "object",
"properties": {
"data": {},
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"success": {
"type": "boolean"
}
}
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}