feat: add swagger
This commit is contained in:
53
docs/docs.go
Normal file
53
docs/docs.go
Normal file
@@ -0,0 +1,53 @@
|
||||
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
const docTemplate = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/user/getUserList": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"用户模块"
|
||||
],
|
||||
"summary": "所有用户",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "code\",\"message\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "",
|
||||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
Title: "",
|
||||
Description: "",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||
}
|
24
docs/swagger.json
Normal file
24
docs/swagger.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"contact": {}
|
||||
},
|
||||
"paths": {
|
||||
"/user/getUserList": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"用户模块"
|
||||
],
|
||||
"summary": "所有用户",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "code\",\"message\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
docs/swagger.yaml
Normal file
14
docs/swagger.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
info:
|
||||
contact: {}
|
||||
paths:
|
||||
/user/getUserList:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: code","message"}
|
||||
schema:
|
||||
type: string
|
||||
summary: 所有用户
|
||||
tags:
|
||||
- 用户模块
|
||||
swagger: "2.0"
|
Reference in New Issue
Block a user