pierrejeambrun commented on PR #43204:
URL: https://github.com/apache/airflow/pull/43204#issuecomment-2429239922

   I think we can just return the whole informtaion and don't bother filtering 
things out. For the front-end it is easier because you only manipulate 1 type 
for the returned DAG, DagRun, etc... You do not have different representation 
depending on the endpoint (private/public), which makes things easier to work 
with (fill/cast etc..).
   
   
   > Note: Most likely not needed here, but if you want to return a subpart of 
a model, the pydantic documentation explains it well, you can just define use 
the response_model, with a minimal model having only the fields that you need. 
https://fastapi.tiangolo.com/tutorial/response-model/#response_model-parameter. 
We would most likely not use a custom all optional `OptionalModel` for that.


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