调整swagger注解位置
This commit is contained in:
20
docs/docs.go
20
docs/docs.go
@@ -9,15 +9,7 @@ const docTemplate = `{
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {
|
||||
"name": "Divano",
|
||||
"url": "http://www.example.com",
|
||||
"email": "divano@example.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"contact": {},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
@@ -423,12 +415,12 @@ const docTemplate = `{
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "1.0",
|
||||
Host: "localhost:8086",
|
||||
BasePath: "/api/v1",
|
||||
Version: "",
|
||||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
Title: "猪场管理系统 API",
|
||||
Description: "这是一个用于管理猪场设备的后端服务。",
|
||||
Title: "",
|
||||
Description: "",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
|
||||
@@ -1,21 +1,8 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "这是一个用于管理猪场设备的后端服务。",
|
||||
"title": "猪场管理系统 API",
|
||||
"contact": {
|
||||
"name": "Divano",
|
||||
"url": "http://www.example.com",
|
||||
"email": "divano@example.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "1.0"
|
||||
"contact": {}
|
||||
},
|
||||
"host": "localhost:8086",
|
||||
"basePath": "/api/v1",
|
||||
"paths": {
|
||||
"/devices": {
|
||||
"get": {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
basePath: /api/v1
|
||||
definitions:
|
||||
controller.Properties:
|
||||
type: object
|
||||
@@ -126,18 +125,8 @@ definitions:
|
||||
example: testuser
|
||||
type: string
|
||||
type: object
|
||||
host: localhost:8086
|
||||
info:
|
||||
contact:
|
||||
email: divano@example.com
|
||||
name: Divano
|
||||
url: http://www.example.com
|
||||
description: 这是一个用于管理猪场设备的后端服务。
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
title: 猪场管理系统 API
|
||||
version: "1.0"
|
||||
contact: {}
|
||||
paths:
|
||||
/devices:
|
||||
get:
|
||||
|
||||
Reference in New Issue
Block a user