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

🚀 Feature: generate dataclasses from schemas #88

Open
2 tasks done
iron3oxide opened this issue Jul 11, 2024 · 1 comment
Open
2 tasks done

🚀 Feature: generate dataclasses from schemas #88

iron3oxide opened this issue Jul 11, 2024 · 1 comment

Comments

@iron3oxide
Copy link

🔖 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?

@Shriniwas18K
Copy link

can i handle it , we can use pydantic basemodels due to their large community support and robust docs

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

2 participants