Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 79 additions & 1 deletion examples/v3.1/tictactoe.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down Expand Up @@ -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"
}
}
}
}
}
}
}
}
},
Expand Down Expand Up @@ -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"
}
}
}
}
}
}
}
}
}
15 changes: 3 additions & 12 deletions examples/v3.2/3.2-query-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -42,24 +42,15 @@
},
"cabinClass": {
"type": "string",
"enum": [
"economy",
"premium-economy",
"business",
"first"
],
"enum": ["economy", "premium-economy", "business", "first"],
"example": "business"
},
"nonStopOnly": {
"type": "boolean",
"example": true
}
},
"required": [
"origin",
"destination",
"departureDate"
]
"required": ["origin", "destination", "departureDate"]
}
}
}
Expand Down
132 changes: 62 additions & 70 deletions examples/v3.2/3.2-tags-example.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}