You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When posting to and getting from datasets, we can use the *ObsoleteDTO models from the OpenAPI schema. But datasets/fullquery uses the database schema for datasets. This means that with the ongoing migration, we cannot assign the result of a query to the same model as the result of GET datasets.
For example, the output DTO contains proposalId (singular) but the schema contains proposalIds (plural). So if we want to query by proposal, we need to pass proposalIds = ["..."] and get back an object that contains a field proposalIds. This cannot be assigned to a model generated from the DTO. Or with the changes proposed in SciCatProject/scitacean#265, it can be assigned but leads to the returned model to have proposalId = None.
Does it make sense to change datasets/fullquery to use the same DTOs as datasets?
The text was updated successfully, but these errors were encountered:
When posting to and getting from
datasets
, we can use the*ObsoleteDTO
models from the OpenAPI schema. Butdatasets/fullquery
uses the database schema for datasets. This means that with the ongoing migration, we cannot assign the result of a query to the same model as the result ofGET datasets
.For example, the output DTO contains
proposalId
(singular) but the schema containsproposalIds
(plural). So if we want to query by proposal, we need to passproposalIds = ["..."]
and get back an object that contains a fieldproposalIds
. This cannot be assigned to a model generated from the DTO. Or with the changes proposed in SciCatProject/scitacean#265, it can be assigned but leads to the returned model to haveproposalId = None
.Does it make sense to change
datasets/fullquery
to use the same DTOs asdatasets
?The text was updated successfully, but these errors were encountered: