feat(coderd): add format option to inbox notifications watch endpoint (#17034)

This PR aims to allow clients to use different format for the title and
content of inbox notifications - on the watch endpoint.

This solution will help to have it working and formatted differently on
VSCode, WebUI ...
[Related to this issue](https://github.com/coder/internal/issues/523)
This commit is contained in:
Vincent Vielle
2025-03-21 16:41:13 +01:00
committed by GitHub
parent 0474888eb4
commit 82e37732ea
6 changed files with 128 additions and 17 deletions

17
coderd/apidoc/docs.go generated
View File

@ -1693,6 +1693,13 @@ const docTemplate = `{
"description": "Filter notifications by read status. Possible values: read, unread, all",
"name": "read_status",
"in": "query"
},
{
"type": "string",
"format": "uuid",
"description": "ID of the last notification from the current page. Notifications returned will be older than the associated one",
"name": "starting_before",
"in": "query"
}
],
"responses": {
@ -1757,6 +1764,16 @@ const docTemplate = `{
"description": "Filter notifications by read status. Possible values: read, unread, all",
"name": "read_status",
"in": "query"
},
{
"enum": [
"plaintext",
"markdown"
],
"type": "string",
"description": "Define the output format for notifications title and body.",
"name": "format",
"in": "query"
}
],
"responses": {