fastmcp/tests/utilities
Jeremiah Lowin 6584750667 Fix external schema reference handling in OpenAPI parser
Previously, external schema references (URLs) in OpenAPI schemas were
silently passed through and only failed during JSON schema validation
with confusing "failed to match exactly one schema" errors.

This change:
- Detects external references in _replace_ref_with_defs() and raises clear error messages
- Updates exception handlers to propagate external reference errors while preserving other error handling
- Adds comprehensive test coverage for external reference detection
- Provides helpful error messages explaining that FastMCP only supports local schema references

Fixes #926

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 21:25:06 -04:00
..
openapi Fix external schema reference handling in OpenAPI parser 2025-06-25 21:25:06 -04:00
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_cache.py Fix typing and static issues 2025-05-09 18:06:51 -04:00
test_inspect.py Fix event loop conflict in inspect CLI command 2025-06-21 20:04:39 -04:00
test_json_schema.py openapi: Improve pruning of unused defs 2025-06-20 14:34:41 -04:00
test_logging.py Only apply log config to FastMCP loggers 2025-04-14 15:45:05 -04:00
test_mcp_config.py Add transport handling for trailing slashes 2025-06-20 13:12:23 -04:00
test_tests.py Remove open-ended and server-specific settings 2025-06-07 20:20:04 -04:00
test_typeadapter.py Make the type checker less sad 2025-06-05 23:02:40 -05:00
test_types.py Add missing tests 2025-06-16 08:10:34 +02:00