Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Require openapi-pydantic 0.6.0 so OpenAPI 3.1.2 specs load (#5647)

Joseph Bautista83581b85a49e
diff --git a/fastmcp_slim/pyproject.toml b/fastmcp_slim/pyproject.toml
index e93fe798e..dc4b12196 100644
--- a/fastmcp_slim/pyproject.toml
+++ b/fastmcp_slim/pyproject.toml
@@ -102,7 +102,7 @@ server = [
"jsonref>=1.1.0",
"jsonschema-path>=0.3.4",
"joserfc>=1.5.0",
- "openapi-pydantic>=0.5.1",
+ "openapi-pydantic>=0.6.0",
"packaging>=24.0",
"py-key-value-aio[filetree,keyring,memory]>=0.4.4,<0.5.0",
"pyperclip>=1.9.0",
diff --git a/tests/utilities/openapi/test_parser.py b/tests/utilities/openapi/test_parser.py
index a87f7605a..dfb78b5a2 100644
--- a/tests/utilities/openapi/test_parser.py
+++ b/tests/utilities/openapi/test_parser.py
@@ -52,6 +52,30 @@ class TestOpenAPIParser:
assert param.name == "id"
assert param.location == "path"
+ @pytest.mark.parametrize("openapi_version", ["3.1.0", "3.1.1", "3.1.2"])
+ def test_parse_every_openapi31_patch_version(self, openapi_version):
+ """Parse a minimal spec under every OpenAPI 3.1 patch version"""
+ spec = {
+ "openapi": openapi_version,
+ "info": {"title": "Example", "version": "1.0.0"},
+ "paths": {
+ "/ping": {
+ "get": {
+ "operationId": "ping",
+ "responses": {"200": {"description": "OK"}},
+ }
+ }
+ },
+ }
+
+ routes = parse_openapi_to_http_routes(spec)
+
+ assert len(routes) == 1
+ assert routes[0].path == "/ping"
+ assert routes[0].method == "GET"
+ assert routes[0].operation_id == "ping"
+ assert routes[0].openapi_version == openapi_version
+
def test_parse_collision_spec(self, collision_spec):
"""Test parsing spec with parameter collisions."""
routes = parse_openapi_to_http_routes(collision_spec)
diff --git a/uv.lock b/uv.lock
index b457bc61a..980564aaa 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1,10 +1,10 @@
version = 1
-revision = 3
+revision = 5
requires-python = ">=3.10"
resolution-markers = [
"python_full_version >= '3.15' and sys_platform == 'win32'",
- "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version >= '3.15' and sys_platform != 'win32'",
+ "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version == '3.14.*' and sys_platform != 'win32'",
"python_full_version == '3.13.*' and sys_platform == 'win32'",
"python_full_version == '3.13.*' and sys_platform != 'win32'",
@@ -20,17 +20,17 @@ exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for
exclude-newer-span = "P1W"
[options.exclude-newer-package]
+fastmcp = false
+fastmcp-remote = false
+fastmcp-slim = false
+mcp = false
mcp-types = false
prefab-ui = false
-pydocket = false
-pydantic-monty-runtime = false
+pydantic-monty = false
pydantic-monty-client = false
+pydantic-monty-runtime = false
+pydocket = false
uncalled-for = false
-fastmcp = false
-pydantic-monty = false
-mcp = false
-fastmcp-remote = false
-fastmcp-slim = false
[manifest]
members = [
@@ -62,8 +62,8 @@ version = "3.11.1"
source = { registry = "https://pypi.org/simple" }
resolution-markers = [
"python_full_version >= '3.15' and sys_platform == 'win32'",
- "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version >= '3.15' and sys_platform != 'win32'",
+ "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version == '3.14.*' and sys_platform != 'win32'",
"python_full_version == '3.13.*' and sys_platform == 'win32'",
"python_full_version == '3.13.*' and sys_platform != 'win32'",
@@ -1108,7 +1108,7 @@ requires-dist = [
{ name = "mcp", marker = "extra == 'server'", specifier = ">=2.0.0,<3.0.0" },
{ name = "mcp-types", specifier = ">=2.0.0,<3.0.0" },
{ name = "openai", marker = "extra == 'openai'", specifier = ">=1.102.0" },
- { name = "openapi-pydantic", marker = "extra == 'server'", specifier = ">=0.5.1" },
+ { name = "openapi-pydantic", marker = "extra == 'server'", specifier = ">=0.6.0" },
{ name = "opentelemetry-api", marker = "extra == 'client'", specifier = ">=1.28.0" },
{ name = "opentelemetry-api", marker = "extra == 'mcp'", specifier = ">=1.28.0" },
{ name = "opentelemetry-api", marker = "extra == 'server'", specifier = ">=1.28.0" },
@@ -1445,8 +1445,8 @@ version = "9.15.0"
source = { registry = "https://pypi.org/simple" }
resolution-markers = [
"python_full_version >= '3.15' and sys_platform == 'win32'",
- "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version >= '3.15' and sys_platform != 'win32'",
+ "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version == '3.14.*' and sys_platform != 'win32'",
"python_full_version == '3.13.*' and sys_platform == 'win32'",
"python_full_version == '3.13.*' and sys_platform != 'win32'",
@@ -1930,14 +1930,14 @@ wheels = [
[[package]]
name = "openapi-pydantic"
-version = "0.5.1"
+version = "0.6.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "pydantic" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz", hash = "sha256:ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d", size = 60892, upload-time = "2025-01-08T19:29:27.083Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/2b/32/0c9bd3e4e847cd6117b64dbef4cf810faa9cdbd6689323b811569cc8a1b8/openapi_pydantic-0.6.0.tar.gz", hash = "sha256:11f3ac6ad41521fc156381ec587246b0c0ecea523bd9565ed74d3e7fac9d91cd", size = 1667049, upload-time = "2026-10-02T12:20:00.508Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/12/cf/03675d8bd8ecbf4445504d8071adab19f5f993676795708e36402ab38263/openapi_pydantic-0.5.1-py3-none-any.whl", hash = "sha256:a3a09ef4586f5bd760a8df7f43028b60cafb6d9f61de2acba9574766255ab146", size = 96381, upload-time = "2025-01-08T19:29:25.275Z" },
+ { url = "https://files.pythonhosted.org/packages/31/57/9d3eb823a03c33e9d4c810e6a3276e3a6dc820a7fdc0961db2c04e613817/openapi_pydantic-0.6.0-py3-none-any.whl", hash = "sha256:8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3", size = 96931, upload-time = "2026-10-02T12:19:58.917Z" },
]
[[package]]
@@ -3201,8 +3201,8 @@ version = "2026.6.3"
source = { registry = "https://pypi.org/simple" }
resolution-markers = [
"python_full_version >= '3.15' and sys_platform == 'win32'",
- "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version >= '3.15' and sys_platform != 'win32'",
+ "python_full_version == '3.14.*' and sys_platform == 'win32'",
"python_full_version == '3.14.*' and sys_platform != 'win32'",
"python_full_version == '3.13.*' and sys_platform == 'win32'",
"python_full_version == '3.13.*' and sys_platform != 'win32'",