-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
170 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,170 @@ | ||
openapi: 3.1.0 | ||
openapi: "3.0.0" | ||
info: | ||
title: Webhook Example | ||
version: 1.0.0 | ||
# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components | ||
webhooks: | ||
# Each webhook needs a name | ||
newPet: | ||
# This is a Path Item Object, the only difference is that the request is initiated by the API provider | ||
post: | ||
requestBody: | ||
description: Information about a new pet in the system | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/Pet" | ||
title: Simple API overview | ||
version: 2.0.0 | ||
paths: | ||
/: | ||
get: | ||
operationId: listVersionsv2 | ||
summary: List API versions | ||
responses: | ||
"200": | ||
description: Return a 200 status to indicate that the data was received successfully | ||
|
||
components: | ||
schemas: | ||
Pet: | ||
required: | ||
- id | ||
- name | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
tag: | ||
type: string | ||
'200': | ||
description: |- | ||
200 response | ||
content: | ||
application/json: | ||
examples: | ||
foo: | ||
value: | ||
{ | ||
"versions": [ | ||
{ | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z", | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v2/", | ||
"rel": "self" | ||
} | ||
] | ||
}, | ||
{ | ||
"status": "EXPERIMENTAL", | ||
"updated": "2013-07-23T11:33:21Z", | ||
"id": "v3.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v3/", | ||
"rel": "self" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
'300': | ||
description: |- | ||
300 response | ||
content: | ||
application/json: | ||
examples: | ||
foo: | ||
value: | | ||
{ | ||
"versions": [ | ||
{ | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z", | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v2/", | ||
"rel": "self" | ||
} | ||
] | ||
}, | ||
{ | ||
"status": "EXPERIMENTAL", | ||
"updated": "2013-07-23T11:33:21Z", | ||
"id": "v3.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v3/", | ||
"rel": "self" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
/v2: | ||
get: | ||
operationId: getVersionDetailsv2 | ||
summary: Show API version details | ||
responses: | ||
'200': | ||
description: |- | ||
200 response | ||
content: | ||
application/json: | ||
examples: | ||
foo: | ||
value: | ||
{ | ||
"version": { | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z", | ||
"media-types": [ | ||
{ | ||
"base": "application/xml", | ||
"type": "application/vnd.openstack.compute+xml;version=2" | ||
}, | ||
{ | ||
"base": "application/json", | ||
"type": "application/vnd.openstack.compute+json;version=2" | ||
} | ||
], | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v2/", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", | ||
"type": "application/pdf", | ||
"rel": "describedby" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", | ||
"type": "application/vnd.sun.wadl+xml", | ||
"rel": "describedby" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", | ||
"type": "application/vnd.sun.wadl+xml", | ||
"rel": "describedby" | ||
} | ||
] | ||
} | ||
} | ||
'203': | ||
description: |- | ||
203 response | ||
content: | ||
application/json: | ||
examples: | ||
foo: | ||
value: | ||
{ | ||
"version": { | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z", | ||
"media-types": [ | ||
{ | ||
"base": "application/xml", | ||
"type": "application/vnd.openstack.compute+xml;version=2" | ||
}, | ||
{ | ||
"base": "application/json", | ||
"type": "application/vnd.openstack.compute+json;version=2" | ||
} | ||
], | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://23.253.228.211:8774/v2/", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", | ||
"type": "application/pdf", | ||
"rel": "describedby" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", | ||
"type": "application/vnd.sun.wadl+xml", | ||
"rel": "describedby" | ||
} | ||
] | ||
} | ||
} |