pierrejeambrun commented on code in PR #43767:
URL: https://github.com/apache/airflow/pull/43767#discussion_r1832498624
##########
airflow/api_fastapi/execution_api/schemas.py:
##########
@@ -119,3 +119,30 @@ class TIHeartbeatInfo(BaseModel):
hostname: str
pid: int
+
+
+class ConnectionResponse(BaseModel):
+ """Connection serializer for responses."""
+
+ conn_id: str
+ conn_type: str
+ description: str | None
+ host: str | None
+ schema_: str | None = Field(alias="schema")
Review Comment:
90% of this schema is redundant with the one from the public API.
Should we factorize them with the same `Base`, or should we duplicate all ?
First intuition would be for factorization.
##########
airflow/api_fastapi/execution_api/schemas.py:
##########
Review Comment:
This file should be called serializers, or `model` (pydantic), `schema` is a
remnant of marshmallow legacy api, that we do not have anymore.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]