pierrejeambrun commented on code in PR #62343:
URL: https://github.com/apache/airflow/pull/62343#discussion_r3130099366
##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/connections.py:
##########
@@ -78,12 +79,49 @@ class ConnectionCollectionResponse(BaseModel):
class ConnectionTestResponse(BaseModel):
- """Connection Test serializer for responses."""
+ """Connection Test serializer for synchronous test responses."""
status: bool
message: str
+class ConnectionTestRequestBody(StrictBaseModel):
+ """Request body for async connection test."""
+
+ connection_id: str
+ conn_type: str
+ host: str | None = None
+ login: str | None = None
+ schema_: str | None = Field(None, alias="schema")
+ port: int | None = None
+ password: str | None = None
+ extra: str | None = None
+ commit_on_success: bool = Field(
+ default=False,
+ description="If True, save or update the connection in the connection
table when the test succeeds.",
+ )
+ executor: str | None = None
Review Comment:
We probably want to validate the `executor` against the configured executors
list.
No need to do a full roundtrip if the executor isn't valid, we can just
reject at the API layer level with a 422
--
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]