Native support for Server-Sent Events and Streaming API endpoints
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- api, documentation
Research direction
Start by examining the SseEmitter and ResponseBodyEmitter return types and the proposed Spring Web Reactive types Flux and Observable. Define what generated documentation should cover for text/event-stream responses, including curl examples, non-closing connections, and possible JavaScript usage.
Written by the indexing model from the issue text.
Description
Maybe Spring REST Docs could support natively Server-Sent Events endpoints, as supported in Spring Framework 4.2+ thanks to SseEmitter type, and global Streaming API support based on ResponseBodyEmitter type.
I am not sure yet about what that support would be, but for example Spring REST Docs could recognize SseEmitter return types, and generate a snippet with a curl command with text/event-streammedia type, handle the fact that some SSE endpoints never closes the connection (handle a timeout but not as an error?), and eventually provide Javascript code that would help people to use that endpoint in their application.
This issue is also intended to prepare support for Spring Web Reactive, which will provide first class support for streaming API via handler methods returning types like Flux<Foo> or Observable<Foo>. And unlike SseEmitter and ResponseBodyEmitter, these types will carry more type information within their Generic type.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 731
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spring-projects/spring-restdocs
-
status: waiting-for-triage
Difficulty 5/5 Over a week Newbie friendliness 45/100
spring-projects/spring-restdocs#1026 · 2 comments ·
-
status: waiting-for-votes type: enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
spring-projects/spring-restdocs#1020 · 6 comments ·
-
type: enhancement
spring-projects/spring-restdocs#995 · 1 assignee ·
-
status: blocked status: waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
spring-projects/spring-restdocs#953 · 7 comments ·
-
type: enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in spring-projects/spring-restdocs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100