Skip to content

Commit f3d5c04

Browse files
committed
fix: resolve pyright issue with openapi schema return type
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
1 parent fa94838 commit f3d5c04

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/a2a/server/apps/jsonrpc/fastapi_app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def openapi(self) -> dict[str, Any]:
5858
self.openapi_schema = json.loads(
5959
schema_file.read_text(encoding='utf-8')
6060
)
61-
return self.openapi_schema
61+
if self.openapi_schema:
62+
return self.openapi_schema
6263
except Exception: # noqa: BLE001
6364
logger.warning(
6465
"Could not load 'a2a.json' from 'a2a.types'. Falling back to auto-generation."

0 commit comments

Comments
 (0)