If we pass JSON to a model, the default is that it will ignore extra fields not defined on it.
This isn't useful if we want to validate JSON, so it would be better to do:
class Config:
extra = Extra.forbid
This does mean that we'll be less tolerant and produce more errors if we don't add fields properly, but that's sort of the point of this library.
If we pass JSON to a model, the default is that it will ignore extra fields not defined on it.
This isn't useful if we want to validate JSON, so it would be better to do:
This does mean that we'll be less tolerant and produce more errors if we don't add fields properly, but that's sort of the point of this library.