diff --git a/examples/v3.1/tictactoe.json b/examples/v3.1/tictactoe.json index 79f34cb..a51c51a 100644 --- a/examples/v3.1/tictactoe.json +++ b/examples/v3.1/tictactoe.json @@ -62,6 +62,16 @@ "$ref": "#/components/schemas/mark" } } + }, + "links": { + "markSquare": { + "description": "Operation to use if the mark value returned indicates the square is empty", + "operationId": "put-square", + "parameters": { + "row": "$request.path.row", + "column": "$request.path.column" + } + } } }, "400": { @@ -90,6 +100,17 @@ "description": "Places a mark on the board and retrieves the whole board and the winner (if any).", "tags": ["Gameplay"], "operationId": "put-square", + "parameters": [ + { + "name": "progressUrl", + "in": "header", + "description": "Progress URL that should be called if asynchronous response is returned", + "required": false, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -111,6 +132,17 @@ } } }, + "202": { + "description": "Mark operation has not completed. Use callback to check for progress", + "headers": { + "Location": { + "description": "Callback URL", + "schema": { + "type": "string" + } + } + } + }, "400": { "description": "The provided parameters are incorrect", "content": { @@ -140,7 +172,32 @@ { "user2AppOauth": ["board:write"] } - ] + ], + "callbacks": { + "statusCallback": { + "{$request.header.progressUrl}": { + "post": { + "summary": "Status of mark operation", + "description": "Provides the status of the mark operation", + "operationId": "markOperationCallback", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + }, + "responses": { + "200": { + "description": "Mark operation status received" + } + } + } + } + } + } } } }, @@ -257,5 +314,26 @@ } } } + }, + "webhooks": { + "markStatus": { + "post": { + "summary": "Status of mark operation", + "description": "Provides the status of the mark operation on completion", + "operationId": "markOperationWebhook", + "responses": { + "200": { + "description": "Mark operation has completed successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + } + } + } + } } } diff --git a/examples/v3.2/3.2-query-example.json b/examples/v3.2/3.2-query-example.json index 41a8965..b6b6c20 100644 --- a/examples/v3.2/3.2-query-example.json +++ b/examples/v3.2/3.2-query-example.json @@ -8,7 +8,7 @@ "/flights/search": { "query": { "summary": "Search flights with complex criteria", - "description": "Uses the HTTP QUERY method to perform a safe, idempotent flight search with filters that are too complex for a URL query string.", + "description": "Uses the HTTP QUERY method to perform a safe, idempotent flight search with filters that are too complex for a URL query string.\n", "operationId": "searchFlights", "requestBody": { "required": true, @@ -42,12 +42,7 @@ }, "cabinClass": { "type": "string", - "enum": [ - "economy", - "premium-economy", - "business", - "first" - ], + "enum": ["economy", "premium-economy", "business", "first"], "example": "business" }, "nonStopOnly": { @@ -55,11 +50,7 @@ "example": true } }, - "required": [ - "origin", - "destination", - "departureDate" - ] + "required": ["origin", "destination", "departureDate"] } } } diff --git a/examples/v3.2/3.2-tags-example.json b/examples/v3.2/3.2-tags-example.json index e56fb0f..728498b 100644 --- a/examples/v3.2/3.2-tags-example.json +++ b/examples/v3.2/3.2-tags-example.json @@ -1,73 +1,65 @@ { - "openapi": "3.2.0", - "info": { - "title": "Flight API", - "version": "1.0.0" + "openapi": "3.2.0", + "info": { + "title": "Flight API", + "version": "1.0.0" + }, + "tags": [ + { + "name": "flights", + "summary": "Flights", + "description": "Core flight operations", + "kind": "nav" }, - "tags": [ - { - "name": "flights", - "summary": "Flights", - "description": "Core flight operations", - "kind": "nav" - }, - { - "name": "international", - "summary": "International", - "description": "Flights that cross country borders", - "parent": "flights", - "kind": "nav" - }, - { - "name": "domestic", - "summary": "Domestic", - "description": "Flights within a single country", - "parent": "flights", - "kind": "nav" - }, - { - "name": "delays", - "summary": "Delays", - "description": "Information about flight delays", - "kind": "badge", - "externalDocs": { - "description": "Delay compensation policies", - "url": "https://docs.example.com/delay-policies" - } - } - ], - "paths": { - "/flights": { - "get": { - "tags": [ - "flights" - ], - "summary": "List all flights" - } - }, - "/flights/international": { - "get": { - "tags": [ - "international" - ], - "summary": "List international flights" - } - }, - "/flights/domestic": { - "get": { - "tags": [ - "domestic" - ], - "summary": "List domestic flights" - } - }, - "/flights/delayed": { - "get": { - "tags": [ - "delays" - ], - "summary": "Get delayed flights" - } - } + { + "name": "international", + "summary": "International", + "description": "Flights that cross country borders", + "parent": "flights", + "kind": "nav" + }, + { + "name": "domestic", + "summary": "Domestic", + "description": "Flights within a single country", + "parent": "flights", + "kind": "nav" + }, + { + "name": "delays", + "summary": "Delays", + "description": "Information about flight delays", + "kind": "badge", + "externalDocs": { + "description": "Delay compensation policies", + "url": "https://docs.example.com/delay-policies" + } + } + ], + "paths": { + "/flights": { + "get": { + "tags": ["flights"], + "summary": "List all flights" + } + }, + "/flights/international": { + "get": { + "tags": ["international"], + "summary": "List international flights" + } + }, + "/flights/domestic": { + "get": { + "tags": ["domestic"], + "summary": "List domestic flights" + } + }, + "/flights/delayed": { + "get": { + "tags": ["delays"], + "summary": "Get delayed flights" + } } -} \ No newline at end of file + } +}