File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
src/commonTest/kotlin/io/github/optimumcode/json/schema/base Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,42 @@ class JsonSchemaTest : FunSpec() {
156
156
}
157
157
}
158
158
159
+ test(" does not report circled references if have one of the applicators that might not be invoked" ) {
160
+ shouldNotThrowAny {
161
+ JsonSchema .fromDefinition(
162
+ """
163
+ {
164
+ "${KEY } schema": "http://json-schema.org/draft-07/schema#",
165
+ "definitions": {
166
+ "alice": {
167
+ "allOf": [
168
+ { "${KEY } ref": "#/definitions/bob" }
169
+ ]
170
+ },
171
+ "bob": {
172
+ "properties": {
173
+ "test": {
174
+ "allOf": [
175
+ { "${KEY } ref": "#/definitions/alice" }
176
+ ]
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "properties": {
182
+ "alice": {
183
+ "${KEY } ref": "#/definitions/alice"
184
+ },
185
+ "bob": {
186
+ "${KEY } ref": "#/definitions/bob"
187
+ }
188
+ }
189
+ }
190
+ """ .trimIndent(),
191
+ )
192
+ }
193
+ }
194
+
159
195
listOf (
160
196
" document root" to
161
197
listOf (
You can’t perform that action at this time.
0 commit comments