mirror of
https://github.com/LukeHagar/openapi-types.git
synced 2025-12-06 04:20:29 +00:00
51 lines
854 B
TypeScript
51 lines
854 B
TypeScript
import type { Specification } from "../../3.1";
|
|
|
|
export const webhookExample: Specification = {
|
|
openapi: "3.1.0",
|
|
info: {
|
|
title: "Webhook Example",
|
|
version: "1.0.0",
|
|
},
|
|
webhooks: {
|
|
newPet: {
|
|
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",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|