(
        self, obj, field
    )
return {
            "anyOf": [
                self._get_schema_for_field(obj, sub_field)
                for sub_field in field._candidate_fields
            ]
        }
Get a union type schema. Uses anyOf to allow the value to be any of the provided sub fields
Get a union type schema. Uses anyOf to allow the value to be any of the provided sub fields
Get a union type schema . Uses anyOf to allow the value to be any of the provided sub fields
def _from_union_schema(
        self, obj, field
    ) -> typing.Dict[str, typing.List[typing.Any]]:
        """Get a union type schema. Uses anyOf to allow the value to be any of the provided sub fields"""
        assert ALLOW_UNIONS and isinstance(field, Union)

        return {
            "anyOf": [
                self._get_schema_for_field(obj, sub_field)
                for sub_field in field._candidate_fields
            ]
        }
def _from_union_schema ( self , obj , field ) -> typing . Dict [ str , typing . List [ typing . Any ] ] : assert ALLOW_UNIONS and isinstance ( field , Union ) return { "anyOf" : [ self . _get_schema_for_field ( obj , sub_field ) for sub_field in field . _candidate_fields ] }