|
| 1 | +// Package docs Code generated by swaggo/swag. DO NOT EDIT |
| 2 | +package docs |
| 3 | + |
| 4 | +import "github.com/swaggo/swag" |
| 5 | + |
| 6 | +const docTemplate = `{ |
| 7 | + "schemes": {{ marshal .Schemes }}, |
| 8 | + "swagger": "2.0", |
| 9 | + "info": { |
| 10 | + "description": "{{escape .Description}}", |
| 11 | + "title": "{{.Title}}", |
| 12 | + "contact": {}, |
| 13 | + "version": "{{.Version}}" |
| 14 | + }, |
| 15 | + "host": "{{.Host}}", |
| 16 | + "basePath": "{{.BasePath}}", |
| 17 | + "paths": { |
| 18 | + "/events": { |
| 19 | + "get": { |
| 20 | + "description": "Get all events\nReturns user events", |
| 21 | + "produces": [ |
| 22 | + "application/json" |
| 23 | + ], |
| 24 | + "tags": [ |
| 25 | + "Events" |
| 26 | + ], |
| 27 | + "summary": "Events", |
| 28 | + "responses": { |
| 29 | + "200": { |
| 30 | + "description": "OK", |
| 31 | + "schema": { |
| 32 | + "type": "string" |
| 33 | + } |
| 34 | + } |
| 35 | + } |
| 36 | + }, |
| 37 | + "post": { |
| 38 | + "description": "Create a new event", |
| 39 | + "consumes": [ |
| 40 | + "application/json" |
| 41 | + ], |
| 42 | + "produces": [ |
| 43 | + "application/json" |
| 44 | + ], |
| 45 | + "tags": [ |
| 46 | + "Events" |
| 47 | + ], |
| 48 | + "responses": { |
| 49 | + "201": { |
| 50 | + "description": "Created", |
| 51 | + "schema": { |
| 52 | + "$ref": "#/definitions/models.Event" |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | + }, |
| 58 | + "/events/{eventId}": { |
| 59 | + "get": { |
| 60 | + "description": "Get details of a specific event", |
| 61 | + "produces": [ |
| 62 | + "application/json" |
| 63 | + ], |
| 64 | + "tags": [ |
| 65 | + "Events" |
| 66 | + ], |
| 67 | + "parameters": [ |
| 68 | + { |
| 69 | + "type": "string", |
| 70 | + "description": "Event Id", |
| 71 | + "name": "eventId", |
| 72 | + "in": "path", |
| 73 | + "required": true |
| 74 | + } |
| 75 | + ], |
| 76 | + "responses": { |
| 77 | + "200": { |
| 78 | + "description": "OK", |
| 79 | + "schema": { |
| 80 | + "$ref": "#/definitions/models.Event" |
| 81 | + } |
| 82 | + }, |
| 83 | + "404": { |
| 84 | + "description": "Not Found", |
| 85 | + "schema": { |
| 86 | + "$ref": "#/definitions/responses.ErrorResponse" |
| 87 | + } |
| 88 | + } |
| 89 | + } |
| 90 | + }, |
| 91 | + "delete": { |
| 92 | + "description": "Deletes an event", |
| 93 | + "produces": [ |
| 94 | + "application/json" |
| 95 | + ], |
| 96 | + "tags": [ |
| 97 | + "Events" |
| 98 | + ], |
| 99 | + "parameters": [ |
| 100 | + { |
| 101 | + "type": "string", |
| 102 | + "description": "Event ID", |
| 103 | + "name": "eventId", |
| 104 | + "in": "path", |
| 105 | + "required": true |
| 106 | + } |
| 107 | + ], |
| 108 | + "responses": { |
| 109 | + "204": { |
| 110 | + "description": "No Content" |
| 111 | + } |
| 112 | + } |
| 113 | + }, |
| 114 | + "patch": { |
| 115 | + "description": "Update details of a specific event", |
| 116 | + "consumes": [ |
| 117 | + "application/json" |
| 118 | + ], |
| 119 | + "produces": [ |
| 120 | + "application/json" |
| 121 | + ], |
| 122 | + "tags": [ |
| 123 | + "Events" |
| 124 | + ], |
| 125 | + "parameters": [ |
| 126 | + { |
| 127 | + "type": "string", |
| 128 | + "description": "Event ID", |
| 129 | + "name": "eventId", |
| 130 | + "in": "path", |
| 131 | + "required": true |
| 132 | + }, |
| 133 | + { |
| 134 | + "description": "Updated event details", |
| 135 | + "name": "event", |
| 136 | + "in": "body", |
| 137 | + "required": true, |
| 138 | + "schema": { |
| 139 | + "$ref": "#/definitions/requests.UpdateEventRequest" |
| 140 | + } |
| 141 | + } |
| 142 | + ], |
| 143 | + "responses": { |
| 144 | + "200": { |
| 145 | + "description": "OK", |
| 146 | + "schema": { |
| 147 | + "$ref": "#/definitions/models.Event" |
| 148 | + } |
| 149 | + } |
| 150 | + } |
| 151 | + } |
| 152 | + } |
| 153 | + }, |
| 154 | + "definitions": { |
| 155 | + "models.Event": { |
| 156 | + "type": "object", |
| 157 | + "required": [ |
| 158 | + "date_time", |
| 159 | + "description", |
| 160 | + "location", |
| 161 | + "name" |
| 162 | + ], |
| 163 | + "properties": { |
| 164 | + "date_time": { |
| 165 | + "type": "string" |
| 166 | + }, |
| 167 | + "description": { |
| 168 | + "type": "string" |
| 169 | + }, |
| 170 | + "id": { |
| 171 | + "type": "integer" |
| 172 | + }, |
| 173 | + "location": { |
| 174 | + "type": "string" |
| 175 | + }, |
| 176 | + "name": { |
| 177 | + "type": "string" |
| 178 | + }, |
| 179 | + "user_id": { |
| 180 | + "type": "integer" |
| 181 | + } |
| 182 | + } |
| 183 | + }, |
| 184 | + "requests.UpdateEventRequest": { |
| 185 | + "type": "object", |
| 186 | + "properties": { |
| 187 | + "description": { |
| 188 | + "type": "string", |
| 189 | + "maxLength": 500 |
| 190 | + }, |
| 191 | + "location": { |
| 192 | + "type": "string", |
| 193 | + "maxLength": 255, |
| 194 | + "minLength": 3 |
| 195 | + }, |
| 196 | + "name": { |
| 197 | + "type": "string", |
| 198 | + "maxLength": 255, |
| 199 | + "minLength": 3 |
| 200 | + } |
| 201 | + } |
| 202 | + }, |
| 203 | + "responses.ErrorResponse": { |
| 204 | + "type": "object", |
| 205 | + "properties": { |
| 206 | + "message": { |
| 207 | + "type": "string" |
| 208 | + }, |
| 209 | + "status": { |
| 210 | + "type": "integer" |
| 211 | + } |
| 212 | + } |
| 213 | + } |
| 214 | + } |
| 215 | +}` |
| 216 | + |
| 217 | +// SwaggerInfo holds exported Swagger Info so clients can modify it |
| 218 | +var SwaggerInfo = &swag.Spec{ |
| 219 | + Version: "1.0", |
| 220 | + Host: "localhost:3001", |
| 221 | + BasePath: "/", |
| 222 | + Schemes: []string{}, |
| 223 | + Title: "Api Documentation", |
| 224 | + Description: "Api docs for net-http template", |
| 225 | + InfoInstanceName: "swagger", |
| 226 | + SwaggerTemplate: docTemplate, |
| 227 | + LeftDelim: "{{", |
| 228 | + RightDelim: "}}", |
| 229 | +} |
| 230 | + |
| 231 | +func init() { |
| 232 | + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) |
| 233 | +} |
0 commit comments