api-platform/docs/swagger.yaml

63 lines
1.3 KiB
YAML
Raw Normal View History

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