Skip to content

Commit 16f9380

Browse files
committed
fix: remove (WebSocket) suffix and misleading POST body from watch docs
1 parent ee679f4 commit 16f9380

4 files changed

Lines changed: 355 additions & 272 deletions

File tree

core/scripts/generate-openapi.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,27 +1424,13 @@ function buildPathSpec(method, sourceFile) {
14241424

14251425
const pathObj = {
14261426
post: {
1427-
summary: summary + ' (WebSocket)',
1427+
summary,
14281428
operationId: name,
14291429
parameters: [{ $ref: '#/components/parameters/ExchangeParam' }],
14301430
description: wsDescription,
1431-
requestBody: {
1432-
content: {
1433-
'application/json': {
1434-
schema: {
1435-
title: name.charAt(0).toUpperCase() + name.slice(1) + 'Request',
1436-
type: 'object',
1437-
properties: {
1438-
args: { type: 'array', items: { type: 'string' } },
1439-
credentials: { $ref: '#/components/schemas/ExchangeCredentials' },
1440-
},
1441-
},
1442-
},
1443-
},
1444-
},
14451431
responses: {
14461432
'200': {
1447-
description: `${summary} response (WebSocket data event)`,
1433+
description: `${summary} response`,
14481434
content: {
14491435
'application/json': { schema: responseSchema },
14501436
},

core/src/server/method-verbs.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
]
296296
},
297297
"watchOrderBook": {
298-
"verb": "ws",
298+
"verb": "post",
299299
"args": [
300300
{
301301
"name": "outcomeId",
@@ -310,7 +310,7 @@
310310
]
311311
},
312312
"watchOrderBooks": {
313-
"verb": "ws",
313+
"verb": "post",
314314
"args": [
315315
{
316316
"name": "outcomeIds",
@@ -325,7 +325,7 @@
325325
]
326326
},
327327
"unwatchOrderBook": {
328-
"verb": "ws",
328+
"verb": "post",
329329
"args": [
330330
{
331331
"name": "outcomeId",
@@ -335,7 +335,7 @@
335335
]
336336
},
337337
"watchTrades": {
338-
"verb": "ws",
338+
"verb": "post",
339339
"args": [
340340
{
341341
"name": "outcomeId",
@@ -360,7 +360,7 @@
360360
]
361361
},
362362
"watchAddress": {
363-
"verb": "ws",
363+
"verb": "post",
364364
"args": [
365365
{
366366
"name": "address",
@@ -375,7 +375,7 @@
375375
]
376376
},
377377
"unwatchAddress": {
378-
"verb": "ws",
378+
"verb": "post",
379379
"args": [
380380
{
381381
"name": "address",

0 commit comments

Comments
 (0)