Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
return extra;
Browse files Browse the repository at this point in the history
  • Loading branch information
miararoy committed Oct 4, 2023
1 parent 799f3ac commit 3d6653a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions resin/models/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from enum import Enum
from typing import Optional, List, Union, Dict, Sequence

from pydantic import BaseModel, Field, validator
from pydantic import BaseModel, Field, validator, Extra

Metadata = Dict[str, Union[str, int, float, List[str]]]

Expand All @@ -25,8 +25,7 @@ class Document(BaseModel):
metadata: Metadata = Field(default_factory=dict)

class Config:
allow_extra = False
ignore_extra = False
extra = Extra.forbid

@validator('metadata')
def metadata_reseved_fields(cls, v):
Expand Down

0 comments on commit 3d6653a

Please sign in to comment.