JSON Schema only use $def
for selected types, need better way to reference other files
#105
Labels
$def
for selected types, need better way to reference other files
#105
If I validate an object against a JSON Schema, it will check all
$def
s. This behavior ends up being too permissive since some types will be objects with arbitrary fields due to theObject
InterType. This means nearly any JSON will validate against it which defeats the purpose of a JSON Schema.A solution to this may be just selecting the InterTypes you want for the JSON Schema using its specific
generate_module
method's kwargs:Note that this isn't a problem with Pydantic since the constructor is called explicitly.
(Encountered this problem when reviewing this PR)
The text was updated successfully, but these errors were encountered: