Deadwood-ai / deadwood-api

Main FastAPI application for the deadwood backend
GNU General Public License v3.0
0 stars 0 forks source link

Implement Upsert metadata models #5

Closed mmaelicke closed 1 month ago

mmaelicke commented 1 month ago

This PR implements the correct usage of the upsert functionality.

You can PUT to the /datasets/<dataset_id>/metadata and the route will merge the full Metadata record along with the payload the user provided. This way, pydantic will complain if the payload does not contain all needed information if there is no metadata in the database, but will not complain if there is already metadata and an update operation is performed.