@@ -35,6 +35,11 @@ local blacklist = {
3535 [' contains keyword validation' ] = {
3636 [' not array is valid' ] = true
3737 },
38+ -- not support: an external resolver is required
39+ [' remote ref, containing refs itself' ] = true ,
40+ [' Recursive references between schemas' ] = true ,
41+ [' Location-independent identifier with absolute URI' ] = true ,
42+ [' Location-independent identifier with base URI change in subschema' ] = true ,
3843}
3944
4045local supported = {
@@ -88,9 +93,10 @@ local supported = {
8893 ' spec/JSON-Schema-Test-Suite/tests/draft7/const.json' ,
8994 ' spec/JSON-Schema-Test-Suite/tests/draft7/contains.json' ,
9095
96+ -- ref
97+ ' spec/JSON-Schema-Test-Suite/tests/draft7/ref.json' ,
9198 -- not support: an external resolver is required
9299 -- 'spec/JSON-Schema-Test-Suite/tests/draft7/refRemote.json',
93- -- 'spec/JSON-Schema-Test-Suite/tests/draft7/ref.json',
94100 -- 'spec/JSON-Schema-Test-Suite/tests/draft7/definitions.json',
95101
96102 -- not support: todo
@@ -114,9 +120,12 @@ for _, descriptor in ipairs(supported) do
114120 for _ , suite in decode_descriptor (descriptor ) do
115121 local skipped = blacklist [suite .description ] or {}
116122 if skipped ~= true then
117- local validator = jsonschema .generate_validator ( suite .schema , {
123+ local ok , validator = pcall ( jsonschema .generate_validator , suite .schema , {
118124 name = suite .description ,
119125 })
126+ if not ok then
127+ error (" failed to generate validator for case " .. suite .description .. " , err: " .. validator )
128+ end
120129 for _ , case in ipairs (suite .tests ) do
121130 if skipped [case .description ] then
122131 print (" skip suite case: [" .. suite .description .. " ] -> [" .. case .description .. " ]" )
0 commit comments