shahar1 commented on PR #46985:
URL: https://github.com/apache/airflow/pull/46985#issuecomment-2679414306

   > Pydantic is smart enough to cope with that automatically: 
https://docs.pydantic.dev/latest/concepts/fields/#mutable-default-values
   > 
   > But for reader clarity and to enforce good practice, an explicit 
`default_factory` seems more appropriate 👍.
   
   Thanks for the clarification!
   Ironically, the CI didn't like this change 😅
   ```yaml
   +++ b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml
   @@ -10429,7 +10429,6 @@ components:
            rendered_fields:
              type: object
              title: Rendered Fields
   -          default: {}
            trigger:
              anyOf:
              - $ref: '#/components/schemas/TriggerResponse'
   ```
   
   Not too harsh about it though, eespecially if it's already handled as you 
mention.


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