Skip to content

Commit c67dcde

Browse files
committed
Adding redact fides meta
1 parent a57a4cb commit c67dcde

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/fideslang/models.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from datetime import datetime
99
from enum import Enum
10-
from typing import Annotated, Any, Dict, List, Optional, Union
10+
from typing import Annotated, Any, Dict, List, Optional, Union, Literal
1111
from warnings import warn
1212

1313
from packaging.version import InvalidVersion, Version
@@ -421,6 +421,10 @@ class FidesMeta(BaseModel):
421421
default=None,
422422
description="Optionally specify a masking strategy override for this field.",
423423
)
424+
redact: Optional[Literal["name"]] = Field(
425+
default=None,
426+
description="Specify 'name' to indicate the field name should be redacted.",
427+
)
424428

425429
@field_validator("data_type")
426430
@classmethod
@@ -532,6 +536,10 @@ class CollectionMeta(BaseModel):
532536
# partitioning metadata is kept open-ended as it is an experimental feature -
533537
# more strictly defined metadata structures will be supported in the future
534538
partitioning: Optional[Union[Dict, List[Dict]]] = None
539+
redact: Optional[Literal["name"]] = Field(
540+
default=None,
541+
description="Specify 'name' to indicate the collection name should be redacted.",
542+
)
535543

536544

537545
class DatasetCollection(FidesopsMetaBackwardsCompat):
@@ -596,6 +604,10 @@ class DatasetMetadata(BaseModel):
596604
resource_id: Optional[str] = None
597605
after: Optional[List[FidesKey]] = None
598606
namespace: Optional[Dict] = None
607+
redact: Optional[Literal["name"]] = Field(
608+
default=None,
609+
description="Specify 'name' to indicate the dataset name should be redacted.",
610+
)
599611

600612

601613
class Dataset(FidesModel, FidesopsMetaBackwardsCompat):

0 commit comments

Comments
 (0)