bugraoz93 commented on code in PR #43102:
URL: https://github.com/apache/airflow/pull/43102#discussion_r1809255742
##########
airflow/api_fastapi/core_api/serializers/connections.py:
##########
@@ -24,19 +24,24 @@
from airflow.utils.log.secrets_masker import redact
-class ConnectionResponse(BaseModel):
+class ConnectionBase(BaseModel):
"""Connection serializer for responses."""
- connection_id: str = Field(serialization_alias="connection_id",
validation_alias="conn_id")
conn_type: str
- description: str | None
- host: str | None
- login: str | None
- schema_: str | None = Field(alias="schema")
- port: int | None
- extra: str | None
-
- @field_validator("extra", mode="before")
+ description: str | None = Field(default=None)
+ host: str | None = Field(default=None)
+ login: str | None = Field(default=None)
+ schema_: str | None = Field(None, alias="schema")
+ port: int | None = Field(default=None)
+ extra: str | None = Field(default=None)
+
+
+class ConnectionResponse(ConnectionBase):
Review Comment:
Hello @pierrejeambrun,
Thanks for the details! I forgot to add TLDR into my previous message (it
was an essay) my bad :sweat:
I saw the way along with tests and implemented everything similar to those.
Then this bugged me when I saw `legacy api` tests because I thought everything
in Public API would be backwards compatible. If we can do breaking changes, all
good.
I will convert the `update_mask` parameters again into `list[str]`. I can
document these changes into a `significant` fragment.
--
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]