Skip to content

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

@jimisola

Description

@jimisola

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions