Skip to content

Generate python to freeze base models #5142

@va1ha11a

Description

@va1ha11a

Is your feature request related to a problem? Please describe.
When generating models to python the update and insert typed dicts make sense to be mutable but the base models do not (to me at least) and immutability provides some extra protections. i.e. foot gun removal.

Describe the solution you'd like
add frozen=True to the models (Pydantic v2)

Describe alternatives you've considered
There is some less clean ways to do it that should work for pydantic v1 and v2 but I was unsure of what this project is supporting in that respect.

Additional context
If this is an acceptable idea I am happy to create a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions