diff --git a/src/mainframe/models/schemas.py b/src/mainframe/models/schemas.py index 7782da21..cad4d420 100644 --- a/src/mainframe/models/schemas.py +++ b/src/mainframe/models/schemas.py @@ -2,7 +2,7 @@ from enum import Enum from typing import Any, Optional -from pydantic import BaseModel, Field, field_serializer +from pydantic import BaseModel, Field, field_serializer, ConfigDict from .orm import Scan @@ -85,12 +85,11 @@ class PackageSpecifier(BaseModel): version: A str of the package version to scan. """ + model_config = ConfigDict(frozen=True) + name: str version: str - class Config: - frozen = True - class ReportPackageBody(PackageSpecifier): recipient: Optional[str]