-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Add support for server sent events
This includes a proposal to swagger-spec repo for an extension.
Server sent events are a specific mime type, currently in swagger 2.0 there is no support for different responses based on request criteria like content type.
In this proposal the idea is that the only possible response from that endpoint is a sse-eventstream
paths:
/:
get:
produces: ["text/event-stream"]
responses:
default:
description: example of defining events for sse
schema:
type: object
x-events:
added:
type: object
properties:
message:
type: string
createdAt:
type: string
format: date-time
updated:
type: object
properties:
previous:
type: string
newValue:
type: string
updatedAt:
type: string
format: date-timerelated: OAI/OpenAPI-Specification#396
xescugc, E14, SokichiFujita, Arul-, xornet-sl and 2 more