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