rts-sim-testing-service/docs/swagger.yaml
2023-07-14 16:28:47 +08:00

151 lines
3.2 KiB
YAML

basePath: /
definitions:
dto.ErrorDto:
properties:
code:
type: integer
message:
type: string
type: object
dto.LoginDto:
properties:
account:
description: 账号
example: "17791995809"
type: string
password:
description: 加密密码
example: 95129dbaace576e46f41a629e6f35d5c
type: string
required:
- account
- password
type: object
dto.OrderItem:
properties:
asc:
type: boolean
column:
type: string
type: object
dto.PageDto:
properties:
orders:
description: 排序项
items:
$ref: '#/definitions/dto.OrderItem'
type: array
page:
description: 页码
example: 1
type: integer
records: {}
size:
description: 页面行数
example: 10
type: integer
total:
type: integer
required:
- page
- size
type: object
dto.TokenRespDto:
properties:
code:
type: integer
expire:
type: string
token:
type: string
type: object
host: localhost:8080
info:
contact: {}
description: CBTC测试服务.
title: CBTC测试系统API
version: "1.0"
paths:
/api/v1/user/login:
post:
consumes:
- application/json
description: 用户登录
parameters:
- description: 登录信息
in: body
name: loginInfo
required: true
schema:
$ref: '#/definitions/dto.LoginDto'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TokenRespDto'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/dto.ErrorDto'
summary: 用户登录
tags:
- 用户Api
/api/v1/user/paging:
get:
consumes:
- application/json
description: 可以通过用户名称过滤,分页查询用户
parameters:
- description: 手机号
in: query
name: mobile
type: string
- description: 用户名
in: query
name: name
type: string
- description: 页码
example: 1
in: query
name: page
required: true
type: integer
- description: 页面行数
example: 10
in: query
name: size
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.PageDto'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/dto.ErrorDto'
"404":
description: Not Found
schema:
$ref: '#/definitions/dto.ErrorDto'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/dto.ErrorDto'
security:
- JwtAuth: []
summary: 分页查询用户
tags:
- 用户Api
securityDefinitions:
JwtAuth:
in: header
name: Authorization
type: apiKey
swagger: "2.0"