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

Schema mismatch between 'regular' and querying endpoints #1623

Open
jl-wynen opened this issue Jan 14, 2025 · 0 comments
Open

Schema mismatch between 'regular' and querying endpoints #1623

jl-wynen opened this issue Jan 14, 2025 · 0 comments

Comments

@jl-wynen
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant