@@ -255,6 +255,29 @@ public OpenAPI buildModel() {
255255 .externalDocs (OASFactory .createObject (ExternalDocumentation .class )
256256 .description ("instructions for how to deploy this app" )
257257 .url ("https://github.com/microservices-api/oas3-airlines/blob/master/README.md" ))
258+ .addWebhook ("bookingEvent" , OASFactory .createPathItem ()
259+ .PUT (OASFactory .createOperation ()
260+ .summary ("Notifies that a booking has been created" )
261+ .requestBody (OASFactory .createRequestBody ()
262+ .content (OASFactory .createContent ()
263+ .addMediaType ("application/json" , OASFactory .createMediaType ()
264+ .schema (OASFactory .createSchema ()
265+ .ref ("#/components/schemas/Booking" )))))
266+ .responses (OASFactory .createAPIResponses ()
267+ .addAPIResponse ("204" , OASFactory .createAPIResponse ()
268+ .description (
269+ "Indicates that the creation event was processed successfully" ))))
270+ .DELETE (OASFactory .createOperation ()
271+ .summary ("Notifies that a booking has been deleted" )
272+ .requestBody (OASFactory .createRequestBody ()
273+ .content (OASFactory .createContent ()
274+ .addMediaType ("application/json" , OASFactory .createMediaType ()
275+ .schema (OASFactory .createSchema ()
276+ .ref ("#/components/schemas/Booking" )))))
277+ .responses (OASFactory .createAPIResponses ()
278+ .addAPIResponse ("204" , OASFactory .createAPIResponse ()
279+ .description (
280+ "Indicates that the deletion event was processed successfully" )))))
258281 .paths (OASFactory .createObject (Paths .class )
259282 .addPathItem ("/modelReader/airlines" , OASFactory .createObject (PathItem .class )
260283 .GET (OASFactory .createObject (Operation .class )
0 commit comments