Commit 6ece7d5
committed
feat: Integrate Pydantic v2 compatibility patches into ADK web server
- Import patch_types_for_pydantic_v2 and create_robust_openapi_function
- Apply compatibility patches before FastAPI app creation
- Replace default OpenAPI generation with robust error-handling version
- Add logging for patch application status and OpenAPI integration
- Ensures Swagger UI works correctly with Pydantic v2 by handling:
* MCP ClientSession schema generation issues
* types.GenericAlias compatibility problems
* httpx.Client schema generation errors
* Recursion errors in complex model schemas
This integration enables Swagger UI functionality while maintaining
backward compatibility and providing comprehensive error handling.1 parent a082159 commit 6ece7d5
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
686 | 687 | | |
687 | 688 | | |
688 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
689 | 697 | | |
690 | 698 | | |
691 | 699 | | |
| |||
698 | 706 | | |
699 | 707 | | |
700 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
701 | 713 | | |
702 | 714 | | |
703 | 715 | | |
| |||
0 commit comments