fastmcp/tests/utilities/openapi
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
..
__init__.py Add openapi parsing utilities 2025-04-08 21:11:52 -04:00
conftest.py Add openapi parsing utilities 2025-04-08 21:11:52 -04:00
test_openapi.py Make sure tests are atomic 2025-06-04 10:29:25 -04:00
test_openapi_advanced.py Fix external schema reference handling in OpenAPI parser 2025-06-25 21:25:06 -04:00
test_openapi_fastapi.py Pass client headers through to OpenAPI client 2025-05-23 12:38:24 -04:00