mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
Fix broken code examples in docs (#3869)
* Fix broken code examples in docs - Tag error output blocks as ```text instead of ```python (anthropic, openai integration docs + v2 mirrors) - Quote unquoted URL in Descope config example (+ v2 mirror) - Fix GoogleGenAISamplingHandler → GoogleGenaiSamplingHandler casing in sampling docs - Fix import path: handlers.GoogleGenaiSamplingHandler → handlers.google_genai.GoogleGenaiSamplingHandler in v3-features 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix remaining broken doc examples and add skip tags for false positives - BearerTokenAuth → StaticTokenVerifier in deployment/http.mdx - providers.oauth → server.auth import in authentication.mdx - ListToolsNext → updated list_tools API in v3-features.mdx - OAuthClientProvider → OAuth in v2/storage-backends.mdx - Add test="skip" for upgrade guides, contrib placeholders, f-string backticks 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Ratchet doc example baselines to zero All 1444 examples now pass syntax and import checks. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add pytest-examples dev dep, fix client_id in StaticTokenVerifier example, commit missed openapi fixes - Add pytest-examples to dev dependencies (fixes CI ModuleNotFoundError) - Include required client_id in StaticTokenVerifier token payload - Commit previously unstaged HTTPRoute import fixes in openapi.mdx 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update deprecated import paths across docs - fastmcp.server.openapi → fastmcp.server.providers.openapi - fastmcp.server.proxy → fastmcp.server.providers.proxy - fastmcp.server.apps → fastmcp.apps - Tag upgrade guide "Before" examples with test="skip" 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d6b55c0b2f
commit
901453902f
30 changed files with 337 additions and 72 deletions
|
|
@ -264,7 +264,7 @@ auth = GitHubProvider(
|
|||
|
||||
The deprecated WebSocket client transport has been removed. Use `StreamableHttpTransport` instead:
|
||||
|
||||
```python
|
||||
```python test="skip"
|
||||
# Before
|
||||
from fastmcp.client.transports import WSTransport
|
||||
transport = WSTransport("ws://localhost:8000/ws")
|
||||
|
|
@ -357,7 +357,7 @@ main.mount(subserver)
|
|||
|
||||
The proxy and OpenAPI modules have moved under `providers` to reflect v3's provider-based architecture:
|
||||
|
||||
```python
|
||||
```python test="skip"
|
||||
# Deprecated
|
||||
from fastmcp.server.proxy import FastMCPProxy
|
||||
from fastmcp.server.openapi import FastMCPOpenAPI
|
||||
|
|
@ -369,7 +369,7 @@ from fastmcp.server.providers.openapi import OpenAPIProvider
|
|||
|
||||
`FastMCPOpenAPI` itself is deprecated — use `FastMCP` with an `OpenAPIProvider` instead:
|
||||
|
||||
```python
|
||||
```python test="skip"
|
||||
# Deprecated
|
||||
from fastmcp.server.openapi import FastMCPOpenAPI
|
||||
server = FastMCPOpenAPI(spec, client)
|
||||
|
|
@ -408,7 +408,7 @@ proxy = create_proxy("http://example.com/mcp")
|
|||
|
||||
The experimental OpenAPI parser is now standard. Update imports:
|
||||
|
||||
```python
|
||||
```python test="skip"
|
||||
# Before
|
||||
from fastmcp.experimental.server.openapi import FastMCPOpenAPI
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue