Skip to content

Commit

Permalink
make unknown fields raise an error
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Blackadder committed Aug 9, 2024
1 parent 6949a28 commit 7857924
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pydantic_schemas/schema_base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class SchemaBaseModel(BaseModel):
model_config = ConfigDict(
validate_assignment=True, protected_namespaces=(), use_enum_values=True
validate_assignment=True, protected_namespaces=(), use_enum_values=True, extra="forbid"
) # if a subclass has a model_config then this will be overridden

def __setitem__(self, key, value):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metadataschemas"
version = "0.1.13"
version = "0.1.15"
description = ""
authors = ["Mehmood Asghar <[email protected]>", "Gordon Blackadder <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 7857924

Please sign in to comment.