Skip to content

Commit 48ac642

Browse files
miquigithub-actions[bot]
authored andcommitted
Update JSON example files
1 parent 32cb567 commit 48ac642

1 file changed

Lines changed: 79 additions & 1 deletion

File tree

examples/v3.1/tictactoe.json

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@
6262
"$ref": "#/components/schemas/mark"
6363
}
6464
}
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+
}
6575
}
6676
},
6777
"400": {
@@ -90,6 +100,17 @@
90100
"description": "Places a mark on the board and retrieves the whole board and the winner (if any).",
91101
"tags": ["Gameplay"],
92102
"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+
],
93114
"requestBody": {
94115
"required": true,
95116
"content": {
@@ -111,6 +132,17 @@
111132
}
112133
}
113134
},
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+
},
114146
"400": {
115147
"description": "The provided parameters are incorrect",
116148
"content": {
@@ -140,7 +172,32 @@
140172
{
141173
"user2AppOauth": ["board:write"]
142174
}
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+
}
144201
}
145202
}
146203
},
@@ -257,5 +314,26 @@
257314
}
258315
}
259316
}
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+
}
260338
}
261339
}

0 commit comments

Comments
 (0)