Skip to content

Commit

Permalink
fix: Keep instead of ignore extra attributes when validating configur…
Browse files Browse the repository at this point in the history
…ation; Close #108
  • Loading branch information
empicano committed Jul 10, 2023
1 parent 7a338c2 commit af1fc03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/app/validation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from app.validation.mqtt import (
from .mqtt import (
AcknowledgementsMessage,
LogsMessage,
MeasurementsMessage,
)
from app.validation.routes import (
from .routes import (
CreateConfigurationRequest,
CreateSensorRequest,
CreateSessionRequest,
Expand Down
1 change: 1 addition & 0 deletions server/app/validation/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class _Configuration(pydantic.BaseModel):
# number of JSON fields or nesting depth could be interesting as well
# Or, check the actual size of the JSON / length of the JSON string
class Config:
extra = pydantic.Extra.allow
frozen = True


Expand Down

0 comments on commit af1fc03

Please sign in to comment.