-
Notifications
You must be signed in to change notification settings - Fork 66
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
Reuven
committed
Nov 3, 2021
1 parent
5911b12
commit df5619c
Showing
3 changed files
with
87 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
openapi: 3.1.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" | ||
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 |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
openapi: 3.1.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" | ||
responses: | ||
"200": | ||
description: Return a 200 status to indicate that the data was received successfully | ||
|
||
components: | ||
schemas: | ||
Pet: | ||
required: | ||
- id | ||
- name | ||
- nickname | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
tag: | ||
type: string |
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