docs: remove experimental chat API from generated docs (#22897)

The chat API is experimental (behind `ExperimentAgents`) and not ready
for public documentation yet. This removes swagger annotations from the
chat handlers so they no longer appear in the generated API reference at
https://coder.com/docs/reference/api/chats.

## Changes
- Remove `@swagger` annotations from 5 chat handlers in
`coderd/chats.go`
- Regenerate `coderd/apidoc/swagger.json` and `docs.go`
- Delete `docs/reference/api/chats.md`
- Remove Chats entry from `docs/manifest.json`
This commit is contained in:
Cian Johnston
2026-03-10 15:04:08 +00:00
committed by GitHub
parent f5e5bd2d64
commit 12bdbc693f
6 changed files with 0 additions and 564 deletions
-188
View File
@@ -481,185 +481,6 @@ const docTemplate = `{
}
}
},
"/chats/files": {
"post": {
"security": [
{
"CoderSessionToken": []
}
],
"consumes": [
"application/octet-stream"
],
"produces": [
"application/json"
],
"tags": [
"Chats"
],
"summary": "Upload a chat file",
"operationId": "upload-chat-file",
"parameters": [
{
"type": "string",
"description": "Content-Type must be an image type (image/png, image/jpeg, image/gif, image/webp)",
"name": "Content-Type",
"in": "header",
"required": true
},
{
"type": "string",
"format": "uuid",
"description": "Organization ID",
"name": "organization",
"in": "query",
"required": true
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/codersdk.UploadChatFileResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"413": {
"description": "Request Entity Too Large",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
}
}
}
},
"/chats/files/{file}": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"tags": [
"Chats"
],
"summary": "Get a chat file",
"operationId": "get-chat-file",
"parameters": [
{
"type": "string",
"format": "uuid",
"description": "File ID",
"name": "file",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
}
}
}
},
"/chats/{chat}/archive": {
"post": {
"tags": [
"Chats"
],
"summary": "Archive a chat",
"operationId": "archive-chat",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/chats/{chat}/git/watch": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"tags": [
"Chats"
],
"summary": "Watch git changes for a chat.",
"operationId": "watch-chat-git",
"parameters": [
{
"type": "string",
"format": "uuid",
"description": "Chat ID",
"name": "chat",
"in": "path",
"required": true
}
],
"responses": {
"101": {
"description": "Switching Protocols"
}
}
}
},
"/chats/{chat}/unarchive": {
"post": {
"tags": [
"Chats"
],
"summary": "Unarchive a chat",
"operationId": "unarchive-chat",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/connectionlog": {
"get": {
"security": [
@@ -20456,15 +20277,6 @@ const docTemplate = `{
}
}
},
"codersdk.UploadChatFileResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
}
},
"codersdk.UploadResponse": {
"type": "object",
"properties": {
-174
View File
@@ -410,171 +410,6 @@
}
}
},
"/chats/files": {
"post": {
"security": [
{
"CoderSessionToken": []
}
],
"consumes": ["application/octet-stream"],
"produces": ["application/json"],
"tags": ["Chats"],
"summary": "Upload a chat file",
"operationId": "upload-chat-file",
"parameters": [
{
"type": "string",
"description": "Content-Type must be an image type (image/png, image/jpeg, image/gif, image/webp)",
"name": "Content-Type",
"in": "header",
"required": true
},
{
"type": "string",
"format": "uuid",
"description": "Organization ID",
"name": "organization",
"in": "query",
"required": true
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/codersdk.UploadChatFileResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"413": {
"description": "Request Entity Too Large",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
}
}
}
},
"/chats/files/{file}": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"tags": ["Chats"],
"summary": "Get a chat file",
"operationId": "get-chat-file",
"parameters": [
{
"type": "string",
"format": "uuid",
"description": "File ID",
"name": "file",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
}
}
}
},
"/chats/{chat}/archive": {
"post": {
"tags": ["Chats"],
"summary": "Archive a chat",
"operationId": "archive-chat",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/chats/{chat}/git/watch": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"tags": ["Chats"],
"summary": "Watch git changes for a chat.",
"operationId": "watch-chat-git",
"parameters": [
{
"type": "string",
"format": "uuid",
"description": "Chat ID",
"name": "chat",
"in": "path",
"required": true
}
],
"responses": {
"101": {
"description": "Switching Protocols"
}
}
}
},
"/chats/{chat}/unarchive": {
"post": {
"tags": ["Chats"],
"summary": "Unarchive a chat",
"operationId": "unarchive-chat",
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/connectionlog": {
"get": {
"security": [
@@ -18764,15 +18599,6 @@
}
}
},
"codersdk.UploadChatFileResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
}
},
"codersdk.UploadResponse": {
"type": "object",
"properties": {
-43
View File
@@ -432,14 +432,6 @@ func (api *API) getChat(rw http.ResponseWriter, r *http.Request) {
})
}
// @Summary Watch git changes for a chat.
// @ID watch-chat-git
// @Security CoderSessionToken
// @Tags Chats
// @Param chat path string true "Chat ID" format(uuid)
// @Success 101
// @Router /chats/{chat}/git/watch [get]
//
// EXPERIMENTAL: this endpoint is experimental and is subject to change.
//
//nolint:revive // HTTP handler writes to ResponseWriter.
@@ -588,11 +580,6 @@ proxyLoop:
_ = clientStream.Close(websocket.StatusGoingAway)
}
// @Summary Archive a chat
// @ID archive-chat
// @Tags Chats
// @Success 204
// @Router /chats/{chat}/archive [post]
func (api *API) archiveChat(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
chat := httpmw.ChatParam(r)
@@ -624,11 +611,6 @@ func (api *API) archiveChat(rw http.ResponseWriter, r *http.Request) {
rw.WriteHeader(http.StatusNoContent)
}
// @Summary Unarchive a chat
// @ID unarchive-chat
// @Tags Chats
// @Success 204
// @Router /chats/{chat}/unarchive [post]
func (api *API) unarchiveChat(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
chat := httpmw.ChatParam(r)
@@ -2333,20 +2315,6 @@ func (api *API) resolvedChatSystemPrompt(ctx context.Context) string {
return chatd.DefaultSystemPrompt
}
// @Summary Upload a chat file
// @ID upload-chat-file
// @Security CoderSessionToken
// @Accept application/octet-stream
// @Produce json
// @Tags Chats
// @Param Content-Type header string true "Content-Type must be an image type (image/png, image/jpeg, image/gif, image/webp)"
// @Param organization query string true "Organization ID" format(uuid)
// @Success 201 {object} codersdk.UploadChatFileResponse
// @Failure 400 {object} codersdk.Response
// @Failure 401 {object} codersdk.Response
// @Failure 413 {object} codersdk.Response
// @Failure 500 {object} codersdk.Response
// @Router /chats/files [post]
func (api *API) postChatFile(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
apiKey := httpmw.APIKey(r)
@@ -2473,17 +2441,6 @@ func (api *API) postChatFile(rw http.ResponseWriter, r *http.Request) {
})
}
// @Summary Get a chat file
// @ID get-chat-file
// @Security CoderSessionToken
// @Tags Chats
// @Param file path string true "File ID" format(uuid)
// @Success 200
// @Failure 400 {object} codersdk.Response
// @Failure 401 {object} codersdk.Response
// @Failure 404 {object} codersdk.Response
// @Failure 500 {object} codersdk.Response
// @Router /chats/files/{file} [get]
func (api *API) chatFileByID(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()