> Discover all available pages from the documentation index: https://mastra.zisheng.pro/llms.txt # 部署 OpenAPI 规范端点已迁移到 `/api/openapi.json`,`CloudflareDeployer` 配置也已更新为使用标准的 `wrangler.json` 属性名。 ## 已变更 ### OpenAPI 规范端点迁移到 `/api/openapi.json` OpenAPI 规范端点已从 `/openapi.json` 迁移到 `/api/openapi.json`,以与所有 Mastra 内置路由使用的 `/api` 前缀保持一致。 如果有脚本或 Tool 使用 OpenAPI 规范,请更新 URL: ```diff - GET /openapi.json + GET /api/openapi.json ``` ### `CloudflareDeployer` 使用标准 `wrangler.json` 属性名 `CloudflareDeployer` 构造函数现在接受标准的 `wrangler.json` 属性名,而不是自定义的驼峰命名变体。此变更让 deployer 与 Cloudflare 官方配置格式保持一致,并可使用所有 wrangler 配置选项。 已弃用字段会在运行时自动迁移并输出控制台警告,但你仍应更新代码以使用新的字段名。 ```diff const deployer = new CloudflareDeployer({ - projectName: 'my-worker', + name: 'my-worker', - d1Databases: [ + d1_databases: [ { binding: 'DB', database_name: 'my-db', database_id: 'xxx', }, ], - kvNamespaces: [ + kv_namespaces: [ { binding: 'KV', id: 'yyy', }, ], }); ``` `workerNamespace` 字段已移除,因为不再使用。 有关所有可用配置选项,请参阅 [Wrangler 配置文档](https://developers.cloudflare.com/workers/wrangler/configuration/)。