History

feat: support for gzip middleware (#53)

Josef Hák committed 7 years ago

Commit dbf6ef41 parent 966821010 files · +87 −10Browse files

Showing the changes to example/basic/docs (1 of 10 files). Show all

Unified · Split

example/basic/docs/docs.go+161−0
@@ -0,0 +1,161 @@
1// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
2// This file was generated by swaggo/swag at
3// 2017-06-25 01:25:37.872454531 +0800 CST
4
5package docs
6
7import (
8 "github.com/swaggo/swag"
9)
10
11var doc = `{
12 "swagger": "2.0",
13 "info": {
14 "description": "This is a sample server Petstore server.",
15 "title": "Swagger Example API",
16 "termsOfService": "http://swagger.io/terms/",
17 "contact": {
18 "name": "API Support",
19 "url": "http://www.swagger.io/support",
20 "email": "support@swagger.io"
21 },
22 "license": {
23 "name": "Apache 2.0",
24 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
25 },
26 "version": "1.0"
27 },
28 "host": "petstore.swagger.io",
29 "basePath": "/v2",
30 "paths": {
31 "/testapi/get-string-by-int/{some_id}": {
32 "get": {
33 "description": "get string by ID",
34 "consumes": [
35 "application/json"
36 ],
37 "produces": [
38 "application/json"
39 ],
40 "summary": "Add a new pet to the store",
41 "parameters": [
42 {
43 "description": "Some ID",
44 "name": "some_id",
45 "in": "path",
46 "required": true,
47 "schema": {
48 "type": "int"
49 }
50 }
51 ],
52 "responses": {
53 "200": {
54 "description": "ok",
55 "schema": {
56 "type": "string"
57 }
58 },
59 "400": {
60 "description": "We need ID!!",
61 "schema": {
62 "type": "object",
63 "$ref": "#/definitions/web.APIError"
64 }
65 },
66 "404": {
67 "description": "Can not find ID",
68 "schema": {
69 "type": "object",
70 "$ref": "#/definitions/web.APIError"
71 }
72 }
73 }
74 }
75 },
76 "/testapi/get-struct-array-by-string/{some_id}": {
77 "get": {
78 "description": "get struct array by ID",
79 "consumes": [
80 "application/json"
81 ],
82 "produces": [
83 "application/json"
84 ],
85 "parameters": [
86 {
87 "description": "Some ID",
88 "name": "some_id",
89 "in": "path",
90 "required": true,
91 "schema": {
92 "type": "string"
93 }
94 },
95 {
96 "description": "Offset",
97 "name": "offset",
98 "in": "query",
99 "required": true,
100 "schema": {
101 "type": "int"
102 }
103 },
104 {
105 "description": "Offset",
106 "name": "limit",
107 "in": "query",
108 "required": true,
109 "schema": {
110 "type": "int"
111 }
112 }
113 ],
114 "responses": {
115 "200": {
116 "description": "ok",
117 "schema": {
118 "type": "string"
119 }
120 },
121 "400": {
122 "description": "We need ID!!",
123 "schema": {
124 "type": "object",
125 "$ref": "#/definitions/web.APIError"
126 }
127 },
128 "404": {
129 "description": "Can not find ID",
130 "schema": {
131 "type": "object",
132 "$ref": "#/definitions/web.APIError"
133 }
134 }
135 }
136 }
137 }
138 },
139 "definitions": {
140 "web.APIError": {
141 "type": "object",
142 "properties": {
143 "ErrorCode": {
144 "type": "int"
145 },
146 "ErrorMessage": {
147 "type": "string"
148 }
149 }
150 }
151 }
152}`
153
154type s struct{}
155
156func (s *s) ReadDoc() string {
157 return doc
158}
159func init() {
160 swag.Register(swag.Name, &s{})
161}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t