@@ -20,52 +20,19 @@ fun getFilter(schemaType: SchemaType?): TestFilter =
20
20
}
21
21
22
22
object TestFilterDraft7 : TestFilter {
23
- /* *
24
- * All these cases are ignored because they contain remote refs
25
- * Library does not support them yet.
26
- */
27
- private val IGNORED_CASES : Set <String > = hashSetOf(
28
- " validate definition against metaschema" ,
29
- " base URI change - change folder" ,
30
- " base URI change - change folder in subschema" ,
31
- " base URI change" ,
32
- " retrieved nested refs resolve relative to their URI not \$ id" ,
33
- " \$ ref to \$ ref finds location-independent \$ id" ,
34
- )
35
23
36
24
override fun shouldSkipCase (caseDescription : String ): String? {
37
25
return when {
38
26
caseDescription.endsWith(" format" ) -> " the format keyword is not yet supported"
39
- caseDescription in IGNORED_CASES || caseDescription.contains(" remote ref" ) ->
40
- " remote schema loading is not yet supported"
41
-
42
27
else -> null
43
28
}
44
29
}
45
30
}
46
31
47
32
object TestFilterDraft201909 : TestFilter {
48
- /* *
49
- * All these cases are ignored because they contain remote refs or meta schema
50
- * Library does not support them yet.
51
- */
52
- private val IGNORED_CASES_WITH_REMOTE_REF : Set <String > = hashSetOf(
53
- " invalid anchors" ,
54
- " Invalid use of fragments in location-independent \$ id" ,
55
- " Valid use of empty fragments in location-independent \$ id" ,
56
- " Unnormalized \$ ids are allowed but discouraged" ,
57
- " URN base URI with f-component" ,
58
- " remote HTTP ref with different \$ id" ,
59
- " remote HTTP ref with different URN \$ id" ,
60
- " remote HTTP ref with nested absolute ref" ,
61
- " \$ ref to \$ ref finds detached \$ anchor" ,
33
+ private val IGNORED_CASES_WITH_CUSTOM_META_SCHEMA : Set <String > = hashSetOf(
62
34
" schema that uses custom metaschema with with no validation vocabulary" ,
63
35
" ignore unrecognized optional vocabulary" ,
64
- " validate definition against metaschema" ,
65
- " retrieved nested refs resolve relative to their URI not \$ id" ,
66
- " base URI change - change folder in subschema" ,
67
- " base URI change - change folder" ,
68
- " base URI change" ,
69
36
)
70
37
71
38
private val IGNORE_CASES_WITH_MIN_CONTAINS_ZERO = setOf (
@@ -75,8 +42,8 @@ object TestFilterDraft201909 : TestFilter {
75
42
override fun shouldSkipCase (caseDescription : String ): String? {
76
43
return when {
77
44
caseDescription.endsWith(" format" ) -> " the format keyword is not yet supported"
78
- caseDescription in IGNORED_CASES_WITH_REMOTE_REF || caseDescription.contains( " remote ref " ) ->
79
- " remote schema loading and meta schemas are not yet supported"
45
+ caseDescription in IGNORED_CASES_WITH_CUSTOM_META_SCHEMA ->
46
+ " vocabulary from custom meta- schemas is not supported yet "
80
47
caseDescription in IGNORE_CASES_WITH_MIN_CONTAINS_ZERO ->
81
48
" 'minContains' does not affect contains work - at least one element must match 'contains' schema"
82
49
else -> null
@@ -95,39 +62,16 @@ object TestFilterDraft201909 : TestFilter {
95
62
}
96
63
97
64
object TestFilterDraft202012 : TestFilter {
98
- /* *
99
- * All these cases are ignored because they contain remote refs or meta schema
100
- * Library does not support them yet.
101
- */
102
- private val IGNORED_CASES_WITH_REMOTE_REF : Set <String > = hashSetOf(
103
- " invalid anchors" ,
104
- " Invalid use of fragments in location-independent \$ id" ,
105
- " Valid use of empty fragments in location-independent \$ id" ,
106
- " Unnormalized \$ ids are allowed but discouraged" ,
107
- " URN base URI with f-component" ,
108
- " remote HTTP ref with different \$ id" ,
109
- " remote HTTP ref with different URN \$ id" ,
110
- " remote HTTP ref with nested absolute ref" ,
111
- " \$ ref to \$ ref finds detached \$ anchor" ,
65
+ private val IGNORED_CASES_WITH_CUSTOM_META_SCHEMA : Set <String > = hashSetOf(
112
66
" schema that uses custom metaschema with with no validation vocabulary" ,
113
67
" ignore unrecognized optional vocabulary" ,
114
- " validate definition against metaschema" ,
115
- " retrieved nested refs resolve relative to their URI not \$ id" ,
116
- " base URI change - change folder in subschema" ,
117
- " base URI change - change folder" ,
118
- " base URI change" ,
119
- " strict-tree schema, guards against misspelled properties" ,
120
- " tests for implementation dynamic anchor and reference link" ,
121
- " \$ ref and \$ dynamicAnchor are independent of order - \$ defs first" ,
122
- " \$ ref and \$ dynamicAnchor are independent of order - \$ ref first" ,
123
- " \$ ref to \$ dynamicRef finds detached \$ dynamicAnchor" ,
124
68
)
125
69
126
70
override fun shouldSkipCase (caseDescription : String ): String? {
127
71
return when {
128
72
caseDescription.endsWith(" format" ) -> " the format keyword is not yet supported"
129
- caseDescription in IGNORED_CASES_WITH_REMOTE_REF || caseDescription.contains( " remote ref " ) ->
130
- " remote schema loading and meta schemas are not yet supported"
73
+ caseDescription in IGNORED_CASES_WITH_CUSTOM_META_SCHEMA ->
74
+ " vocabulary from custom meta- schemas is not supported yet "
131
75
else -> null
132
76
}
133
77
}
0 commit comments