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

Change to datamodel-code-generator and pydantic 2 #140

Open
jimisola opened this issue Nov 6, 2024 · 0 comments
Open

Change to datamodel-code-generator and pydantic 2 #140

jimisola opened this issue Nov 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jimisola
Copy link

jimisola commented Nov 6, 2024

Summary

Our current solution of custom classes, parsing and validation of reqstool yaml files is not core business logic.
It would be nice if we can use a library/tool for that in order to just focus on the business logic.

Blocked by:

Proposal

Change to datamodel-code-generator and pydantic 2

We can then generate pydantic 2 datamodels from JSON Schemas using datamodel-code-generator.
Using pydantic we can then populate are datamodels by having pydantic parse and validate the data.

It could be helpful to use dynaconf as a preprocessor to get support environment variables and dotenv, integration with HashiCorp Vault and Redis etc.

Pydantic has support for environment variables but both options have to be investigated.

@lfvjimisola lfvjimisola added the enhancement New feature or request label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants