Skip to content

Commit

Permalink
Document response type for event stream
Browse files Browse the repository at this point in the history
Override the FastAPI default of application/json and document in
the OpenAPI schema that the events route returns text/event-stream.
  • Loading branch information
rra committed Jan 3, 2024
1 parent a18cced commit f6bdfb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controller/src/controller/handlers/labs.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ async def delete_user_lab(
" succeeds or fails."
),
responses={
200: {
"content": {"text/event-stream": {}},
"description": "Event stream for lab spawn",
},
403: {"description": "Forbidden", "model": ErrorModel},
404: {"description": "Lab not found", "model": ErrorModel},
},
Expand Down

0 comments on commit f6bdfb8

Please sign in to comment.