Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Data Models for Bulk Actions in Rest API (FastAPI) #45816

Closed
2 tasks done
bugraoz93 opened this issue Jan 20, 2025 · 1 comment · Fixed by #46033
Closed
2 tasks done

Unify Data Models for Bulk Actions in Rest API (FastAPI) #45816

bugraoz93 opened this issue Jan 20, 2025 · 1 comment · Fixed by #46033
Labels
area:API Airflow's REST/HTTP API area:core kind:feature Feature Requests

Comments

@bugraoz93
Copy link
Collaborator

bugraoz93 commented Jan 20, 2025

Description

Unify and use data models for Bulk Operations. The goal is to limit code duplication.

Also we can Leverage Union in Pydantic, and add a pydantic discriminator to the union on the action field to save time at the serialization time. The action field tells us what model to deserialize instead of using a left to right resolution.

Use case/motivation

To eliminate duplicate code fragments for similar purposes in bulk operations for models such as connections, pools and variables.

Related issues

#45601

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@potiuk
Copy link
Member

potiuk commented Jan 20, 2025

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:core kind:feature Feature Requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants