You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying problem occurs because of the way we constrain models and their types, basically doing both at the same time.
This means that when we have circular models and they depend on each other, and the type has not been set yet, but we expect it to, we end up with the type having the value ''. I.e. why we end up with self._items: | List[] = input['items'] where the union model that items reference has not been sat when we set the items type.
This is part of a larger schema, but managed to narrow it down to the following small example:
Which generates the following Python code for the root object, notice the type for
_items
:Everything works fine if we remove
additionalItems
fromjson-schema-draft-07-schema
...The same problem is across multiple languages, so it has something to do with the interpreter or JSON Schema input processor.
The text was updated successfully, but these errors were encountered: