File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 17
17
JSONtop ,
18
18
JSONbot
19
19
)
20
- from jsonsubschema .exceptions import UnexpectedCanonicalization
20
+ from jsonsubschema .exceptions import UnsupportedEnumCanonicalization
21
21
22
22
TOP = {}
23
23
BOT = {"not" : {}}
Original file line number Diff line number Diff line change 16
16
import jsonsubschema ._constants as definitions
17
17
import jsonsubschema ._utils as utils
18
18
from jsonsubschema ._utils import print_db
19
+ from jsonsubschema .exceptions import (
20
+ UnsupportedNegatedArray ,
21
+ UnsupportedNegatedObject
22
+ )
19
23
20
24
21
25
class UninhabitedMeta (type ):
@@ -1121,7 +1125,11 @@ def neg(s):
1121
1125
# if s.__getattr__(k) != default:
1122
1126
# break
1123
1127
# else:
1124
- return None
1128
+ if s .keys () & definitions .JtypesToKeywords ['array' ]:
1129
+ raise UnsupportedNegatedArray (schema = s )
1130
+ else :
1131
+ return boolToConstructor .get ("anyOf" )(
1132
+ {"anyOf" : get_default_types_except ("array" )})
1125
1133
1126
1134
1127
1135
class JSONTypeObject (JSONschema ):
You can’t perform that action at this time.
0 commit comments