diff --git a/README.md b/README.md index 96e67ce1..466f5ab8 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ This repository contains the specifications for each AsyncAPI protocol binding. * [NATS binding](./nats) * [Pulsar](./pulsar) * [Redis binding](./redis) +* [Server-Sent Events binding](./sse) * [SNS binding](./sns) * [Solace binding](./solace) * [SQS binding](./sqs) diff --git a/sse/README.md b/sse/README.md new file mode 100644 index 00000000..999eddf9 --- /dev/null +++ b/sse/README.md @@ -0,0 +1,53 @@ +# Server Sent Events Bindings + +This document defines how to describe Server Sent Events-specific information on AsyncAPI. + +See the [Server-Sent Events protocol specification][protocolSpecification]. + +Server-Sent Events requires `http` protocol, so the SSE [Message Binding Object](#message) below is appropriate for AsyncAPI Servers with protocol `http` or `https`. + + + +## Version + +Current version is `0.1.0`. + + + + +## Server Binding Object + +This object MUST NOT contain any properties. Its name is reserved for future use. + + + + +## Channel Binding Object + +This object MUST NOT contain any properties. Its name is reserved for future use. + + + + +## Operation Binding Object + +This object MUST NOT contain any properties. Its name is reserved for future use. + + + + +## Message Binding Object + +This object contains information about the message representation in SSE. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +`event` | string | Server-sent event type, typically `message`, to specify allowed SSE message types. | +`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed. + +This object MUST contain only the properties defined above. + + +[protocolSpecification]: https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events