From e39c6ea6aeedb8cccc8b1449e3ce7fc9f6a4c122 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Tekuri Date: Sat, 25 Feb 2023 19:37:13 +0530 Subject: [PATCH] test/refRemote: anchor within remote ref --- tests/draft-next/refRemote.json | 19 +++++++++++++++++++ tests/draft2019-09/refRemote.json | 19 +++++++++++++++++++ tests/draft2020-12/refRemote.json | 19 +++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/tests/draft-next/refRemote.json b/tests/draft-next/refRemote.json index ca5b8c46..3768b53b 100644 --- a/tests/draft-next/refRemote.json +++ b/tests/draft-next/refRemote.json @@ -37,6 +37,25 @@ } ] }, + { + "description": "anchor within remote ref", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "$ref": "http://localhost:1234/draft-next/locationIndependentIdentifier.json#foo" + }, + "tests": [ + { + "description": "remote anchor valid", + "data": 1, + "valid": true + }, + { + "description": "remote anchor invalid", + "data": "a", + "valid": false + } + ] + }, { "description": "ref within remote ref", "schema": { diff --git a/tests/draft2019-09/refRemote.json b/tests/draft2019-09/refRemote.json index 7f45b0bf..c995a458 100644 --- a/tests/draft2019-09/refRemote.json +++ b/tests/draft2019-09/refRemote.json @@ -37,6 +37,25 @@ } ] }, + { + "description": "anchor within remote ref", + "schema": { + "$schema": "https://json-schema.org/draft/2010-09/schema", + "$ref": "http://localhost:1234/draft2019-09/locationIndependentIdentifier.json#foo" + }, + "tests": [ + { + "description": "remote anchor valid", + "data": 1, + "valid": true + }, + { + "description": "remote anchor invalid", + "data": "a", + "valid": false + } + ] + }, { "description": "ref within remote ref", "schema": { diff --git a/tests/draft2020-12/refRemote.json b/tests/draft2020-12/refRemote.json index d3cc4012..2d4f99e7 100644 --- a/tests/draft2020-12/refRemote.json +++ b/tests/draft2020-12/refRemote.json @@ -37,6 +37,25 @@ } ] }, + { + "description": "anchor within remote ref", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$ref": "http://localhost:1234/draft2020-12/locationIndependentIdentifier.json#foo" + }, + "tests": [ + { + "description": "remote anchor valid", + "data": 1, + "valid": true + }, + { + "description": "remote anchor invalid", + "data": "a", + "valid": false + } + ] + }, { "description": "ref within remote ref", "schema": {