@@ -39,20 +39,54 @@ const docTemplate = `{
39
39
"summary": "Searches for games using Manticore engine",
40
40
"parameters": [
41
41
{
42
- "description": "Account ID ",
42
+ "description": "Request body ",
43
43
"name": "query",
44
44
"in": "body",
45
45
"required": true,
46
46
"schema": {
47
- "$ref": "#/definitions/schema .GameSearchRequestDto"
47
+ "$ref": "#/definitions/games .GameSearchRequestDto"
48
48
}
49
49
}
50
50
],
51
51
"responses": {
52
52
"200": {
53
53
"description": "OK",
54
54
"schema": {
55
- "$ref": "#/definitions/schema.GameSearchResponseDto"
55
+ "$ref": "#/definitions/games.GameSearchResponseDto"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "/search/games/autocomplete": {
62
+ "post": {
63
+ "description": "Returns a parsed search response from the Manticore engine",
64
+ "consumes": [
65
+ "application/json"
66
+ ],
67
+ "produces": [
68
+ "application/json"
69
+ ],
70
+ "tags": [
71
+ "search"
72
+ ],
73
+ "summary": "Autocomplete games names using Manticore engine",
74
+ "parameters": [
75
+ {
76
+ "description": "Request body",
77
+ "name": "query",
78
+ "in": "body",
79
+ "required": true,
80
+ "schema": {
81
+ "$ref": "#/definitions/games.GameSearchRequestDto"
82
+ }
83
+ }
84
+ ],
85
+ "responses": {
86
+ "200": {
87
+ "description": "OK",
88
+ "schema": {
89
+ "$ref": "#/definitions/games.GameAutocompleteResponseDto"
56
90
}
57
91
}
58
92
}
@@ -78,23 +112,37 @@ const docTemplate = `{
78
112
"in": "body",
79
113
"required": true,
80
114
"schema": {
81
- "$ref": "#/definitions/schema .UserSearchRequestDto"
115
+ "$ref": "#/definitions/users .UserSearchRequestDto"
82
116
}
83
117
}
84
118
],
85
119
"responses": {
86
120
"200": {
87
121
"description": "OK",
88
122
"schema": {
89
- "$ref": "#/definitions/schema .UserSearchResponseDto"
123
+ "$ref": "#/definitions/users .UserSearchResponseDto"
90
124
}
91
125
}
92
126
}
93
127
}
94
128
}
95
129
},
96
130
"definitions": {
97
- "schema.GameSearchRequestDto": {
131
+ "games.GameAutocompleteResponseDto": {
132
+ "type": "object",
133
+ "properties": {
134
+ "data": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ "total": {
141
+ "type": "integer"
142
+ }
143
+ }
144
+ },
145
+ "games.GameSearchRequestDto": {
98
146
"type": "object",
99
147
"properties": {
100
148
"category": {
@@ -141,38 +189,24 @@ const docTemplate = `{
141
189
}
142
190
}
143
191
},
144
- "schema .GameSearchResponseDto": {
192
+ "games .GameSearchResponseDto": {
145
193
"type": "object",
146
194
"properties": {
147
195
"data": {
148
- "$ref": "#/definitions/schema .ResponseData"
196
+ "$ref": "#/definitions/games .ResponseData"
149
197
},
150
198
"pagination": {
151
199
"$ref": "#/definitions/schema.PaginationInfo"
152
200
}
153
201
}
154
202
},
155
- "schema.PaginationInfo": {
156
- "type": "object",
157
- "properties": {
158
- "hasNextPage": {
159
- "type": "boolean"
160
- },
161
- "totalItems": {
162
- "type": "integer"
163
- },
164
- "totalPages": {
165
- "type": "integer"
166
- }
167
- }
168
- },
169
- "schema.ResponseData": {
203
+ "games.ResponseData": {
170
204
"type": "object",
171
205
"properties": {
172
206
"items": {
173
207
"type": "array",
174
208
"items": {
175
- "$ref": "#/definitions/schema .SearchGame"
209
+ "$ref": "#/definitions/games .SearchGame"
176
210
}
177
211
},
178
212
"profile": {
@@ -184,7 +218,7 @@ const docTemplate = `{
184
218
}
185
219
}
186
220
},
187
- "schema .SearchGame": {
221
+ "games .SearchGame": {
188
222
"type": "object",
189
223
"properties": {
190
224
"aggregatedRating": {
@@ -255,7 +289,21 @@ const docTemplate = `{
255
289
}
256
290
}
257
291
},
258
- "schema.UserDto": {
292
+ "schema.PaginationInfo": {
293
+ "type": "object",
294
+ "properties": {
295
+ "hasNextPage": {
296
+ "type": "boolean"
297
+ },
298
+ "totalItems": {
299
+ "type": "integer"
300
+ },
301
+ "totalPages": {
302
+ "type": "integer"
303
+ }
304
+ }
305
+ },
306
+ "users.UserDto": {
259
307
"type": "object",
260
308
"properties": {
261
309
"userId": {
@@ -266,7 +314,7 @@ const docTemplate = `{
266
314
}
267
315
}
268
316
},
269
- "schema .UserSearchRequestDto": {
317
+ "users .UserSearchRequestDto": {
270
318
"type": "object",
271
319
"properties": {
272
320
"limit": {
@@ -280,13 +328,13 @@ const docTemplate = `{
280
328
}
281
329
}
282
330
},
283
- "schema .UserSearchResponseData": {
331
+ "users .UserSearchResponseData": {
284
332
"type": "object",
285
333
"properties": {
286
334
"items": {
287
335
"type": "array",
288
336
"items": {
289
- "$ref": "#/definitions/schema .UserDto"
337
+ "$ref": "#/definitions/users .UserDto"
290
338
}
291
339
},
292
340
"profile": {
@@ -298,11 +346,11 @@ const docTemplate = `{
298
346
}
299
347
}
300
348
},
301
- "schema .UserSearchResponseDto": {
349
+ "users .UserSearchResponseDto": {
302
350
"type": "object",
303
351
"properties": {
304
352
"data": {
305
- "$ref": "#/definitions/schema .UserSearchResponseData"
353
+ "$ref": "#/definitions/users .UserSearchResponseData"
306
354
},
307
355
"pagination": {
308
356
"$ref": "#/definitions/schema.PaginationInfo"
0 commit comments