api-platform/docs/swagger.yaml
2024-11-23 01:53:33 +08:00

63 lines
1.2 KiB
YAML

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