Skip to content

Commit

Permalink
Simplify to define Message Binding Object only and use http server pr…
Browse files Browse the repository at this point in the history
…otocol
  • Loading branch information
jfallows committed Jun 20, 2024
1 parent 75bc30a commit fce8154
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions sse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This document defines how to describe Server Sent Events-specific information on

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 Servers with protocol `http`.

<a name="version"></a>

## Version
Expand All @@ -22,17 +24,8 @@ This object MUST NOT contain any properties. Its name is reserved for future use

## Channel Binding Object

When using Server Sent Events, the channel represents a single logical message stream flowing from server to client.

##### Fixed Fields

Field Name | Type | Description
---|:---:|---
<a name="operationBindingObjectQuery"></a>`query` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | A Schema object containing the definitions for each query parameter. This schema MUST be of type `object` and have a `properties` key.
<a name="operationBindingObjectHeaders"></a>`headers` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | A Schema object containing the definitions of the HTTP headers to use when establishing the request. This schema MUST be of type `object` and have a `properties` key.
<a name="operationBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.
This object MUST NOT contain any properties. Its name is reserved for future use.

This object MUST contain only the properties defined above.

<a name="operation"></a>

Expand All @@ -51,12 +44,10 @@ This object contains information about the message representation in SSE.

Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectEventType"></a>`event` | string | Server-sent event type, defaults to `message` if omitted, by the [SSE specification][protocolSpecification]. |
<a name="messageBindingObjectEventType"></a>`event` | string | Server-sent event type, typically `message`, to specify allowed SSE message types. |
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.


[schemaObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject
[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject
[protocolSpecification]: https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events

0 comments on commit fce8154

Please sign in to comment.