From f20e5b6055a944270d3468f54baefd87696a87f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvaro=20Cabrera=20Dur=C3=A1n?= <pateketrueke@gmail.com> Date: Tue, 5 Nov 2019 23:32:46 -0600 Subject: [PATCH] Add spec for #530 --- tests/schema/core/issues/issue-530.json | 66 +++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 tests/schema/core/issues/issue-530.json diff --git a/tests/schema/core/issues/issue-530.json b/tests/schema/core/issues/issue-530.json new file mode 100644 index 00000000..25a75d96 --- /dev/null +++ b/tests/schema/core/issues/issue-530.json @@ -0,0 +1,66 @@ +[ + { + "description": "jsf.resolve() hangs with circular reference when alwaysFakeOptionals is true", + "tests": [ + { + "description": "should resolve circular-refs now", + "schema": { + "type": "object", + "definitions": { + "collectionDef": { + "additionalProperties": false, + "properties": { + "a": { + "items": { + "$ref": "#/definitions/aDef" + }, + "type": "array" + }, + "b": { + "type": "string" + } + }, + "type": "object", + "required": [ + "b", + "a" + ] + }, + "aDef": { + "additionalProperties": true, + "properties": { + "subA": { + "items": { + "$ref": "#/definitions/aDef" + }, + "type": "array" + }, + "b": { + "type": "string" + } + }, + "type": "object" + } + }, + "properties": { + "name": { + "type": "string", + "faker": "name.findName" + }, + "email": { + "type": "string", + "faker": "internet.email" + }, + "collection": { + "$ref": "#/definitions/collectionDef" + } + }, + "required": [ + "name" + ] + }, + "valid": true + } + ] + } +] -- GitLab