Support skip deprecated api
Describe your changes
Implemented automatic filtering of deprecated APIs by default in the API interface and documentation, addressing the issue raised in #179. This ensures only active APIs are displayed, streamlining the user experience and reducing the risk of using deprecated endpoints. No toggle option was added, as the default filtering behavior aligns with the most common use case.
Issue ticket number and link
Issue: https://github.com/tadata-org/fastapi_mcp/issues/179
Screenshots of the feature / bugfix
N/A (No screenshots provided in the issue, as it applies to API documentation and interfaces generically.)
Checklist before requesting a review
- [x] Added relevant tests
- [x] Run ruff & mypy
- [x] All tests pass
Codecov Report
:x: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| fastapi_mcp/openapi/convert.py | 50.00% | 2 Missing :warning: |
:loudspeaker: Thoughts on this report? Let us know!
@Edison-A-N While you're generally right to assume that deprecated APIs should be ignored by default, I would still prefer if it was parametrized with an ignore_deprecated flag (default to true). Plus, test coverage is needed
Yeah, thanks. I’ve updated FastApiMCP and added the ignore_deprecated parameter, along with the corresponding tests.