|
62 | 62 | "$ref": "#/components/schemas/mark" |
63 | 63 | } |
64 | 64 | } |
| 65 | + }, |
| 66 | + "links": { |
| 67 | + "markSquare": { |
| 68 | + "description": "Operation to use if the mark value returned indicates the square is empty", |
| 69 | + "operationId": "put-square", |
| 70 | + "parameters": { |
| 71 | + "row": "$request.path.row", |
| 72 | + "column": "$request.path.column" |
| 73 | + } |
| 74 | + } |
65 | 75 | } |
66 | 76 | }, |
67 | 77 | "400": { |
|
90 | 100 | "description": "Places a mark on the board and retrieves the whole board and the winner (if any).", |
91 | 101 | "tags": ["Gameplay"], |
92 | 102 | "operationId": "put-square", |
| 103 | + "parameters": [ |
| 104 | + { |
| 105 | + "name": "progressUrl", |
| 106 | + "in": "header", |
| 107 | + "description": "Progress URL that should be called if asynchronous response is returned", |
| 108 | + "required": false, |
| 109 | + "schema": { |
| 110 | + "type": "string" |
| 111 | + } |
| 112 | + } |
| 113 | + ], |
93 | 114 | "requestBody": { |
94 | 115 | "required": true, |
95 | 116 | "content": { |
|
111 | 132 | } |
112 | 133 | } |
113 | 134 | }, |
| 135 | + "202": { |
| 136 | + "description": "Mark operation has not completed. Use callback to check for progress", |
| 137 | + "headers": { |
| 138 | + "Location": { |
| 139 | + "description": "Callback URL", |
| 140 | + "schema": { |
| 141 | + "type": "string" |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | + }, |
114 | 146 | "400": { |
115 | 147 | "description": "The provided parameters are incorrect", |
116 | 148 | "content": { |
|
140 | 172 | { |
141 | 173 | "user2AppOauth": ["board:write"] |
142 | 174 | } |
143 | | - ] |
| 175 | + ], |
| 176 | + "callbacks": { |
| 177 | + "statusCallback": { |
| 178 | + "{$request.header.progressUrl}": { |
| 179 | + "post": { |
| 180 | + "summary": "Status of mark operation", |
| 181 | + "description": "Provides the status of the mark operation", |
| 182 | + "operationId": "markOperationCallback", |
| 183 | + "requestBody": { |
| 184 | + "content": { |
| 185 | + "application/json": { |
| 186 | + "schema": { |
| 187 | + "$ref": "#/components/schemas/status" |
| 188 | + } |
| 189 | + } |
| 190 | + } |
| 191 | + }, |
| 192 | + "responses": { |
| 193 | + "200": { |
| 194 | + "description": "Mark operation status received" |
| 195 | + } |
| 196 | + } |
| 197 | + } |
| 198 | + } |
| 199 | + } |
| 200 | + } |
144 | 201 | } |
145 | 202 | } |
146 | 203 | }, |
|
257 | 314 | } |
258 | 315 | } |
259 | 316 | } |
| 317 | + }, |
| 318 | + "webhooks": { |
| 319 | + "markStatus": { |
| 320 | + "post": { |
| 321 | + "summary": "Status of mark operation", |
| 322 | + "description": "Provides the status of the mark operation on completion", |
| 323 | + "operationId": "markOperationWebhook", |
| 324 | + "responses": { |
| 325 | + "200": { |
| 326 | + "description": "Mark operation has completed successfully", |
| 327 | + "content": { |
| 328 | + "application/json": { |
| 329 | + "schema": { |
| 330 | + "$ref": "#/components/schemas/status" |
| 331 | + } |
| 332 | + } |
| 333 | + } |
| 334 | + } |
| 335 | + } |
| 336 | + } |
| 337 | + } |
260 | 338 | } |
261 | 339 | } |
0 commit comments