File tree Expand file tree Collapse file tree 4 files changed +19
-10
lines changed Expand file tree Collapse file tree 4 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 98
98
get_streamable_http_session ,
99
99
get_tag_service ,
100
100
get_tool_service ,
101
- cors_origins ,
102
101
)
103
102
104
103
# middleware imports
Original file line number Diff line number Diff line change 12
12
class VersioningConfig :
13
13
"""
14
14
Configuration class for API versioning and experimental access control.
15
-
16
- This class centralizes settings for handling legacy API paths,
17
- deprecation warnings, and access to experimental features. It allows
15
+ This class centralizes settings for handling legacy API paths,
16
+ deprecation warnings, and access to experimental features. It allows
18
17
middleware and routers to enforce versioning rules consistently.
19
18
20
19
Attributes:
@@ -37,7 +36,6 @@ class VersioningConfig:
37
36
pass
38
37
"""
39
38
40
-
41
39
# 0.6.0 settings
42
40
enable_legacy_support : bool = True # Still serve legacy in 0.6.0
43
41
enable_deprecation_headers : bool = True # Loud warnings
Original file line number Diff line number Diff line change 1
- """Current router imports for MCP Gateway.
1
+ # -*- coding: utf-8 -*-
2
+ """MCP Gateway Current Routers - Current API version router imports.
2
3
3
- Provides access to v1 routers and utilities for the current API version.
4
+ Copyright 2025
5
+ SPDX-License-Identifier: Apache-2.0
6
+
7
+ Provides access to routers and utilities for the current API version.
4
8
"""
5
9
6
10
# For test router instances -> tests/unit/mcpgateway/test_coverage_push
13
17
from mcpgateway .routers .v1 .prompts import prompt_router
14
18
from mcpgateway .routers .v1 .gateway import gateway_router
15
19
20
+ _ = protocol_router
21
+ _ = resource_router
22
+ _ = root_router
23
+ _ = tool_router
24
+ _ = export_import_router
25
+ _ = prompt_router
26
+ _ = gateway_router
27
+
16
28
# For utility router
17
29
from mcpgateway .routers .v1 .protocol import initialize
18
30
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def setup_v1_routes(app: FastAPI) -> None:
68
68
logger .debug ("OAuth router not available" )
69
69
70
70
# Include reverse proxy router if enabled
71
- try :
71
+ try :
72
72
app .include_router (reverse_proxy_router )
73
73
logger .info ("Reverse proxy router included" )
74
74
except ImportError :
@@ -88,7 +88,7 @@ def setup_experimental_routes(_app: FastAPI) -> None:
88
88
"""Configure experimental API routes.
89
89
90
90
Args:
91
- app : FastAPI application instance to configure
91
+ _app : FastAPI application instance to configure
92
92
"""
93
93
# Register experimental routers here
94
94
@@ -97,7 +97,7 @@ def setup_legacy_deprecation_routes(_app: FastAPI) -> None:
97
97
"""Configure legacy route deprecation warnings.
98
98
99
99
Args:
100
- app : FastAPI application instance to configure
100
+ _app : FastAPI application instance to configure
101
101
"""
102
102
103
103
# Legacy routes are now handled by middleware instead of conflicting endpoints
You can’t perform that action at this time.
0 commit comments