Tomi-1997 opened a new pull request, #58682:
URL: https://github.com/apache/airflow/pull/58682

   Closes: https://github.com/apache/airflow/issues/56427
   ## Problem
   When an Enum is used as a parameter in a DAG definition with no default 
value (or any Param, with no value or type), the field is rendered as a 
dictionary which might be confusing. 
   
   This is the trigger form's parameters with an enum with no default values, 
and an empty paramter.
   <img width="900" height="880" alt="before" 
src="https://github.com/user-attachments/assets/f64d5eba-cc39-4b0a-9352-d4294705634b";
 />
   
   ## Solution
   - Add 'null' to accepted enum types. (Complies with JSON schema validation)
   - Add a condition to return 'null' as the type, when a parameter's value is 
undefined
   
   Now the enum is a drop down, and the empty parameter is a string field
   <img width="900" height="540" alt="after" 
src="https://github.com/user-attachments/assets/e86eb015-d218-4089-a7e2-c61e2a4a32a1";
 />
   
   This solves the enum issue, and addresses null values, yet I am unsure if 
this should be the intended behavior when handling missing default values. 
Browsing the docs, Param either has default value, or a type defined.
   Anyway, I'm open to ideas!
   
   
   


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