Skip to content

Comments

fix!: Migrate Ktor extension functions from Routing to Route (#237)#531

Merged
kpavlov merged 4 commits intomainfrom
kpavlov/fix-routing-237
Feb 18, 2026
Merged

fix!: Migrate Ktor extension functions from Routing to Route (#237)#531
kpavlov merged 4 commits intomainfrom
kpavlov/fix-routing-237

Conversation

@kpavlov
Copy link
Contributor

@kpavlov kpavlov commented Feb 17, 2026

Migrate Ktor extension functions from Routing to Route (#237)

  • Replaced Routing with Route in MCP-related functions for better composability in nested contexts.
  • Updated tests to verify compatibility with nested routes and subpaths.
  • Deprecated legacy signatures and removed redundant overloads.

How Has This Been Tested?

Unit test

Breaking Changes

Routing.mcp(...) extension was replaced with Route.mcp(...)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Based on #314 by @IainHull but that PR is too outdated.

@kpavlov kpavlov added the bugfix Something was fixed 🎉 label Feb 17, 2026
@kpavlov kpavlov changed the title refactor: Migrate Ktor extension functions from Routing to Route (#237) fix: Migrate Ktor extension functions from Routing to Route (#237) Feb 17, 2026
@kpavlov kpavlov changed the title fix: Migrate Ktor extension functions from Routing to Route (#237) fix!: Migrate Ktor extension functions from Routing to Route (#237) Feb 17, 2026
@kpavlov kpavlov added this to the 0.9 milestone Feb 17, 2026
@kpavlov
Copy link
Contributor Author

kpavlov commented Feb 17, 2026

see #314

@kpavlov kpavlov marked this pull request as ready for review February 17, 2026 16:38
@kpavlov kpavlov marked this pull request as draft February 17, 2026 16:40
@kpavlov kpavlov requested review from devcrocod, e5l and tiginamaria and removed request for devcrocod, e5l and tiginamaria February 18, 2026 06:18
…237)

- Replaced `Routing` with `Route` in MCP-related functions for better composability in nested contexts.
- Updated tests to verify compatibility with nested routes and subpaths.
- Deprecated legacy signatures and removed redundant overloads.
- Updated tests kotlin-sdk-server module
@kpavlov kpavlov force-pushed the kpavlov/fix-routing-237 branch from dc3184a to 4fdf469 Compare February 18, 2026 07:54
…nd `mcpStreamableHttp`

- Introduced `path` parameter for `mcpStatelessStreamableHttp` and `mcpStreamableHttp` functions, allowing flexibility in route configuration.
- Refactored integration tests to use the new path parameter.
- Replaced hardcoded routes with configurable paths in Ktor server implementation.
@kpavlov kpavlov force-pushed the kpavlov/fix-routing-237 branch from 4fdf469 to 8405572 Compare February 18, 2026 13:24
- Refactored `KtorRoutingExtensionsTest` to `KtorRouteExtensionsTest`.
- Added validation to ensure the SSE plugin is installed before registering MCP routes.
- Introduced `AbstractKtorExtensionsTest` with common utilities for MCP endpoint testing.
@kpavlov kpavlov force-pushed the kpavlov/fix-routing-237 branch from 8405572 to 0d3cdae Compare February 18, 2026 13:33
- Added usage examples for `mcpStreamableHttp` and `mcp` Ktor helpers.
@kpavlov kpavlov force-pushed the kpavlov/fix-routing-237 branch from f1d18e3 to 664d56c Compare February 18, 2026 13:55
@kpavlov kpavlov marked this pull request as ready for review February 18, 2026 14:21
Copy link
Contributor

@devcrocod devcrocod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kpavlov kpavlov merged commit bb79e20 into main Feb 18, 2026
13 checks passed
@kpavlov kpavlov deleted the kpavlov/fix-routing-237 branch February 18, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something was fixed 🎉

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants