Commit ad86210
authored
python fastapi openapi docs fix (#2957)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Ensure FastAPI WebApps respect mount paths by setting ASGI root_path
and add e2e tests validating OpenAPI JSON and Swagger UI endpoints.
>
> - **Python wrapper (`consumption_runner.py`)**:
> - Set ASGI scope `root_path` to the FastAPI WebApp `mount_path` to
correctly serve mounted routes (e.g., OpenAPI/docs).
> - **E2E Tests (`apps/framework-cli-e2e/test/templates.test.ts`)**:
> - Add FastAPI WebApp tests verifying OpenAPI JSON
(`/fastapi/openapi.json`) structure and presence of `/health` path.
> - Add test for interactive docs endpoint (`/fastapi/docs`).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d747c05. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 22fcd3d commit ad86210
File tree
2 files changed
+37
-1
lines changed- apps
- framework-cli-e2e/test
- framework-cli/src/framework/python/wrappers
2 files changed
+37
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1263 | 1263 | | |
1264 | 1264 | | |
1265 | 1265 | | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1266 | 1302 | | |
1267 | 1303 | | |
1268 | 1304 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
0 commit comments