๐ Feature: generate dataclasses from schemas
iron3oxide opened this issue ยท 1 comments
๐ Feature description
As a developer, I want to know what exactly an SDK method, for example Accounts.get()
, will return. It would be way more useful for this method to return an Account
object with all the fields correctly typed than to receive json as I do at the moment; which leads to me having to write my own models and parsing the json into those (+ error handling ofc).
๐ค Pitch
Since the schema for e.g. Account
is available in the OpenAPI spec, it should be possible to translate it into some form of dataclass. This could be the included dataclasses.dataclass
or a pydantic.BaseModel
, depending on your preferences regarding extra dependencies.
๐ Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
๐ข Have you read the Code of Conduct?
- I have read the Code of Conduct
can i handle it , we can use pydantic basemodels due to their large community support and robust docs