henry3260 commented on code in PR #68854:
URL: https://github.com/apache/airflow/pull/68854#discussion_r4338729293


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/providers.py:
##########
@@ -34,3 +36,140 @@ class ProviderCollectionResponse(BaseModel):
 
     providers: list[ProviderResponse]
     total_entries: int
+
+
+# The models below mirror the provider metadata structure defined in
+# airflow-core/src/airflow/provider_info.schema.json (deprecated keys 
excluded). Keys the
+# models do not declare are dropped from the response, so new metadata keys 
need a field here.
+
+
+class ProviderIntegrationInfo(BaseModel):
+    """Integration provided by a provider."""
+
+    integration_name: str = Field(alias="integration-name")

Review Comment:
   > With `alias=`, the response is serialized with these keys too, so this 
would be the first kebab-case field names in the public API (everything else is 
snake_case). Would `validation_alias="integration-name"` (here and on the other 
aliased fields) work, so the API reads `provider.yaml` keys but returns 
snake_case?
   
   Good catch as well



-- 
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]

Reply via email to