1- // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
2- // This file was generated by swaggo/swag at
3- // 2018-01-12 18:44:40.928256 +0800 CST m=+0.272034118
4-
1+ // Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
2+ // This file was generated by swaggo/swag
53package docs
64
7- import (
8- "github.com/swaggo/swag"
9- )
5+ import "github.com/swaggo/swag"
106
11- var doc = `{
7+ const docTemplate_swagger = `{
8+ "schemes": {{ marshal .Schemes }},
129 "swagger": "2.0",
1310 "info": {
14- "description": "This is a sample server Petstore server. ",
15- "title": "Swagger Example API ",
11+ "description": "{{escape .Description}} ",
12+ "title": "{{.Title}} ",
1613 "termsOfService": "http://swagger.io/terms/",
1714 "contact": {
1815 "name": "API Support",
@@ -23,214 +20,25 @@ var doc = `{
2320 "name": "Apache 2.0",
2421 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
2522 },
26- "version": "1.0"
27- },
28- "host": "petstore.swagger.io",
29- "basePath": "/v2",
30- "paths": {
31- "/file/upload": {
32- "post": {
33- "description": "Upload file",
34- "consumes": [
35- "multipart/form-data"
36- ],
37- "produces": [
38- "application/json"
39- ],
40- "summary": "Upload file",
41- "operationId": "file.upload",
42- "parameters": [
43- {
44- "type": "file",
45- "description": "this is a test file",
46- "name": "file",
47- "in": "formData",
48- "required": true
49- }
50- ],
51- "responses": {
52- "200": {
53- "description": "ok",
54- "schema": {
55- "type": "string"
56- }
57- },
58- "400": {
59- "description": "We need ID!!",
60- "schema": {
61- "type": "object",
62- "$ref": "#/definitions/web.APIError"
63- }
64- },
65- "404": {
66- "description": "Can not find ID",
67- "schema": {
68- "type": "object",
69- "$ref": "#/definitions/web.APIError"
70- }
71- }
72- }
73- }
74- },
75- "/testapi/get-string-by-int/{some_id}": {
76- "get": {
77- "description": "get string by ID",
78- "consumes": [
79- "application/json"
80- ],
81- "produces": [
82- "application/json"
83- ],
84- "summary": "Add a new pet to the store",
85- "operationId": "get-string-by-int",
86- "parameters": [
87- {
88- "type": "int",
89- "description": "Some ID",
90- "name": "some_id",
91- "in": "path",
92- "required": true
93- },
94- {
95- "description": "Some ID",
96- "name": "some_id",
97- "in": "body",
98- "required": true,
99- "schema": {
100- "type": "object",
101- "$ref": "#/definitions/web.Pet"
102- }
103- }
104- ],
105- "responses": {
106- "200": {
107- "description": "ok",
108- "schema": {
109- "type": "string"
110- }
111- },
112- "400": {
113- "description": "We need ID!!",
114- "schema": {
115- "type": "object",
116- "$ref": "#/definitions/web.APIError"
117- }
118- },
119- "404": {
120- "description": "Can not find ID",
121- "schema": {
122- "type": "object",
123- "$ref": "#/definitions/web.APIError"
124- }
125- }
126- }
127- }
128- },
129- "/testapi/get-struct-array-by-string/{some_id}": {
130- "get": {
131- "description": "get struct array by ID",
132- "consumes": [
133- "application/json"
134- ],
135- "produces": [
136- "application/json"
137- ],
138- "operationId": "get-struct-array-by-string",
139- "parameters": [
140- {
141- "type": "string",
142- "description": "Some ID",
143- "name": "some_id",
144- "in": "path",
145- "required": true
146- },
147- {
148- "type": "int",
149- "description": "Offset",
150- "name": "offset",
151- "in": "query",
152- "required": true
153- },
154- {
155- "type": "int",
156- "description": "Offset",
157- "name": "limit",
158- "in": "query",
159- "required": true
160- }
161- ],
162- "responses": {
163- "200": {
164- "description": "ok",
165- "schema": {
166- "type": "string"
167- }
168- },
169- "400": {
170- "description": "We need ID!!",
171- "schema": {
172- "type": "object",
173- "$ref": "#/definitions/web.APIError"
174- }
175- },
176- "404": {
177- "description": "Can not find ID",
178- "schema": {
179- "type": "object",
180- "$ref": "#/definitions/web.APIError"
181- }
182- }
183- }
184- }
185- }
23+ "version": "{{.Version}}"
18624 },
187- "definitions": {
188- "web.APIError": {
189- "type": "object",
190- "properties": {
191- "CreatedAt": {
192- "type": "string",
193- "format": "date-time"
194- },
195- "ErrorCode": {
196- "type": "integer"
197- },
198- "ErrorMessage": {
199- "type": "string"
200- }
201- }
202- },
203- "web.Pet": {
204- "type": "object",
205- "properties": {
206- "Category": {
207- "type": "object"
208- },
209- "ID": {
210- "type": "integer"
211- },
212- "Name": {
213- "type": "string"
214- },
215- "PhotoUrls": {
216- "type": "array"
217- },
218- "Status": {
219- "type": "string"
220- },
221- "Tags": {
222- "type": "array"
223- }
224- }
225- }
226- }
25+ "host": "{{.Host}}",
26+ "basePath": "{{.BasePath}}",
27+ "paths": {}
22728}`
22829
229- type s struct {}
230-
231- func (s * s ) ReadDoc () string {
232- return doc
30+ // SwaggerInfo_swagger holds exported Swagger Info so clients can modify it
31+ var SwaggerInfo_swagger = & swag.Spec {
32+ Version : "1.0" ,
33+ Host : "petstore.swagger.io" ,
34+ BasePath : "/v2" ,
35+ Schemes : []string {},
36+ Title : "Swagger Example API" ,
37+ Description : "This is a sample server Petstore server." ,
38+ InfoInstanceName : "swagger" ,
39+ SwaggerTemplate : docTemplate_swagger ,
23340}
41+
23442func init () {
235- swag .Register (swag . Name , & s {} )
43+ swag .Register (SwaggerInfo_swagger . InstanceName (), SwaggerInfo_swagger )
23644}
0 commit comments