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
I encountered some schemas using this in real life that used this feature and fail parsing with this package. I see two solutions to this problem: extending the union wherever there is a schema used, e.g. turn all Union[Ref, Schema] into Union[Ref, Schema, bool] or make schema itself a union of Schema and Bool and rename the existing schema to something like JsonSchema. I hacked it for myself to use the former solution.
The text was updated successfully, but these errors were encountered:
Hi @jcklie - thanks for reaching out! Happy to accept a contribution for this, probably the latter solution (make schema itself a union of Schema and Bool and rename the existing schema to something like JsonSchema) would be preferable in my mind to reduce the number of places that need updating?
JSON schema has a niche case where are allowed to just consist of a boolean 1. Therefore, this is a valid schema:
I encountered some schemas using this in real life that used this feature and fail parsing with this package. I see two solutions to this problem: extending the union wherever there is a schema used, e.g. turn all
Union[Ref, Schema]
intoUnion[Ref, Schema, bool]
or make schema itself a union ofSchema
andBool
and rename the existing schema to something likeJsonSchema
. I hacked it for myself to use the former solution.The text was updated successfully, but these errors were encountered: