2022-10-03 15:10:03 +08:00
|
|
|
basePath: /
|
|
|
|
definitions:
|
|
|
|
errorx.CodeErrorResponse:
|
|
|
|
properties:
|
|
|
|
code:
|
|
|
|
example: 200
|
|
|
|
type: integer
|
|
|
|
data: {}
|
|
|
|
msg:
|
|
|
|
example: OK
|
|
|
|
type: string
|
|
|
|
type: object
|
2022-10-04 13:06:13 +08:00
|
|
|
fiber.Route:
|
|
|
|
properties:
|
|
|
|
method:
|
|
|
|
description: Public fields
|
|
|
|
type: string
|
|
|
|
name:
|
|
|
|
description: Route's name
|
|
|
|
type: string
|
|
|
|
params:
|
|
|
|
description: Case sensitive param keys
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
type: array
|
|
|
|
path:
|
|
|
|
description: Original registered route path
|
|
|
|
type: string
|
|
|
|
type: object
|
2022-10-03 15:37:55 +08:00
|
|
|
response.Response:
|
|
|
|
properties:
|
|
|
|
code:
|
|
|
|
example: 200
|
|
|
|
type: integer
|
|
|
|
data: {}
|
|
|
|
msg:
|
|
|
|
example: OK
|
|
|
|
type: string
|
|
|
|
type: object
|
2022-10-03 15:10:03 +08:00
|
|
|
info:
|
|
|
|
contact:
|
|
|
|
email: 919411476@qq.com
|
|
|
|
name: Shikong
|
|
|
|
description: 基于 Fiber 框架的 swagger
|
|
|
|
license:
|
|
|
|
name: Apache 2.0
|
|
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
|
|
termsOfService: http://swagger.io/terms/
|
|
|
|
title: GoFiber Study API
|
|
|
|
version: "1.0"
|
|
|
|
paths:
|
|
|
|
/:
|
|
|
|
get:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: 简单的 HelloWorld 示例
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
2022-10-03 15:37:55 +08:00
|
|
|
allOf:
|
|
|
|
- $ref: '#/definitions/response.Response'
|
|
|
|
- properties:
|
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
default:
|
|
|
|
description: ""
|
2022-10-03 15:10:03 +08:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/errorx.CodeErrorResponse'
|
2022-10-03 15:37:55 +08:00
|
|
|
summary: HelloWorld
|
|
|
|
tags:
|
|
|
|
- HelloWorld
|
|
|
|
/error:
|
|
|
|
delete:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: 错误信息示例
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: ""
|
2022-10-03 15:10:03 +08:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/errorx.CodeErrorResponse'
|
2022-10-03 15:37:55 +08:00
|
|
|
summary: 错误处理
|
|
|
|
tags:
|
|
|
|
- Error
|
|
|
|
get:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: 错误信息示例
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: ""
|
2022-10-03 15:10:03 +08:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/errorx.CodeErrorResponse'
|
2022-10-03 15:37:55 +08:00
|
|
|
summary: 错误处理
|
2022-10-03 15:10:03 +08:00
|
|
|
tags:
|
2022-10-03 15:37:55 +08:00
|
|
|
- Error
|
2022-10-04 00:24:41 +08:00
|
|
|
patch:
|
2022-10-03 15:37:55 +08:00
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: 错误信息示例
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: ""
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/errorx.CodeErrorResponse'
|
|
|
|
summary: 错误处理
|
|
|
|
tags:
|
|
|
|
- Error
|
2022-10-04 00:24:41 +08:00
|
|
|
post:
|
2022-10-03 15:37:55 +08:00
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: 错误信息示例
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: ""
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/errorx.CodeErrorResponse'
|
|
|
|
summary: 错误处理
|
|
|
|
tags:
|
|
|
|
- Error
|
2022-10-04 00:24:41 +08:00
|
|
|
put:
|
2022-10-03 15:37:55 +08:00
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: 错误信息示例
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
default:
|
|
|
|
description: ""
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/errorx.CodeErrorResponse'
|
|
|
|
summary: 错误处理
|
|
|
|
tags:
|
|
|
|
- Error
|
2022-10-04 00:24:41 +08:00
|
|
|
/routes:
|
|
|
|
get:
|
2022-10-03 15:37:55 +08:00
|
|
|
consumes:
|
|
|
|
- application/json
|
2022-10-04 00:24:41 +08:00
|
|
|
description: 获取所有路由信息
|
2022-10-03 15:37:55 +08:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
2022-10-04 00:24:41 +08:00
|
|
|
"200":
|
|
|
|
description: OK
|
2022-10-03 15:37:55 +08:00
|
|
|
schema:
|
2022-10-04 13:06:13 +08:00
|
|
|
allOf:
|
|
|
|
- $ref: '#/definitions/response.Response'
|
|
|
|
- properties:
|
|
|
|
data:
|
|
|
|
items:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/fiber.Route'
|
|
|
|
type: array
|
|
|
|
type: array
|
|
|
|
type: object
|
2022-10-04 00:24:41 +08:00
|
|
|
summary: 获取所有路由
|
2022-10-03 15:37:55 +08:00
|
|
|
tags:
|
2022-10-04 00:24:41 +08:00
|
|
|
- Routes
|
2022-10-03 15:10:03 +08:00
|
|
|
swagger: "2.0"
|