Skip to content

Commit c89c4cd

Browse files
committed
fix: openapi working in sub-app
1 parent 38fe9f6 commit c89c4cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class A2AFastAPI(FastAPI):
3535
@override
3636
def openapi(self) -> dict[str, Any]:
3737
openapi_schema = super().openapi()
38-
if not self.a2a_components_added:
38+
if not self._a2a_components_added:
3939
a2a_request_schema = A2ARequest.model_json_schema(
4040
ref_template='#/components/schemas/{model}'
4141
)
@@ -45,7 +45,7 @@ def openapi(self) -> dict[str, Any]:
4545
).setdefault('schemas', {})
4646
component_schemas.update(defs)
4747
component_schemas['A2ARequest'] = a2a_request_schema
48-
self.a2a_components_added = True
48+
self._a2a_components_added = True
4949
return openapi_schema
5050

5151

0 commit comments

Comments
 (0)