-
Notifications
You must be signed in to change notification settings - Fork 15
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
Read and write using different tuple models #106
Comments
Hey @harry-hause 👋 Our base models are generated from the OpenAPI spec; the first line of the code sample you provided is importing those low-level, generated classes. Built on top of those generated models, we also provide purpose-built Client models (that live beneath that |
Hi @evansims , thanks for taking a look at this. I should have been more specific. When calling the read method with the example from the docs like:
The type of the list of tuples returned is the generated model from OpenAPI spec: Is there a way to elegantly convert this to the
We can write a conversion method but having the read() return the ClientTuple type would save us from having to do that. |
Checklist
Describe the problem you'd like to have solved
I added the SDK to our backend yesterday and found that there are two different models being used when reading from the store and writing to the store.
What's the reason for this? It would just save us some code to convert between them and make things cleaner with a single model/source of truth in the backend.
Thanks!
Describe the ideal solution
Read and write uses the same model for tuples
Alternatives and current workarounds
Cast in between them when reading, altering, and writing back to the store.
References
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: