From c1a7b968b4a514a126e76c549e2cce731261fea6 Mon Sep 17 00:00:00 2001 From: Joris Wouter Jonkers Date: Thu, 17 Sep 2026 18:47:24 +0200 Subject: [PATCH] chore(agents): deprecate the legacy Conversation endpoints First of three steps to move the renamed Conversation model onto /api/v1/conversations (#68). The contract gate refuses to see a path removed without notice: `api-path-removed-without-deprecation`. It raises nothing when a path already marked deprecated in the base spec disappears, and the workflow sets no grace period, so marking them now is what lets the next step delete them. No behaviour change. The handlers answer exactly as before; only the spec gains `deprecated: true`. --- .../web/ConversationController.kt | 12 ++++++++++++ .../infrastructure/web/MessageController.kt | 6 ++++++ client-spec/openapi/agents-api-client.json | 18 ++++++++++++------ client-spec/openapi/agents-api.json | 18 ++++++++++++------ 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/ConversationController.kt b/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/ConversationController.kt index 313bc49..880f070 100644 --- a/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/ConversationController.kt +++ b/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/ConversationController.kt @@ -26,6 +26,9 @@ class ConversationController( private val commandBus: CommandBus, private val getConversationQueryService: GetConversationQueryService, ) { + @Deprecated( + "Replaced by the Conversation surface backed by the renamed model (#68). Removed once nothing calls it.", + ) @PostMapping @ResponseStatus(HttpStatus.CREATED) fun create( @@ -45,6 +48,9 @@ class ConversationController( return ConversationResponse.from(created) } + @Deprecated( + "Replaced by the Conversation surface backed by the renamed model (#68). Removed once nothing calls it.", + ) @GetMapping("/{id}") fun getById( @PathVariable id: UUID, @@ -53,6 +59,9 @@ class ConversationController( return ConversationResponse.from(conversation) } + @Deprecated( + "Replaced by the Conversation surface backed by the renamed model (#68). Removed once nothing calls it.", + ) @DeleteMapping("/{id}") @ResponseStatus(HttpStatus.NO_CONTENT) fun archive( @@ -62,6 +71,9 @@ class ConversationController( commandBus.dispatch(ArchiveConversationCommand(conversationId = ConversationId(id), userId = userId)) } + @Deprecated( + "Replaced by the Conversation surface backed by the renamed model (#68). Removed once nothing calls it.", + ) @GetMapping fun listByUser( @RequestHeader("X-User-Id") userId: String, diff --git a/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/MessageController.kt b/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/MessageController.kt index 252b1fb..de1c4cb 100644 --- a/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/MessageController.kt +++ b/api/src/main/kotlin/com/jorisjonkers/personalstack/agents/infrastructure/web/MessageController.kt @@ -26,6 +26,9 @@ class MessageController( private val commandBus: CommandBus, private val getMessageQueryService: GetMessageQueryService, ) { + @Deprecated( + "Replaced by the Conversation surface backed by the renamed model (#68). Removed once nothing calls it.", + ) @PostMapping @ResponseStatus(HttpStatus.CREATED) fun send( @@ -52,6 +55,9 @@ class MessageController( return MessageResponse.from(saved) } + @Deprecated( + "Replaced by the Conversation surface backed by the renamed model (#68). Removed once nothing calls it.", + ) @GetMapping fun list( @PathVariable conversationId: UUID, diff --git a/client-spec/openapi/agents-api-client.json b/client-spec/openapi/agents-api-client.json index 05dad51..687f431 100644 --- a/client-spec/openapi/agents-api-client.json +++ b/client-spec/openapi/agents-api-client.json @@ -715,7 +715,8 @@ } } } - } + }, + "deprecated" : true }, "post" : { "tags" : [ "conversation-controller" ], @@ -749,7 +750,8 @@ } } } - } + }, + "deprecated" : true } }, "/api/v1/conversations/{conversationId}/messages" : { @@ -779,7 +781,8 @@ } } } - } + }, + "deprecated" : true }, "post" : { "tags" : [ "message-controller" ], @@ -821,7 +824,8 @@ } } } - } + }, + "deprecated" : true } }, "/api/v1/chat-sessions" : { @@ -1434,7 +1438,8 @@ } } } - } + }, + "deprecated" : true }, "delete" : { "tags" : [ "conversation-controller" ], @@ -1459,7 +1464,8 @@ "204" : { "description" : "No Content" } - } + }, + "deprecated" : true } }, "/api/v1/chat-sessions/{id}" : { diff --git a/client-spec/openapi/agents-api.json b/client-spec/openapi/agents-api.json index 24592c6..f36688d 100644 --- a/client-spec/openapi/agents-api.json +++ b/client-spec/openapi/agents-api.json @@ -715,7 +715,8 @@ } } } - } + }, + "deprecated" : true }, "post" : { "tags" : [ "conversation-controller" ], @@ -749,7 +750,8 @@ } } } - } + }, + "deprecated" : true } }, "/api/v1/conversations/{conversationId}/messages" : { @@ -779,7 +781,8 @@ } } } - } + }, + "deprecated" : true }, "post" : { "tags" : [ "message-controller" ], @@ -821,7 +824,8 @@ } } } - } + }, + "deprecated" : true } }, "/api/v1/chat-sessions" : { @@ -1434,7 +1438,8 @@ } } } - } + }, + "deprecated" : true }, "delete" : { "tags" : [ "conversation-controller" ], @@ -1459,7 +1464,8 @@ "204" : { "description" : "No Content" } - } + }, + "deprecated" : true } }, "/api/v1/chat-sessions/{id}" : {