jens-scheffler-bosch commented on issue #33923:
URL: https://github.com/apache/airflow/issues/33923#issuecomment-1701034592

   Question is what "everything" means in your case. In Jinja you can `{{ 
params.mylist | default([]) }}` and inside Python code it would be `for item in 
params.mylist or []: ...` if you require to loop w/o checking the content. Main 
purpose of typing validation is that you can trust submitted params before 
handling it in the code. If you field is not required you anyway need to take 
care to handle "missing data" for example if called via CLI or REST API.
   
   On the other hand if an empty list would be passed as `[]` to the DAG, 
validation for required fields would be harder. Then you need to add a 
`minItems` schema definition if you want to enforece that users add at least 
one item.. Makes the form validation much more complex, standard jQuery 
mechanisms for required fields are not working easily in this example.
   
   I'd prefer to keep it consistent that "missing data" is passed as 
`null`/`None` as it is stated in the docs currently. Otherwise we would need to 
define the empty handling different per type and document this.


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