-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
Description
As an HTTP API docs writer,
I want to have web-socket resource .rst directives,
So I can doc a web-socket resource endpoint, just like I doc HTTP resource endpoint.
As of today, doc of web-socket API resource endpoints is not out-of-the-box of this extension.
For HTTP APIs, there is a possibility to have web-socket resource endpoints (additional to the HTTP resource endpoints).
Suggested directives syntax:
.. http:ws:: <url>
:server-event <event-name>:
:client-event <event-name>:
Example, for a web-socket API endpoint (in the light of the this extension official docs):
.. http:ws:: /users/(int:user_id)/posts/
Returns a post that the user (`user_id`) just added.
:reqheader cookie:
:server-event add:
**Example response**:
.. sourcecode:: json
{
"post_id": 54321,
"author_id": 123,
"tags": ["server", "web"],
"subject": "Tomcat doesn't work"
}
:statuscode 401: user is not authorized.
Reactions are currently unavailable
