referencing-0.36.2/.gitmodules 0000644 0000000 0000000 00000000140 13615410400 013161 0 ustar 00 [submodule "suite"]
path = suite
url = https://github.com/python-jsonschema/referencing-suite
referencing-0.36.2/.pre-commit-config.yaml 0000644 0000000 0000000 00000001412 13615410400 015270 0 ustar 00 repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-docstring-first
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix, lf]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.2"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- name: black
id: black
args: ["--line-length", "79"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
referencing-0.36.2/.readthedocs.yml 0000644 0000000 0000000 00000000512 13615410400 014075 0 ustar 00 version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
jobs:
post_create_environment:
- pip install uv
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -r docs/requirements.txt
sphinx:
builder: dirhtml
configuration: docs/conf.py
fail_on_warning: true
formats: all
referencing-0.36.2/CHANGELOG.rst 0000755 0000000 0000000 00000000000 13615410400 016115 2docs/changes.rst ustar 00 referencing-0.36.2/noxfile.py 0000644 0000000 0000000 00000011237 13615410400 013033 0 ustar 00 from pathlib import Path
from tempfile import TemporaryDirectory
import os
import nox
ROOT = Path(__file__).parent
PYPROJECT = ROOT / "pyproject.toml"
DOCS = ROOT / "docs"
REFERENCING = ROOT / "referencing"
REQUIREMENTS = dict(
docs=DOCS / "requirements.txt",
tests=ROOT / "test-requirements.txt",
)
REQUIREMENTS_IN = [ # this is actually ordered, as files depend on each other
(path.parent / f"{path.stem}.in", path) for path in REQUIREMENTS.values()
]
SUPPORTED = ["3.9", "3.10", "pypy3.10", "3.11", "3.12", "3.13"]
LATEST = SUPPORTED[-1]
nox.options.default_venv_backend = "uv|virtualenv"
nox.options.sessions = []
def session(default=True, python=LATEST, **kwargs): # noqa: D103
def _session(fn):
if default:
nox.options.sessions.append(kwargs.get("name", fn.__name__))
return nox.session(python=python, **kwargs)(fn)
return _session
@session(python=SUPPORTED)
def tests(session):
"""
Run the test suite with a corresponding Python version.
"""
session.install("-r", REQUIREMENTS["tests"])
if session.posargs and session.posargs[0] == "coverage":
if len(session.posargs) > 1 and session.posargs[1] == "github":
github = Path(os.environ["GITHUB_STEP_SUMMARY"])
else:
github = None
session.install("coverage[toml]")
session.run("coverage", "run", "-m", "pytest", REFERENCING)
if github is None:
session.run("coverage", "report")
else:
with github.open("a") as summary:
summary.write("### Coverage\n\n")
summary.flush() # without a flush, output seems out of order.
session.run(
"coverage",
"report",
"--format=markdown",
stdout=summary,
)
else:
session.run("pytest", *session.posargs, REFERENCING)
@session()
def audit(session):
"""
Audit dependencies for vulnerabilities.
"""
session.install("pip-audit", ROOT)
session.run("python", "-m", "pip_audit")
@session(tags=["build"])
def build(session):
"""
Build a distribution suitable for PyPI and check its validity.
"""
session.install("build[uv]", "twine")
with TemporaryDirectory() as tmpdir:
session.run(
"pyproject-build",
"--installer=uv",
ROOT,
"--outdir",
tmpdir,
)
session.run("twine", "check", "--strict", tmpdir + "/*")
@session(tags=["style"])
def style(session):
"""
Check Python code style.
"""
session.install("ruff")
session.run("ruff", "check", ROOT, __file__)
@session()
def typing(session):
"""
Check static typing.
"""
session.install("pyright", ROOT)
session.run("pyright", *session.posargs, REFERENCING)
@session()
def mypy(session):
"""
Check that mypy runs with no blocking errors.
"""
session.install("mypy", ROOT)
session.run("mypy", REFERENCING)
@session(tags=["docs"])
@nox.parametrize(
"builder",
[
nox.param(name, id=name)
for name in [
"dirhtml",
"doctest",
"linkcheck",
"man",
"spelling",
]
],
)
def docs(session, builder):
"""
Build the documentation using a specific Sphinx builder.
"""
session.install("-r", REQUIREMENTS["docs"])
with TemporaryDirectory() as tmpdir_str:
tmpdir = Path(tmpdir_str)
argv = ["-n", "-T", "-W"]
if builder != "spelling":
argv += ["-q"]
posargs = session.posargs or [tmpdir / builder]
session.run(
"python",
"-m",
"sphinx",
"-b",
builder,
DOCS,
*argv,
*posargs,
)
@session(tags=["docs", "style"], name="docs(style)")
def docs_style(session):
"""
Check the documentation style.
"""
session.install(
"doc8",
"pygments",
"pygments-github-lexers",
)
session.run("python", "-m", "doc8", "--config", PYPROJECT, DOCS)
@session(default=False)
def requirements(session):
"""
Update the project's pinned requirements.
You should commit the result afterwards.
"""
if session.venv_backend == "uv":
cmd = ["uv", "pip", "compile"]
else:
session.install("pip-tools")
cmd = ["pip-compile", "--resolver", "backtracking", "--strip-extras"]
for each, out in REQUIREMENTS_IN:
# otherwise output files end up with silly absolute path comments...
relative = each.relative_to(ROOT)
session.run(*cmd, "--upgrade", "--output-file", out, relative)
referencing-0.36.2/test-requirements.in 0000644 0000000 0000000 00000000056 13615410400 015042 0 ustar 00 file:.#egg=referencing
pytest
pytest-subtests
referencing-0.36.2/test-requirements.txt 0000644 0000000 0000000 00000001117 13615410400 015252 0 ustar 00 # This file was autogenerated by uv via the following command:
# uv pip compile --output-file /Users/julian/Development/referencing/test-requirements.txt test-requirements.in
attrs==24.3.0
# via
# pytest-subtests
# referencing
iniconfig==2.0.0
# via pytest
packaging==24.2
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.3.4
# via
# -r test-requirements.in
# pytest-subtests
pytest-subtests==0.14.1
# via -r test-requirements.in
referencing @ file:.#egg=referencing
# via -r test-requirements.in
rpds-py==0.22.3
# via referencing
referencing-0.36.2/uv.lock 0000644 0000000 0000000 00000074243 13615410400 012327 0 ustar 00 version = 1
requires-python = ">=3.9"
[[package]]
name = "attrs"
version = "24.3.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/48/c8/6260f8ccc11f0917360fc0da435c5c9c7504e3db174d5a12a1494887b045/attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff", size = 805984 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/89/aa/ab0f7891a01eeb2d2e338ae8fecbe57fcebea1a24dbb64d45801bfab481d/attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308", size = 63397 },
]
[[package]]
name = "referencing"
version = "0.36.2.dev2+g52add92"
source = { editable = "." }
dependencies = [
{ name = "attrs" },
{ name = "rpds-py" },
{ name = "typing-extensions", marker = "python_full_version < '3.13'" },
]
[package.metadata]
requires-dist = [
{ name = "attrs", specifier = ">=22.2.0" },
{ name = "rpds-py", specifier = ">=0.7.0" },
{ name = "typing-extensions", marker = "python_full_version < '3.13'", specifier = ">=4.4.0" },
]
[[package]]
name = "rpds-py"
version = "0.22.3"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/01/80/cce854d0921ff2f0a9fa831ba3ad3c65cee3a46711addf39a2af52df2cfd/rpds_py-0.22.3.tar.gz", hash = "sha256:e32fee8ab45d3c2db6da19a5323bc3362237c8b653c70194414b892fd06a080d", size = 26771 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/42/2a/ead1d09e57449b99dcc190d8d2323e3a167421d8f8fdf0f217c6f6befe47/rpds_py-0.22.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6c7b99ca52c2c1752b544e310101b98a659b720b21db00e65edca34483259967", size = 359514 },
{ url = "https://files.pythonhosted.org/packages/8f/7e/1254f406b7793b586c68e217a6a24ec79040f85e030fff7e9049069284f4/rpds_py-0.22.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:be2eb3f2495ba669d2a985f9b426c1797b7d48d6963899276d22f23e33d47e37", size = 349031 },
{ url = "https://files.pythonhosted.org/packages/aa/da/17c6a2c73730d426df53675ff9cc6653ac7a60b6438d03c18e1c822a576a/rpds_py-0.22.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70eb60b3ae9245ddea20f8a4190bd79c705a22f8028aaf8bbdebe4716c3fab24", size = 381485 },
{ url = "https://files.pythonhosted.org/packages/aa/13/2dbacd820466aa2a3c4b747afb18d71209523d353cf865bf8f4796c969ea/rpds_py-0.22.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4041711832360a9b75cfb11b25a6a97c8fb49c07b8bd43d0d02b45d0b499a4ff", size = 386794 },
{ url = "https://files.pythonhosted.org/packages/6d/62/96905d0a35ad4e4bc3c098b2f34b2e7266e211d08635baa690643d2227be/rpds_py-0.22.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64607d4cbf1b7e3c3c8a14948b99345eda0e161b852e122c6bb71aab6d1d798c", size = 423523 },
{ url = "https://files.pythonhosted.org/packages/eb/1b/d12770f2b6a9fc2c3ec0d810d7d440f6d465ccd8b7f16ae5385952c28b89/rpds_py-0.22.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e69b0a0e2537f26d73b4e43ad7bc8c8efb39621639b4434b76a3de50c6966e", size = 446695 },
{ url = "https://files.pythonhosted.org/packages/4d/cf/96f1fd75512a017f8e07408b6d5dbeb492d9ed46bfe0555544294f3681b3/rpds_py-0.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc27863442d388870c1809a87507727b799c8460573cfbb6dc0eeaef5a11b5ec", size = 381959 },
{ url = "https://files.pythonhosted.org/packages/ab/f0/d1c5b501c8aea85aeb938b555bfdf7612110a2f8cdc21ae0482c93dd0c24/rpds_py-0.22.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e79dd39f1e8c3504be0607e5fc6e86bb60fe3584bec8b782578c3b0fde8d932c", size = 410420 },
{ url = "https://files.pythonhosted.org/packages/33/3b/45b6c58fb6aad5a569ae40fb890fc494c6b02203505a5008ee6dc68e65f7/rpds_py-0.22.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e0fa2d4ec53dc51cf7d3bb22e0aa0143966119f42a0c3e4998293a3dd2856b09", size = 557620 },
{ url = "https://files.pythonhosted.org/packages/83/62/3fdd2d3d47bf0bb9b931c4c73036b4ab3ec77b25e016ae26fab0f02be2af/rpds_py-0.22.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fda7cb070f442bf80b642cd56483b5548e43d366fe3f39b98e67cce780cded00", size = 584202 },
{ url = "https://files.pythonhosted.org/packages/04/f2/5dced98b64874b84ca824292f9cee2e3f30f3bcf231d15a903126684f74d/rpds_py-0.22.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cff63a0272fcd259dcc3be1657b07c929c466b067ceb1c20060e8d10af56f5bf", size = 552787 },
{ url = "https://files.pythonhosted.org/packages/67/13/2273dea1204eda0aea0ef55145da96a9aa28b3f88bb5c70e994f69eda7c3/rpds_py-0.22.3-cp310-cp310-win32.whl", hash = "sha256:9bd7228827ec7bb817089e2eb301d907c0d9827a9e558f22f762bb690b131652", size = 220088 },
{ url = "https://files.pythonhosted.org/packages/4e/80/8c8176b67ad7f4a894967a7a4014ba039626d96f1d4874d53e409b58d69f/rpds_py-0.22.3-cp310-cp310-win_amd64.whl", hash = "sha256:9beeb01d8c190d7581a4d59522cd3d4b6887040dcfc744af99aa59fef3e041a8", size = 231737 },
{ url = "https://files.pythonhosted.org/packages/15/ad/8d1ddf78f2805a71253fcd388017e7b4a0615c22c762b6d35301fef20106/rpds_py-0.22.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d20cfb4e099748ea39e6f7b16c91ab057989712d31761d3300d43134e26e165f", size = 359773 },
{ url = "https://files.pythonhosted.org/packages/c8/75/68c15732293a8485d79fe4ebe9045525502a067865fa4278f178851b2d87/rpds_py-0.22.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:68049202f67380ff9aa52f12e92b1c30115f32e6895cd7198fa2a7961621fc5a", size = 349214 },
{ url = "https://files.pythonhosted.org/packages/3c/4c/7ce50f3070083c2e1b2bbd0fb7046f3da55f510d19e283222f8f33d7d5f4/rpds_py-0.22.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb4f868f712b2dd4bcc538b0a0c1f63a2b1d584c925e69a224d759e7070a12d5", size = 380477 },
{ url = "https://files.pythonhosted.org/packages/9a/e9/835196a69cb229d5c31c13b8ae603bd2da9a6695f35fe4270d398e1db44c/rpds_py-0.22.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bc51abd01f08117283c5ebf64844a35144a0843ff7b2983e0648e4d3d9f10dbb", size = 386171 },
{ url = "https://files.pythonhosted.org/packages/f9/8e/33fc4eba6683db71e91e6d594a2cf3a8fbceb5316629f0477f7ece5e3f75/rpds_py-0.22.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f3cec041684de9a4684b1572fe28c7267410e02450f4561700ca5a3bc6695a2", size = 422676 },
{ url = "https://files.pythonhosted.org/packages/37/47/2e82d58f8046a98bb9497a8319604c92b827b94d558df30877c4b3c6ccb3/rpds_py-0.22.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7ef9d9da710be50ff6809fed8f1963fecdfecc8b86656cadfca3bc24289414b0", size = 446152 },
{ url = "https://files.pythonhosted.org/packages/e1/78/79c128c3e71abbc8e9739ac27af11dc0f91840a86fce67ff83c65d1ba195/rpds_py-0.22.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:59f4a79c19232a5774aee369a0c296712ad0e77f24e62cad53160312b1c1eaa1", size = 381300 },
{ url = "https://files.pythonhosted.org/packages/c9/5b/2e193be0e8b228c1207f31fa3ea79de64dadb4f6a4833111af8145a6bc33/rpds_py-0.22.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a60bce91f81ddaac922a40bbb571a12c1070cb20ebd6d49c48e0b101d87300d", size = 409636 },
{ url = "https://files.pythonhosted.org/packages/c2/3f/687c7100b762d62186a1c1100ffdf99825f6fa5ea94556844bbbd2d0f3a9/rpds_py-0.22.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e89391e6d60251560f0a8f4bd32137b077a80d9b7dbe6d5cab1cd80d2746f648", size = 556708 },
{ url = "https://files.pythonhosted.org/packages/8c/a2/c00cbc4b857e8b3d5e7f7fc4c81e23afd8c138b930f4f3ccf9a41a23e9e4/rpds_py-0.22.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e3fb866d9932a3d7d0c82da76d816996d1667c44891bd861a0f97ba27e84fc74", size = 583554 },
{ url = "https://files.pythonhosted.org/packages/d0/08/696c9872cf56effdad9ed617ac072f6774a898d46b8b8964eab39ec562d2/rpds_py-0.22.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1352ae4f7c717ae8cba93421a63373e582d19d55d2ee2cbb184344c82d2ae55a", size = 552105 },
{ url = "https://files.pythonhosted.org/packages/18/1f/4df560be1e994f5adf56cabd6c117e02de7c88ee238bb4ce03ed50da9d56/rpds_py-0.22.3-cp311-cp311-win32.whl", hash = "sha256:b0b4136a252cadfa1adb705bb81524eee47d9f6aab4f2ee4fa1e9d3cd4581f64", size = 220199 },
{ url = "https://files.pythonhosted.org/packages/b8/1b/c29b570bc5db8237553002788dc734d6bd71443a2ceac2a58202ec06ef12/rpds_py-0.22.3-cp311-cp311-win_amd64.whl", hash = "sha256:8bd7c8cfc0b8247c8799080fbff54e0b9619e17cdfeb0478ba7295d43f635d7c", size = 231775 },
{ url = "https://files.pythonhosted.org/packages/75/47/3383ee3bd787a2a5e65a9b9edc37ccf8505c0a00170e3a5e6ea5fbcd97f7/rpds_py-0.22.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:27e98004595899949bd7a7b34e91fa7c44d7a97c40fcaf1d874168bb652ec67e", size = 352334 },
{ url = "https://files.pythonhosted.org/packages/40/14/aa6400fa8158b90a5a250a77f2077c0d0cd8a76fce31d9f2b289f04c6dec/rpds_py-0.22.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1978d0021e943aae58b9b0b196fb4895a25cc53d3956b8e35e0b7682eefb6d56", size = 342111 },
{ url = "https://files.pythonhosted.org/packages/7d/06/395a13bfaa8a28b302fb433fb285a67ce0ea2004959a027aea8f9c52bad4/rpds_py-0.22.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:655ca44a831ecb238d124e0402d98f6212ac527a0ba6c55ca26f616604e60a45", size = 384286 },
{ url = "https://files.pythonhosted.org/packages/43/52/d8eeaffab047e6b7b7ef7f00d5ead074a07973968ffa2d5820fa131d7852/rpds_py-0.22.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:feea821ee2a9273771bae61194004ee2fc33f8ec7db08117ef9147d4bbcbca8e", size = 391739 },
{ url = "https://files.pythonhosted.org/packages/83/31/52dc4bde85c60b63719610ed6f6d61877effdb5113a72007679b786377b8/rpds_py-0.22.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22bebe05a9ffc70ebfa127efbc429bc26ec9e9b4ee4d15a740033efda515cf3d", size = 427306 },
{ url = "https://files.pythonhosted.org/packages/70/d5/1bab8e389c2261dba1764e9e793ed6830a63f830fdbec581a242c7c46bda/rpds_py-0.22.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3af6e48651c4e0d2d166dc1b033b7042ea3f871504b6805ba5f4fe31581d8d38", size = 442717 },
{ url = "https://files.pythonhosted.org/packages/82/a1/a45f3e30835b553379b3a56ea6c4eb622cf11e72008229af840e4596a8ea/rpds_py-0.22.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67ba3c290821343c192f7eae1d8fd5999ca2dc99994114643e2f2d3e6138b15", size = 385721 },
{ url = "https://files.pythonhosted.org/packages/a6/27/780c942de3120bdd4d0e69583f9c96e179dfff082f6ecbb46b8d6488841f/rpds_py-0.22.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:02fbb9c288ae08bcb34fb41d516d5eeb0455ac35b5512d03181d755d80810059", size = 415824 },
{ url = "https://files.pythonhosted.org/packages/94/0b/aa0542ca88ad20ea719b06520f925bae348ea5c1fdf201b7e7202d20871d/rpds_py-0.22.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f56a6b404f74ab372da986d240e2e002769a7d7102cc73eb238a4f72eec5284e", size = 561227 },
{ url = "https://files.pythonhosted.org/packages/0d/92/3ed77d215f82c8f844d7f98929d56cc321bb0bcfaf8f166559b8ec56e5f1/rpds_py-0.22.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0a0461200769ab3b9ab7e513f6013b7a97fdeee41c29b9db343f3c5a8e2b9e61", size = 587424 },
{ url = "https://files.pythonhosted.org/packages/09/42/cacaeb047a22cab6241f107644f230e2935d4efecf6488859a7dd82fc47d/rpds_py-0.22.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8633e471c6207a039eff6aa116e35f69f3156b3989ea3e2d755f7bc41754a4a7", size = 555953 },
{ url = "https://files.pythonhosted.org/packages/e6/52/c921dc6d5f5d45b212a456c1f5b17df1a471127e8037eb0972379e39dff4/rpds_py-0.22.3-cp312-cp312-win32.whl", hash = "sha256:593eba61ba0c3baae5bc9be2f5232430453fb4432048de28399ca7376de9c627", size = 221339 },
{ url = "https://files.pythonhosted.org/packages/f2/c7/f82b5be1e8456600395366f86104d1bd8d0faed3802ad511ef6d60c30d98/rpds_py-0.22.3-cp312-cp312-win_amd64.whl", hash = "sha256:d115bffdd417c6d806ea9069237a4ae02f513b778e3789a359bc5856e0404cc4", size = 235786 },
{ url = "https://files.pythonhosted.org/packages/d0/bf/36d5cc1f2c609ae6e8bf0fc35949355ca9d8790eceb66e6385680c951e60/rpds_py-0.22.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:ea7433ce7e4bfc3a85654aeb6747babe3f66eaf9a1d0c1e7a4435bbdf27fea84", size = 351657 },
{ url = "https://files.pythonhosted.org/packages/24/2a/f1e0fa124e300c26ea9382e59b2d582cba71cedd340f32d1447f4f29fa4e/rpds_py-0.22.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6dd9412824c4ce1aca56c47b0991e65bebb7ac3f4edccfd3f156150c96a7bf25", size = 341829 },
{ url = "https://files.pythonhosted.org/packages/cf/c2/0da1231dd16953845bed60d1a586fcd6b15ceaeb965f4d35cdc71f70f606/rpds_py-0.22.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20070c65396f7373f5df4005862fa162db5d25d56150bddd0b3e8214e8ef45b4", size = 384220 },
{ url = "https://files.pythonhosted.org/packages/c7/73/a4407f4e3a00a9d4b68c532bf2d873d6b562854a8eaff8faa6133b3588ec/rpds_py-0.22.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0b09865a9abc0ddff4e50b5ef65467cd94176bf1e0004184eb915cbc10fc05c5", size = 391009 },
{ url = "https://files.pythonhosted.org/packages/a9/c3/04b7353477ab360fe2563f5f0b176d2105982f97cd9ae80a9c5a18f1ae0f/rpds_py-0.22.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3453e8d41fe5f17d1f8e9c383a7473cd46a63661628ec58e07777c2fff7196dc", size = 426989 },
{ url = "https://files.pythonhosted.org/packages/8d/e6/e4b85b722bcf11398e17d59c0f6049d19cd606d35363221951e6d625fcb0/rpds_py-0.22.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f5d36399a1b96e1a5fdc91e0522544580dbebeb1f77f27b2b0ab25559e103b8b", size = 441544 },
{ url = "https://files.pythonhosted.org/packages/27/fc/403e65e56f65fff25f2973216974976d3f0a5c3f30e53758589b6dc9b79b/rpds_py-0.22.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:009de23c9c9ee54bf11303a966edf4d9087cd43a6003672e6aa7def643d06518", size = 385179 },
{ url = "https://files.pythonhosted.org/packages/57/9b/2be9ff9700d664d51fd96b33d6595791c496d2778cb0b2a634f048437a55/rpds_py-0.22.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1aef18820ef3e4587ebe8b3bc9ba6e55892a6d7b93bac6d29d9f631a3b4befbd", size = 415103 },
{ url = "https://files.pythonhosted.org/packages/bb/a5/03c2ad8ca10994fcf22dd2150dd1d653bc974fa82d9a590494c84c10c641/rpds_py-0.22.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f60bd8423be1d9d833f230fdbccf8f57af322d96bcad6599e5a771b151398eb2", size = 560916 },
{ url = "https://files.pythonhosted.org/packages/ba/2e/be4fdfc8b5b576e588782b56978c5b702c5a2307024120d8aeec1ab818f0/rpds_py-0.22.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:62d9cfcf4948683a18a9aff0ab7e1474d407b7bab2ca03116109f8464698ab16", size = 587062 },
{ url = "https://files.pythonhosted.org/packages/67/e0/2034c221937709bf9c542603d25ad43a68b4b0a9a0c0b06a742f2756eb66/rpds_py-0.22.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9253fc214112405f0afa7db88739294295f0e08466987f1d70e29930262b4c8f", size = 555734 },
{ url = "https://files.pythonhosted.org/packages/ea/ce/240bae07b5401a22482b58e18cfbabaa392409b2797da60223cca10d7367/rpds_py-0.22.3-cp313-cp313-win32.whl", hash = "sha256:fb0ba113b4983beac1a2eb16faffd76cb41e176bf58c4afe3e14b9c681f702de", size = 220663 },
{ url = "https://files.pythonhosted.org/packages/cb/f0/d330d08f51126330467edae2fa4efa5cec8923c87551a79299380fdea30d/rpds_py-0.22.3-cp313-cp313-win_amd64.whl", hash = "sha256:c58e2339def52ef6b71b8f36d13c3688ea23fa093353f3a4fee2556e62086ec9", size = 235503 },
{ url = "https://files.pythonhosted.org/packages/f7/c4/dbe1cc03df013bf2feb5ad00615038050e7859f381e96fb5b7b4572cd814/rpds_py-0.22.3-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:f82a116a1d03628a8ace4859556fb39fd1424c933341a08ea3ed6de1edb0283b", size = 347698 },
{ url = "https://files.pythonhosted.org/packages/a4/3a/684f66dd6b0f37499cad24cd1c0e523541fd768576fa5ce2d0a8799c3cba/rpds_py-0.22.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3dfcbc95bd7992b16f3f7ba05af8a64ca694331bd24f9157b49dadeeb287493b", size = 337330 },
{ url = "https://files.pythonhosted.org/packages/82/eb/e022c08c2ce2e8f7683baa313476492c0e2c1ca97227fe8a75d9f0181e95/rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59259dc58e57b10e7e18ce02c311804c10c5a793e6568f8af4dead03264584d1", size = 380022 },
{ url = "https://files.pythonhosted.org/packages/e4/21/5a80e653e4c86aeb28eb4fea4add1f72e1787a3299687a9187105c3ee966/rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5725dd9cc02068996d4438d397e255dcb1df776b7ceea3b9cb972bdb11260a83", size = 390754 },
{ url = "https://files.pythonhosted.org/packages/37/a4/d320a04ae90f72d080b3d74597074e62be0a8ecad7d7321312dfe2dc5a6a/rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99b37292234e61325e7a5bb9689e55e48c3f5f603af88b1642666277a81f1fbd", size = 423840 },
{ url = "https://files.pythonhosted.org/packages/87/70/674dc47d93db30a6624279284e5631be4c3a12a0340e8e4f349153546728/rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:27b1d3b3915a99208fee9ab092b8184c420f2905b7d7feb4aeb5e4a9c509b8a1", size = 438970 },
{ url = "https://files.pythonhosted.org/packages/3f/64/9500f4d66601d55cadd21e90784cfd5d5f4560e129d72e4339823129171c/rpds_py-0.22.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f612463ac081803f243ff13cccc648578e2279295048f2a8d5eb430af2bae6e3", size = 383146 },
{ url = "https://files.pythonhosted.org/packages/4d/45/630327addb1d17173adcf4af01336fd0ee030c04798027dfcb50106001e0/rpds_py-0.22.3-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f73d3fef726b3243a811121de45193c0ca75f6407fe66f3f4e183c983573e130", size = 408294 },
{ url = "https://files.pythonhosted.org/packages/5f/ef/8efb3373cee54ea9d9980b772e5690a0c9e9214045a4e7fa35046e399fee/rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3f21f0495edea7fdbaaa87e633a8689cd285f8f4af5c869f27bc8074638ad69c", size = 556345 },
{ url = "https://files.pythonhosted.org/packages/54/01/151d3b9ef4925fc8f15bfb131086c12ec3c3d6dd4a4f7589c335bf8e85ba/rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1e9663daaf7a63ceccbbb8e3808fe90415b0757e2abddbfc2e06c857bf8c5e2b", size = 582292 },
{ url = "https://files.pythonhosted.org/packages/30/89/35fc7a6cdf3477d441c7aca5e9bbf5a14e0f25152aed7f63f4e0b141045d/rpds_py-0.22.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a76e42402542b1fae59798fab64432b2d015ab9d0c8c47ba7addddbaf7952333", size = 553855 },
{ url = "https://files.pythonhosted.org/packages/8f/e0/830c02b2457c4bd20a8c5bb394d31d81f57fbefce2dbdd2e31feff4f7003/rpds_py-0.22.3-cp313-cp313t-win32.whl", hash = "sha256:69803198097467ee7282750acb507fba35ca22cc3b85f16cf45fb01cb9097730", size = 219100 },
{ url = "https://files.pythonhosted.org/packages/f8/30/7ac943f69855c2db77407ae363484b915d861702dbba1aa82d68d57f42be/rpds_py-0.22.3-cp313-cp313t-win_amd64.whl", hash = "sha256:f5cf2a0c2bdadf3791b5c205d55a37a54025c6e18a71c71f82bb536cf9a454bf", size = 233794 },
{ url = "https://files.pythonhosted.org/packages/db/0f/a8ad17ddac7c880f48d5da50733dd25bfc35ba2be1bec9f23453e8c7a123/rpds_py-0.22.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:378753b4a4de2a7b34063d6f95ae81bfa7b15f2c1a04a9518e8644e81807ebea", size = 359735 },
{ url = "https://files.pythonhosted.org/packages/0c/41/430903669397ea3ee76865e0b53ea236e8dc0ffbecde47b2c4c783ad6759/rpds_py-0.22.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3445e07bf2e8ecfeef6ef67ac83de670358abf2996916039b16a218e3d95e97e", size = 348724 },
{ url = "https://files.pythonhosted.org/packages/c9/5c/3496f4f0ee818297544f2d5f641c49dde8ae156392e6834b79c0609ba006/rpds_py-0.22.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b2513ba235829860b13faa931f3b6846548021846ac808455301c23a101689d", size = 381782 },
{ url = "https://files.pythonhosted.org/packages/b6/dc/db0523ce0cd16ce579185cc9aa9141992de956d0a9c469ecfd1fb5d54ddc/rpds_py-0.22.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eaf16ae9ae519a0e237a0f528fd9f0197b9bb70f40263ee57ae53c2b8d48aeb3", size = 387036 },
{ url = "https://files.pythonhosted.org/packages/85/2a/9525c2427d2c257f877348918136a5d4e1b945c205a256e53bec61e54551/rpds_py-0.22.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:583f6a1993ca3369e0f80ba99d796d8e6b1a3a2a442dd4e1a79e652116413091", size = 424566 },
{ url = "https://files.pythonhosted.org/packages/b9/1c/f8c012a39794b84069635709f559c0309103d5d74b3f5013916e6ca4f174/rpds_py-0.22.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4617e1915a539a0d9a9567795023de41a87106522ff83fbfaf1f6baf8e85437e", size = 447203 },
{ url = "https://files.pythonhosted.org/packages/93/f5/c1c772364570d35b98ba64f36ec90c3c6d0b932bc4d8b9b4efef6dc64b07/rpds_py-0.22.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c150c7a61ed4a4f4955a96626574e9baf1adf772c2fb61ef6a5027e52803543", size = 382283 },
{ url = "https://files.pythonhosted.org/packages/10/06/f94f61313f94fc75c3c3aa74563f80bbd990e5b25a7c1a38cee7d5d0309b/rpds_py-0.22.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fa4331c200c2521512595253f5bb70858b90f750d39b8cbfd67465f8d1b596d", size = 410022 },
{ url = "https://files.pythonhosted.org/packages/3f/b0/37ab416a9528419920dfb64886c220f58fcbd66b978e0a91b66e9ee9a993/rpds_py-0.22.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:214b7a953d73b5e87f0ebece4a32a5bd83c60a3ecc9d4ec8f1dca968a2d91e99", size = 557817 },
{ url = "https://files.pythonhosted.org/packages/2c/5d/9daa18adcd676dd3b2817c8a7cec3f3ebeeb0ce0d05a1b63bf994fc5114f/rpds_py-0.22.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f47ad3d5f3258bd7058d2d506852217865afefe6153a36eb4b6928758041d831", size = 585099 },
{ url = "https://files.pythonhosted.org/packages/41/3f/ad4e58035d3f848410aa3d59857b5f238bafab81c8b4a844281f80445d62/rpds_py-0.22.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f276b245347e6e36526cbd4a266a417796fc531ddf391e43574cf6466c492520", size = 552818 },
{ url = "https://files.pythonhosted.org/packages/b8/19/123acae8f4cab3c9463097c3ced3cc87c46f405056e249c874940e045309/rpds_py-0.22.3-cp39-cp39-win32.whl", hash = "sha256:bbb232860e3d03d544bc03ac57855cd82ddf19c7a07651a7c0fdb95e9efea8b9", size = 220246 },
{ url = "https://files.pythonhosted.org/packages/8b/8d/9db93e48d96ace1f6713c71ce72e2d94b71d82156c37b6a54e0930486f00/rpds_py-0.22.3-cp39-cp39-win_amd64.whl", hash = "sha256:cfbc454a2880389dbb9b5b398e50d439e2e58669160f27b60e5eca11f68ae17c", size = 231932 },
{ url = "https://files.pythonhosted.org/packages/8b/63/e29f8ee14fcf383574f73b6bbdcbec0fbc2e5fc36b4de44d1ac389b1de62/rpds_py-0.22.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:d48424e39c2611ee1b84ad0f44fb3b2b53d473e65de061e3f460fc0be5f1939d", size = 360786 },
{ url = "https://files.pythonhosted.org/packages/d3/e0/771ee28b02a24e81c8c0e645796a371350a2bb6672753144f36ae2d2afc9/rpds_py-0.22.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:24e8abb5878e250f2eb0d7859a8e561846f98910326d06c0d51381fed59357bd", size = 350589 },
{ url = "https://files.pythonhosted.org/packages/cf/49/abad4c4a1e6f3adf04785a99c247bfabe55ed868133e2d1881200aa5d381/rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b232061ca880db21fa14defe219840ad9b74b6158adb52ddf0e87bead9e8493", size = 381848 },
{ url = "https://files.pythonhosted.org/packages/3a/7d/f4bc6d6fbe6af7a0d2b5f2ee77079efef7c8528712745659ec0026888998/rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac0a03221cdb5058ce0167ecc92a8c89e8d0decdc9e99a2ec23380793c4dcb96", size = 387879 },
{ url = "https://files.pythonhosted.org/packages/13/b0/575c797377fdcd26cedbb00a3324232e4cb2c5d121f6e4b0dbf8468b12ef/rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb0c341fa71df5a4595f9501df4ac5abfb5a09580081dffbd1ddd4654e6e9123", size = 423916 },
{ url = "https://files.pythonhosted.org/packages/54/78/87157fa39d58f32a68d3326f8a81ad8fb99f49fe2aa7ad9a1b7d544f9478/rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf9db5488121b596dbfc6718c76092fda77b703c1f7533a226a5a9f65248f8ad", size = 448410 },
{ url = "https://files.pythonhosted.org/packages/59/69/860f89996065a88be1b6ff2d60e96a02b920a262d8aadab99e7903986597/rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b8db6b5b2d4491ad5b6bdc2bc7c017eec108acbf4e6785f42a9eb0ba234f4c9", size = 382841 },
{ url = "https://files.pythonhosted.org/packages/bd/d7/bc144e10d27e3cb350f98df2492a319edd3caaf52ddfe1293f37a9afbfd7/rpds_py-0.22.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b3d504047aba448d70cf6fa22e06cb09f7cbd761939fdd47604f5e007675c24e", size = 409662 },
{ url = "https://files.pythonhosted.org/packages/14/2a/6bed0b05233c291a94c7e89bc76ffa1c619d4e1979fbfe5d96024020c1fb/rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:e61b02c3f7a1e0b75e20c3978f7135fd13cb6cf551bf4a6d29b999a88830a338", size = 558221 },
{ url = "https://files.pythonhosted.org/packages/11/23/cd8f566de444a137bc1ee5795e47069a947e60810ba4152886fe5308e1b7/rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:e35ba67d65d49080e8e5a1dd40101fccdd9798adb9b050ff670b7d74fa41c566", size = 583780 },
{ url = "https://files.pythonhosted.org/packages/8d/63/79c3602afd14d501f751e615a74a59040328da5ef29ed5754ae80d236b84/rpds_py-0.22.3-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:26fd7cac7dd51011a245f29a2cc6489c4608b5a8ce8d75661bb4a1066c52dfbe", size = 553619 },
{ url = "https://files.pythonhosted.org/packages/9f/2e/c5c1689e80298d4e94c75b70faada4c25445739d91b94c211244a3ed7ed1/rpds_py-0.22.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:177c7c0fce2855833819c98e43c262007f42ce86651ffbb84f37883308cb0e7d", size = 233338 },
{ url = "https://files.pythonhosted.org/packages/bc/b7/d2c205723e3b4d75b03215694f0297a1b4b395bf834cb5896ad9bbb90f90/rpds_py-0.22.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bb47271f60660803ad11f4c61b42242b8c1312a31c98c578f79ef9387bbde21c", size = 360594 },
{ url = "https://files.pythonhosted.org/packages/d8/8f/c3515f5234cf6055046d4cfe9c80a3742a20acfa7d0b1b290f0d7f56a8db/rpds_py-0.22.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:70fb28128acbfd264eda9bf47015537ba3fe86e40d046eb2963d75024be4d055", size = 349594 },
{ url = "https://files.pythonhosted.org/packages/6b/98/5b487cb06afc484befe350c87fda37f4ce11333f04f3380aba43dcf5bce2/rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44d61b4b7d0c2c9ac019c314e52d7cbda0ae31078aabd0f22e583af3e0d79723", size = 381138 },
{ url = "https://files.pythonhosted.org/packages/5e/3a/12308d2c51b3fdfc173619943b7dc5ba41b4850c47112eeda38d9c54ed12/rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f0e260eaf54380380ac3808aa4ebe2d8ca28b9087cf411649f96bad6900c728", size = 387828 },
{ url = "https://files.pythonhosted.org/packages/17/b2/c242241ab5a2a206e093f24ccbfa519c4bbf10a762ac90bffe1766c225e0/rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b25bc607423935079e05619d7de556c91fb6adeae9d5f80868dde3468657994b", size = 424634 },
{ url = "https://files.pythonhosted.org/packages/d5/c7/52a1b15012139f3ba740f291f1d03c6b632938ba61bc605f24c101952493/rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fb6116dfb8d1925cbdb52595560584db42a7f664617a1f7d7f6e32f138cdf37d", size = 447862 },
{ url = "https://files.pythonhosted.org/packages/55/3e/4d3ed8fd01bad77e8ed101116fe63b03f1011940d9596a8f4d82ac80cacd/rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a63cbdd98acef6570c62b92a1e43266f9e8b21e699c363c0fef13bd530799c11", size = 382506 },
{ url = "https://files.pythonhosted.org/packages/30/78/df59d6f92470a84369a3757abeae1cfd7f7239c8beb6d948949bf78317d2/rpds_py-0.22.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2b8f60e1b739a74bab7e01fcbe3dddd4657ec685caa04681df9d562ef15b625f", size = 410534 },
{ url = "https://files.pythonhosted.org/packages/38/97/ea45d1edd9b753b20084b52dd5db6ee5e1ac3e036a27149972398a413858/rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2e8b55d8517a2fda8d95cb45d62a5a8bbf9dd0ad39c5b25c8833efea07b880ca", size = 557453 },
{ url = "https://files.pythonhosted.org/packages/08/cd/3a1b35eb9da27ffbb981cfffd32a01c7655c4431ccb278cb3064f8887462/rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:2de29005e11637e7a2361fa151f780ff8eb2543a0da1413bb951e9f14b699ef3", size = 584412 },
{ url = "https://files.pythonhosted.org/packages/87/91/31d1c5aeb1606f71188259e0ba6ed6f5c21a3c72f58b51db6a8bd0aa2b5d/rpds_py-0.22.3-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:666ecce376999bf619756a24ce15bb14c5bfaf04bf00abc7e663ce17c3f34fe7", size = 553446 },
{ url = "https://files.pythonhosted.org/packages/e7/ad/03b5ccd1ab492c9dece85b3bf1c96453ab8c47983936fae6880f688f60b3/rpds_py-0.22.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5246b14ca64a8675e0a7161f7af68fe3e910e6b90542b4bfb5439ba752191df6", size = 233013 },
]
[[package]]
name = "typing-extensions"
version = "4.12.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 },
]
referencing-0.36.2/.github/FUNDING.yml 0000644 0000000 0000000 00000000100 13615410400 014155 0 ustar 00 # These are supported funding model platforms
github: "Julian"
referencing-0.36.2/.github/SECURITY.md 0000644 0000000 0000000 00000001170 13615410400 014141 0 ustar 00 # Security Policy
## Supported Versions
In general, only the latest released `referencing` version is supported and will receive updates.
## Reporting a Vulnerability
To report a security vulnerability, please send an email to `Julian+Security` at `GrayVines.com` with subject line `SECURITY (referencing)`.
I will do my best to respond within 48 hours to acknowledge the message and discuss further steps.
If the vulnerability is accepted, an advisory will be sent out via GitHub's security advisory functionality.
For non-sensitive discussion related to this policy itself, feel free to open an issue on the issue tracker.
referencing-0.36.2/.github/dependabot.yml 0000644 0000000 0000000 00000000612 13615410400 015200 0 ustar 00 version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/docs"
schedule:
interval: "weekly"
referencing-0.36.2/.github/release.yml 0000644 0000000 0000000 00000000114 13615410400 014510 0 ustar 00 changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
referencing-0.36.2/.github/workflows/ci.yml 0000644 0000000 0000000 00000005132 13615410400 015525 0 ustar 00 name: CI
on:
push:
branches-ignore:
- "wip*"
tags:
- "v*"
pull_request:
schedule:
# Daily at 8:33
- cron: "33 8 * * *"
workflow_dispatch:
jobs:
list:
runs-on: ubuntu-latest
outputs:
noxenvs: ${{ steps.noxenvs-matrix.outputs.noxenvs }}
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- id: noxenvs-matrix
run: |
echo >>$GITHUB_OUTPUT noxenvs=$(
uvx nox --list-sessions --json | jq '[.[].session]'
)
ci:
needs: list
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
noxenv: ${{ fromJson(needs.list.outputs.noxenvs) }}
posargs: [""]
include:
- noxenv: tests-3.13
posargs: coverage github
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libenchant-2-dev
if: runner.os == 'Linux' && startsWith(matrix.noxenv, 'docs')
- name: Install dependencies
run: brew install enchant
if: runner.os == 'macOS' && startsWith(matrix.noxenv, 'docs')
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: |
3.9
3.10
3.11
3.12
3.13
pypy3.10
allow-prereleases: true
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Run nox
run: uvx nox -s "${{ matrix.noxenv }}" -- ${{ matrix.posargs }}
packaging:
needs: ci
runs-on: ubuntu-latest
environment:
name: PyPI
url: https://pypi.org/p/referencing
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Build our distributions
run: uv run --frozen --with 'build[uv]' -m build --installer=uv
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create a Release
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: softprops/action-gh-release@v2
with:
files: |
dist/*
generate_release_notes: true
referencing-0.36.2/docs/Makefile 0000644 0000000 0000000 00000001172 13615410400 013402 0 ustar 00 # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
referencing-0.36.2/docs/api.rst 0000644 0000000 0000000 00000003540 13615410400 013246 0 ustar 00 API Reference
=============
.. automodule:: referencing
:members:
:undoc-members:
:imported-members:
:special-members: __iter__, __getitem__, __len__, __rmatmul__
Private Objects
---------------
The following objects are private in the sense that constructing or importing them is not part of the `referencing` public API, as their name indicates (by virtue of beginning with an underscore).
They are however public in the sense that other public API functions may return objects of these types.
Plainly then, you may rely on their methods and attributes not changing in backwards incompatible ways once `referencing` itself is stable, but may not rely on importing or constructing them yourself.
.. autoclass:: referencing._core.Resolved
:members:
:undoc-members:
.. autoclass:: referencing._core.Retrieved
:members:
:undoc-members:
.. autoclass:: referencing._core.AnchorOrResource
.. autoclass:: referencing._core.Resolver
:members:
:undoc-members:
.. autoclass:: referencing._core._MaybeInSubresource
:members:
:undoc-members:
.. class:: referencing._core._Unset
A sentinel object used internally to satisfy the type checker.
Neither accessing nor explicitly passing this object anywhere is public API, and it is only documented here at all to get Sphinx to not complain.
Submodules
----------
referencing.jsonschema
^^^^^^^^^^^^^^^^^^^^^^
.. automodule:: referencing.jsonschema
:members:
:undoc-members:
referencing.exceptions
^^^^^^^^^^^^^^^^^^^^^^
.. automodule:: referencing.exceptions
:members:
:show-inheritance:
:undoc-members:
referencing.retrieval
^^^^^^^^^^^^^^^^^^^^^
.. automodule:: referencing.retrieval
:members:
:undoc-members:
.. autoclass:: referencing.retrieval._T
referencing.typing
^^^^^^^^^^^^^^^^^^
.. automodule:: referencing.typing
:members:
:undoc-members:
referencing-0.36.2/docs/changes.rst 0000644 0000000 0000000 00000011772 13615410400 014113 0 ustar 00 =========
Changelog
=========
v0.36.2
-------
* Release using the newer twine release to preserve PEP 639 license metadata.
v0.36.1
-------
* Add a lower pin on ``typing-extensions`` for the version we depend on.
v0.36.0
-------
* Declare support for Python 3.13.
v0.35.1
-------
* Make ``Resource.pointer`` also properly handle empty pointers (which refer to the root document).
This fix likely only affects you if you were using that function directly, as ``Resource.lookup`` already handles empty fragments.
v0.35.0
-------
* Ensure that ``Registry.contents()`` also raises ``NoSuchResource`` exceptions for nonexistent resources, not ``KeyError`` (which is an implementation detail).
v0.34.0
-------
* Also look inside ``definitions`` keywords even on newer dialects.
The specification recommends doing so regardless of the rename to ``$defs``.
v0.33.0
-------
* Add a ``referencing.jsonschema.SchemaResource`` type alias to go along with the other JSON Schema specialized types.
v0.32.1
-------
* Make ``Specification.detect`` raise a ``CannotDetermineSpecification`` error even if passed a mapping with a ``$schema`` key that doesn't match JSON Schema dialect semantics (e.g. a non-string).
v0.32.0
-------
* Add ``Specification.detect``, which essentially operates like ``Resource.from_contents`` without constructing a resource (i.e. it simply returns the detected specification).
v0.31.1
-------
* No user facing changes.
v0.31.0
-------
* Add ``referencing.jsonschema.EMPTY_REGISTRY`` (which simply has a convenient type annotation, but otherwise is just ``Registry()``).
v0.30.2
-------
* Minor docs improvement.
v0.30.1
-------
* Ensure that an ``sdist`` contains the test suite JSON files.
v0.30.0
-------
* Declare support for Python 3.12.
v0.29.3
-------
* Documentation fix.
v0.29.2
-------
* Improve the hashability of exceptions when they contain hashable data.
v0.29.1
-------
* Minor docs improvement.
v0.29.0
-------
* Add ``referencing.retrieval.to_cached_resource``, a simple caching decorator useful when writing a retrieval function turning JSON text into resources without repeatedly hitting the network, filesystem, etc.
v0.28.6
-------
* No user-facing changes.
v0.28.5
-------
* Fix a type annotation and fill in some missing test coverage.
v0.28.4
-------
* Fix a type annotation.
v0.28.3
-------
* No user-facing changes.
v0.28.2
-------
* Added some additional packaging trove classifiers.
v0.28.1
-------
* More minor documentation improvements
v0.28.0
-------
* Minor documentation improvement
v0.27.4
-------
* Minor simplification to the docs structure.
v0.27.3
-------
* Also strip fragments when using ``__getitem__`` on URIs with empty fragments.
v0.27.2
-------
* Another fix for looking up anchors from non-canonical URIs, now when they're inside a subresource which has a relative ``$id``.
v0.27.1
-------
* Improve a small number of docstrings.
v0.27.0
-------
* Support looking up anchors from non-canonical URIs.
In other words, if you add a resource at the URI ``http://example.com``, then looking up the anchor ``http://example.com#foo`` now works even if the resource has some internal ``$id`` saying its canonical URI is ``http://somethingelse.example.com``.
v0.26.4
-------
* Further API documentation.
v0.26.3
-------
* Add some documentation on ``referencing`` public and non-public API.
v0.26.2
-------
* Also suggest a proper JSON Pointer for users who accidentally use ``#/`` and intend to refer to the entire resource.
v0.26.1
-------
* No changes.
v0.26.0
-------
* Attempt to suggest a correction if someone uses '#foo/bar', which is neither a valid plain name anchor (as it contains a slash) nor a valid JSON pointer (as it doesn't start with a slash)
v0.25.3
-------
* Normalize the ID of JSON Schema resources with empty fragments (by removing the fragment).
Having a schema with an ID with empty fragment is discouraged, and newer versions of the spec may flat-out make it an error, but older meta-schemas indeed used IDs with empty fragments, so some extra normalization was needed and useful here even beyond what was previously done.
TBD on whether this is exactly right if/when another referencing spec defines differing behavior.
v0.25.2
-------
* Minor tweaks to the package keywords and description.
v0.25.1
-------
* Minor internal tweaks to the docs configuration.
v0.25.0
-------
* Bump the minimum version of ``rpds.py`` used, enabling registries to be used from multiple threads.
v0.24.4
-------
* Fix handling of IDs with empty fragments (which are equivalent to URIs with no fragment)
v0.24.3
-------
* Further intro documentation
v0.24.2
-------
* Fix handling of ``additionalProperties`` with boolean value on Draft 4 (where the boolean isn't a schema, it's a special allowed value)
v0.24.1
-------
* Add a bit of intro documentation
v0.24.0
-------
* ``pyrsistent`` was replaced with ``rpds.py`` (Python bindings to the Rust rpds crate), which seems to be quite a bit faster.
No user-facing changes really should be expected here.
referencing-0.36.2/docs/compatibility.rst 0000644 0000000 0000000 00000006531 13615410400 015351 0 ustar 00 =============
Compatibility
=============
``referencing`` is currently in beta so long as version numbers begin with a ``0``, meaning its public interface may change if issues are uncovered, though not typically without reason.
Once it seems clear that the interfaces look correct (likely after ``referencing`` is in use for some period of time) versioning will move to `CalVer `_ and interfaces will not change in backwards-incompatible ways without deprecation periods.
.. note::
Backwards compatibility is always defined relative to the specifications we implement.
Changing a behavior which is incorrect according to the relevant referencing specifications is not considered a backwards-incompatible change -- on the contrary, it's considered a bug fix.
In the spirit of `having some explicit detail on referencing's public interfaces `, here is a non-exhaustive list of things which are *not* part of the ``referencing`` public interface, and therefore which may change without warning, even once no longer in beta:
* All commonly understood indicators of privacy in Python -- in particular, (sub)packages, modules and identifiers beginning with a single underscore.
In the case of modules or packages, this includes *all* of their contents recursively, regardless of their naming.
* All contents in the ``referencing.tests`` package unless explicitly indicated otherwise
* The precise contents and wording of exception messages raised by any callable, private *or* public.
* The precise contents of the ``__repr__`` of any type defined in the package.
* The ability to *instantiate* exceptions defined in `referencing.exceptions`, with the sole exception of those explicitly indicating they are publicly instantiable (notably `referencing.exceptions.NoSuchResource`).
* The instantiation of any type with no public identifier, even if instances of it are returned by other public API.
E.g., `referencing._core.Resolver` is not publicly exposed, and it is not public API to instantiate it in ways other than by calling `referencing.Registry.resolver` or an equivalent.
All of its public attributes are of course public, however.
* The concrete types within the signature of a callable whenever they differ from their documented types.
In other words, if a function documents that it returns an argument of type ``Mapping[int, Sequence[str]]``, this is the promised return type, not whatever concrete type is returned which may be richer or have additional attributes and methods.
Changes to the signature will continue to guarantee this return type (or a broader one) but indeed are free to change the concrete type.
* Any identifiers in any modules which are imported from other modules.
In other words, if ``referencing.foo`` imports ``bar`` from ``referencing.quux``, it is *not* public API to use ``referencing.foo.bar``; only ``referencing.quux.bar`` is public API.
This does not apply to any objects exposed directly on the ``referencing`` package (e.g. `referencing.Resource`), which are indeed public.
* Subclassing of any class defined throughout the package.
Doing so is not supported for any object, and in general most types will raise exceptions to remind downstream users not to do so.
If any API usage may be questionable, feel free to open a discussion (or issue if appropriate) to clarify.
referencing-0.36.2/docs/conf.py 0000644 0000000 0000000 00000005670 13615410400 013250 0 ustar 00 import importlib.metadata
import re
from url import URL
GITHUB = URL.parse("https://github.com/")
HOMEPAGE = GITHUB / "python-jsonschema/referencing"
project = "referencing"
author = "Julian Berman"
copyright = f"2022, {author}"
release = importlib.metadata.version("referencing")
version = release.partition("-")[0]
language = "en"
default_role = "any"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_copybutton",
"sphinx_json_schema_spec",
"sphinxcontrib.spelling",
"sphinxext.opengraph",
]
pygments_style = "lovelace"
pygments_dark_style = "one-dark"
html_theme = "furo"
# See sphinx-doc/sphinx#10785
_TYPE_ALIASES = dict(
AnchorType=("class", "Anchor"),
D=("data", "D"),
ObjectSchema=("data", "ObjectSchema"),
Schema=("data", "Schema"),
URI=("attr", "URI"), # ?!?!?! Sphinx...
)
def _resolve_broken_refs(app, env, node, contnode):
if node["refdomain"] != "py":
return
if node["reftarget"].startswith("referencing.typing."):
kind, target = "data", node["reftarget"]
else:
kind, target = _TYPE_ALIASES.get(node["reftarget"], (None, None))
if kind is not None:
return app.env.get_domain("py").resolve_xref(
env,
node["refdoc"],
app.builder,
kind,
target,
node,
contnode,
)
def setup(app):
app.connect("missing-reference", _resolve_broken_refs)
def entire_domain(host):
return r"http.?://" + re.escape(host) + r"($|/.*)"
linkcheck_ignore = [
entire_domain("img.shields.io"),
f"{GITHUB}.*#.*",
str(HOMEPAGE / "actions"),
str(HOMEPAGE / "workflows/CI/badge.svg"),
]
# = Extensions =
# -- autodoc --
autodoc_default_options = {
"members": True,
"member-order": "bysource",
}
# -- autosectionlabel --
autosectionlabel_prefix_document = True
# -- intersphinx --
intersphinx_mapping = {
"hatch": ("https://hatch.pypa.io/latest/", None),
"jsonschema-specifications": (
"https://jsonschema-specifications.readthedocs.io/en/stable/",
None,
),
"regret": ("https://regret.readthedocs.io/en/stable/", None),
"python": ("https://docs.python.org/", None),
"setuptools": ("https://setuptools.pypa.io/en/stable/", None),
}
# -- extlinks --
extlinks = {
"gh": (str(HOMEPAGE) + "/%s", None),
"github": (str(GITHUB) + "/%s", None),
"hatch": ("https://hatch.pypa.io/latest/%s", None),
"httpx": ("https://www.python-httpx.org/%s", None),
}
extlinks_detect_hardcoded_links = True
# -- sphinx-copybutton --
copybutton_prompt_text = r">>> |\.\.\. |\$"
copybutton_prompt_is_regexp = True
# -- sphinxcontrib-spelling --
spelling_word_list_filename = "spelling-wordlist.txt"
spelling_show_suggestions = True
referencing-0.36.2/docs/index.rst 0000644 0000000 0000000 00000003473 13615410400 013611 0 ustar 00 An implementation-agnostic implementation of JSON reference resolution.
In other words, a way for e.g. JSON Schema tooling to resolve the :kw:`$ref` keywords across all drafts without needing to implement support themselves.
This library is meant for use both by implementers of JSON referencing-related tooling -- like JSON Schema implementations supporting the :kw:`$ref` keyword -- as well as by end-users using said implementations who wish to then configure sets of resources (like schemas) for use at runtime.
The simplest example of populating a registry (typically done by end-users) and then looking up a resource from it (typically done by something like a JSON Schema implementation) is:
.. testcode::
from referencing import Registry, Resource
import referencing.jsonschema
schema = Resource.from_contents( # Parse some contents into a 2020-12 JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:example:a-202012-schema",
"$defs": {
"nonNegativeInteger": {
"$anchor": "nonNegativeInteger",
"type": "integer",
"minimum": 0,
},
},
}
)
registry = schema @ Registry() # Add the resource to a new registry
# From here forward, this would usually be done within a library wrapping this one,
# like a JSON Schema implementation
resolver = registry.resolver()
resolved = resolver.lookup("urn:example:a-202012-schema#nonNegativeInteger")
assert resolved.contents == {
"$anchor": "nonNegativeInteger",
"type": "integer",
"minimum": 0,
}
For fuller details, see the `intro`.
.. toctree::
:glob:
:hidden:
intro
schema-packages
compatibility
api
changes
referencing-0.36.2/docs/intro.rst 0000644 0000000 0000000 00000027634 13615410400 013642 0 ustar 00 ============
Introduction
============
When authoring JSON documents, it is often useful to be able to reference other JSON documents, or to reference subsections of other JSON documents.
This kind of JSON referencing has historically been defined by various specifications, with slightly differing behavior.
The JSON Schema specifications, for instance, define :kw:`$ref` and :kw:`$dynamicRef` keywords to allow schema authors to combine multiple schemas together for reuse or deduplication as part of authoring JSON schemas.
The `referencing ` library was written in order to provide a simple, well-behaved and well-tested implementation of JSON reference resolution in a way which can be used across multiple specifications or specification versions.
Core Concepts
-------------
There are 3 main objects to be aware of:
* `referencing.Registry`, which represents a specific immutable set of resources (either in-memory or retrievable)
* `referencing.Specification`, which represents a specific specification, such as JSON Schema Draft 7, which can have differing referencing behavior from other specifications or even versions of JSON Schema.
JSON Schema-specific specifications live in the `referencing.jsonschema` module and are named like `referencing.jsonschema.DRAFT202012`.
* `referencing.Resource`, which represents a specific resource (often a Python `dict`) *along* with a specific `referencing.Specification` it is to be interpreted under.
As a concrete example, the simple JSON Schema ``{"type": "integer"}`` may be interpreted as a schema under either Draft 2020-12 or Draft 4 of the JSON Schema specification (amongst others); in draft 2020-12, the float ``2.0`` must be considered an integer, whereas in draft 4, it potentially is not.
If you mean the former (i.e. to associate this schema with draft 2020-12), you'd use ``referencing.Resource(contents={"type": "integer"}, specification=referencing.jsonschema.DRAFT202012)``, whereas for the latter you'd use `referencing.jsonschema.DRAFT4`.
A resource may be identified via one or more URIs, either because they identify themselves in a way proscribed by their specification (e.g. an :kw:`$id` keyword in suitable versions of the JSON Schema specification), or simply because you wish to externally associate a URI with the resource, regardless of a specification-specific way to refer to itself.
You could add the aforementioned simple JSON Schema resource to a `referencing.Registry` by creating an empty registry and then identifying it via some URI:
.. testcode::
from referencing import Registry, Resource
from referencing.jsonschema import DRAFT202012
resource = Resource(contents={"type": "integer"}, specification=DRAFT202012)
registry = Registry().with_resource(uri="http://example.com/my/resource", resource=resource)
print(registry)
.. testoutput::
.. note::
`referencing.Registry` is an entirely immutable object.
All of its methods which add resources to itself return *new* registry objects containing the added resource.
You could also confirm your resource is in the registry if you'd like, via `referencing.Registry.contents`, which will show you the contents of a resource at a given URI:
.. testcode::
print(registry.contents("http://example.com/my/resource"))
.. testoutput::
{'type': 'integer'}
Populating Registries
---------------------
There are a few different methods you can use to populate registries with resources.
Which one you want to use depends on things like:
* do you already have an instance of `referencing.Resource`, or are you creating one out of some loaded JSON?
If not, does the JSON have some sort of identifier that can be used to determine which specification it belongs to (e.g. the JSON Schema :kw:`$schema` keyword)?
* does your resource have an internal ID (e.g. the JSON Schema :kw:`$id` keyword)?
* do you have additional (external) URIs you want to refer to the same resource as well?
* do you have one resource to add or many?
We'll assume for example's sake that we're dealing with JSON Schema resources for the following examples, and we'll furthermore assume you have some initial `referencing.Registry` to add them to, perhaps an empty one:
.. testcode::
from referencing import Registry
initial_registry = Registry()
Recall that registries are immutable, so we'll be "adding" our resources by creating new registries containing the additional resource(s) we add.
In the ideal case, you have a JSON Schema with an internal ID, and which also identifies itself for a specific version of JSON Schema e.g.:
.. code:: json
{
"$id": "urn:example:my-schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "integer"
}
If you have such a schema in some JSON text, and wish to add a resource to our registry and be able to identify it using its internal ID (``urn:example:my-schema``) you can simply use:
.. testcode::
import json
loaded = json.loads(
"""
{
"$id": "urn:example:my-schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "integer"
}
""",
)
resource = Resource.from_contents(loaded)
registry = resource @ initial_registry
which will give you a registry with our resource added to it.
Let's check by using `Registry.contents`, which takes a URI and should show us the contents of our resource:
.. testcode::
print(registry.contents("urn:example:my-schema"))
.. testoutput::
{'$id': 'urn:example:my-schema', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'type': 'integer'}
If your schema did *not* have a :kw:`$schema` keyword, you'd get an error:
.. testcode::
another = json.loads(
"""
{
"$id": "urn:example:my-second-schema",
"type": "integer"
}
""",
)
print(Resource.from_contents(another))
.. testoutput::
Traceback (most recent call last):
...
referencing.exceptions.CannotDetermineSpecification: {'$id': 'urn:example:my-second-schema', 'type': 'integer'}
which is telling you that the resource you've tried to create is ambiguous -- there's no way to know which version of JSON Schema you intend it to be written for.
You can of course instead directly create a `Resource`, instead of using `Resource.from_contents`, which will allow you to specify which version of JSON Schema you're intending your schema to be written for:
.. testcode::
import referencing.jsonschema
second = Resource(contents=another, specification=referencing.jsonschema.DRAFT202012)
and now of course can add it as above:
.. testcode::
registry = second @ registry
print(registry.contents("urn:example:my-second-schema"))
.. testoutput::
{'$id': 'urn:example:my-second-schema', 'type': 'integer'}
As a shorthand, you can also use `Specification.create_resource` to create a `Resource` slightly more tersely.
E.g., an equivalent way to create the above resource is:
.. testcode::
second_again = referencing.jsonschema.DRAFT202012.create_resource(another)
print(second_again == second)
.. testoutput::
True
If your resource doesn't contain an :kw:`$id` keyword, you'll get a different error if you attempt to add it to a registry:
.. testcode::
third = Resource(
contents=json.loads("""{"type": "integer"}"""),
specification=referencing.jsonschema.DRAFT202012,
)
registry = third @ registry
.. testoutput::
Traceback (most recent call last):
...
referencing.exceptions.NoInternalID: Resource(contents={'type': 'integer'}, _specification=)
which is now saying that there's no way to add this resource to a registry directly, as it has no ``$id`` -- you must provide whatever URI you intend to use to refer to this resource to be able to add it.
You can do so using `referencing.Registry.with_resource` instead of the `@ operator ` which we have used thus far, and which takes the explicit URI you wish to use as an argument:
.. testcode::
registry = registry.with_resource(uri="urn:example:my-third-schema", resource=third)
which now allows us to use the URI we associated with our third resource to retrieve it:
.. testcode::
print(registry.contents("urn:example:my-third-schema"))
.. testoutput::
{'type': 'integer'}
If you have more than one resource to add, you can use `Registry.with_resources` (with an ``s``) to add many at once, or, if they meet the criteria to use ``@``, you can use ``[one, two, three] @ registry`` to add all three resources at once.
You may also want to have a look at `Registry.with_contents` for a further method to add resources to a registry without constructing a `Resource` object yourself.
Dynamically Retrieving Resources
--------------------------------
Sometimes one wishes to dynamically retrieve or construct `Resource`\ s which *don't* already live in-memory within a `Registry`.
This might be resources retrieved dynamically from a database, from files somewhere on disk, from some arbitrary place over the internet, or from the like.
We'll refer to such resources not present in-memory as *external resources*.
The ``retrieve`` argument to ``Registry`` objects can be used to configure a callable which will be used anytime a requested URI is *not* present in the registry, thereby allowing you to retrieve it from whichever location it lives in.
Here's an example of automatically retrieving external references by downloading them via :httpx:`httpx >`, illustrated by then automatically retrieving one of the JSON Schema metaschemas from the network:
.. code:: python
from referencing import Registry, Resource
import httpx
def retrieve_via_httpx(uri):
response = httpx.get(uri)
return Resource.from_contents(response.json())
registry = Registry(retrieve=retrieve_via_httpx)
resolver = registry.resolver()
print(resolver.lookup("https://json-schema.org/draft/2020-12/schema"))
.. note::
In the case of JSON Schema, the specifications generally discourage implementations from automatically retrieving these sorts of external resources over the network due to potential security implications.
See :kw:`schema-references` in particular.
`referencing` will of course therefore not do any such thing automatically, and this section generally assumes that you have personally considered the security implications for your own use case.
Caching
^^^^^^^
A common concern in these situations is also to *cache* the resulting resource such that repeated lookups of the same URI do not repeatedly call your retrieval function and thereby make network calls, hit the filesystem, etc.
You are of course free to use whatever caching mechanism is convenient even if it uses caching functionality entirely unrelated to this library (e.g. one specific to ``httpx`` in the above example, or one using `functools.lru_cache` internally).
Nonetheless, because it is so common to retrieve a JSON string and construct a resource from it, `referencing.retrieval.to_cached_resource` is a decorator which can help.
If you use it, your retrieval callable should return a `str`, not a `Resource`, as the decorator will handle deserializing your response and constructing a `Resource` from it (this is mostly because otherwise, deserialized JSON is generally not hashable if it ends up being a Python `dict`).
The above example would be written:
.. code:: python
from referencing import Registry, Resource
import httpx
import referencing.retrieval
@referencing.retrieval.to_cached_resource()
def cached_retrieve_via_httpx(uri):
return httpx.get(uri).text
registry = Registry(retrieve=cached_retrieve_via_httpx)
resolver = registry.resolver()
print(resolver.lookup("https://json-schema.org/draft/2020-12/schema"))
It is otherwise functionally equivalent to the above, other than that retrieval will not repeatedly make a web request.
referencing-0.36.2/docs/requirements.in 0000644 0000000 0000000 00000000336 13615410400 015016 0 ustar 00 file:.#egg=referencing
furo
pygments-github-lexers
sphinx-copybutton
sphinx-json-schema-spec
sphinx>5
sphinxcontrib-spelling>5
sphinxext-opengraph
url.py
# Until pyenchant/pyenchant#302 is released...
pyenchant>=3.3.0rc1
referencing-0.36.2/docs/requirements.txt 0000644 0000000 0000000 00000004024 13615410400 015225 0 ustar 00 # This file was autogenerated by uv via the following command:
# uv pip compile --output-file /Users/julian/Development/referencing/docs/requirements.txt docs/requirements.in
alabaster==1.0.0
# via sphinx
attrs==24.3.0
# via referencing
babel==2.16.0
# via sphinx
beautifulsoup4==4.12.3
# via furo
certifi==2024.12.14
# via requests
charset-normalizer==3.4.1
# via requests
docutils==0.21.2
# via sphinx
furo==2024.8.6
# via -r docs/requirements.in
idna==3.10
# via requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.5
# via sphinx
lxml==5.3.0
# via sphinx-json-schema-spec
markupsafe==3.0.2
# via jinja2
packaging==24.2
# via sphinx
pyenchant==3.3.0rc1
# via
# -r docs/requirements.in
# sphinxcontrib-spelling
pygments==2.19.1
# via
# furo
# pygments-github-lexers
# sphinx
pygments-github-lexers==0.0.5
# via -r docs/requirements.in
referencing @ file:.#egg=referencing
# via -r docs/requirements.in
requests==2.32.3
# via
# sphinx
# sphinxcontrib-spelling
rpds-py==0.22.3
# via referencing
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.6
# via beautifulsoup4
sphinx==8.1.3
# via
# -r docs/requirements.in
# furo
# sphinx-basic-ng
# sphinx-copybutton
# sphinx-json-schema-spec
# sphinxcontrib-spelling
# sphinxext-opengraph
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-copybutton==0.5.2
# via -r docs/requirements.in
sphinx-json-schema-spec==2025.1.1
# via -r docs/requirements.in
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
sphinxcontrib-spelling==8.0.1
# via -r docs/requirements.in
sphinxext-opengraph==0.9.1
# via -r docs/requirements.in
url-py==0.14.1
# via -r docs/requirements.in
urllib3==2.3.0
# via requests
referencing-0.36.2/docs/schema-packages.rst 0000644 0000000 0000000 00000001763 13615410400 015516 0 ustar 00 ===============
Schema Packages
===============
The `Registry` object is a useful way to ship Python packages which essentially bundle a set of JSON Schemas for use at runtime from Python.
In order to do so, you likely will want to:
* Collect together the JSON files you wish to ship
* Put them inside a Python package (one you possibly tag with the ``jsonschema`` keyword for easy discoverability).
Remember to ensure you have configured your build tool to include the JSON files in your built package distribution -- for e.g. :hatch:`hatch >` this is likely automatic, but for `setuptools ` may involve creating a suitable :file:`MANIFEST.in`.
* Instantiate a `Registry` object somewhere globally within the package
* Call `Registry.crawl` at import-time, such that users of your package get a "fully ready" registry to use
For an example of such a package, see `jsonschema-specifications `, which bundles the JSON Schema "official" schemas for use.
referencing-0.36.2/docs/spelling-wordlist.txt 0000644 0000000 0000000 00000000503 13615410400 016162 0 ustar 00 amongst
autodetecting
boolean
changelog
deduplication
dereferenced
deserialized
deserializing
discoverability
docstrings
filesystem
hashable
hashability
implementers
instantiable
instantiation
iterable
lookups
metaschemas
referenceable
resolvers
runtime
schemas
subclassing
submodules
subresource
subresources
unresolvable
referencing-0.36.2/referencing/__init__.py 0000644 0000000 0000000 00000000317 13615410400 015412 0 ustar 00 """
Cross-specification, implementation-agnostic JSON referencing.
"""
from referencing._core import Anchor, Registry, Resource, Specification
__all__ = ["Anchor", "Registry", "Resource", "Specification"]
referencing-0.36.2/referencing/_attrs.py 0000644 0000000 0000000 00000001427 13615410400 015152 0 ustar 00 from __future__ import annotations
from typing import NoReturn, TypeVar
from attrs import define as _define, frozen as _frozen
_T = TypeVar("_T")
def define(cls: type[_T]) -> type[_T]: # pragma: no cover
cls.__init_subclass__ = _do_not_subclass
return _define(cls)
def frozen(cls: type[_T]) -> type[_T]:
cls.__init_subclass__ = _do_not_subclass
return _frozen(cls)
class UnsupportedSubclassing(Exception):
def __str__(self):
return (
"Subclassing is not part of referencing's public API. "
"If no other suitable API exists for what you're trying to do, "
"feel free to file an issue asking for one."
)
@staticmethod
def _do_not_subclass() -> NoReturn: # pragma: no cover
raise UnsupportedSubclassing()
referencing-0.36.2/referencing/_attrs.pyi 0000644 0000000 0000000 00000001057 13615410400 015322 0 ustar 00 from typing import Any, Callable, TypeVar, Union
from attr import attrib, field
class UnsupportedSubclassing(Exception): ...
_T = TypeVar("_T")
def __dataclass_transform__(
*,
frozen_default: bool = False,
field_descriptors: tuple[Union[type, Callable[..., Any]], ...] = ...,
) -> Callable[[_T], _T]: ...
@__dataclass_transform__(field_descriptors=(attrib, field))
def define(cls: type[_T]) -> type[_T]: ...
@__dataclass_transform__(
frozen_default=True,
field_descriptors=(attrib, field),
)
def frozen(cls: type[_T]) -> type[_T]: ...
referencing-0.36.2/referencing/_core.py 0000644 0000000 0000000 00000060376 13615410400 014755 0 ustar 00 from __future__ import annotations
from collections.abc import Iterable, Iterator, Sequence
from enum import Enum
from typing import Any, Callable, ClassVar, Generic, Protocol
from urllib.parse import unquote, urldefrag, urljoin
from attrs import evolve, field
from rpds import HashTrieMap, HashTrieSet, List
try:
from typing_extensions import TypeVar
except ImportError: # pragma: no cover
from typing import TypeVar
from referencing import exceptions
from referencing._attrs import frozen
from referencing.typing import URI, Anchor as AnchorType, D, Mapping, Retrieve
EMPTY_UNCRAWLED: HashTrieSet[URI] = HashTrieSet()
EMPTY_PREVIOUS_RESOLVERS: List[URI] = List()
class _Unset(Enum):
"""
What sillyness...
"""
SENTINEL = 1
_UNSET = _Unset.SENTINEL
class _MaybeInSubresource(Protocol[D]):
def __call__(
self,
segments: Sequence[int | str],
resolver: Resolver[D],
subresource: Resource[D],
) -> Resolver[D]: ...
def _detect_or_error(contents: D) -> Specification[D]:
if not isinstance(contents, Mapping):
raise exceptions.CannotDetermineSpecification(contents)
jsonschema_dialect_id = contents.get("$schema") # type: ignore[reportUnknownMemberType]
if not isinstance(jsonschema_dialect_id, str):
raise exceptions.CannotDetermineSpecification(contents)
from referencing.jsonschema import specification_with
return specification_with(jsonschema_dialect_id)
def _detect_or_default(
default: Specification[D],
) -> Callable[[D], Specification[D]]:
def _detect(contents: D) -> Specification[D]:
if not isinstance(contents, Mapping):
return default
jsonschema_dialect_id = contents.get("$schema") # type: ignore[reportUnknownMemberType]
if jsonschema_dialect_id is None:
return default
from referencing.jsonschema import specification_with
return specification_with(
jsonschema_dialect_id, # type: ignore[reportUnknownArgumentType]
default=default,
)
return _detect
class _SpecificationDetector:
def __get__(
self,
instance: Specification[D] | None,
cls: type[Specification[D]],
) -> Callable[[D], Specification[D]]:
if instance is None:
return _detect_or_error
else:
return _detect_or_default(instance)
@frozen
class Specification(Generic[D]):
"""
A specification which defines referencing behavior.
The various methods of a `Specification` allow for varying referencing
behavior across JSON Schema specification versions, etc.
"""
#: A short human-readable name for the specification, used for debugging.
name: str
#: Find the ID of a given document.
id_of: Callable[[D], URI | None]
#: Retrieve the subresources of the given document (without traversing into
#: the subresources themselves).
subresources_of: Callable[[D], Iterable[D]]
#: While resolving a JSON pointer, conditionally enter a subresource
#: (if e.g. we have just entered a keyword whose value is a subresource)
maybe_in_subresource: _MaybeInSubresource[D]
#: Retrieve the anchors contained in the given document.
_anchors_in: Callable[
[Specification[D], D],
Iterable[AnchorType[D]],
] = field(alias="anchors_in")
#: An opaque specification where resources have no subresources
#: nor internal identifiers.
OPAQUE: ClassVar[Specification[Any]]
#: Attempt to discern which specification applies to the given contents.
#:
#: May be called either as an instance method or as a class method, with
#: slightly different behavior in the following case:
#:
#: Recall that not all contents contains enough internal information about
#: which specification it is written for -- the JSON Schema ``{}``,
#: for instance, is valid under many different dialects and may be
#: interpreted as any one of them.
#:
#: When this method is used as an instance method (i.e. called on a
#: specific specification), that specification is used as the default
#: if the given contents are unidentifiable.
#:
#: On the other hand when called as a class method, an error is raised.
#:
#: To reiterate, ``DRAFT202012.detect({})`` will return ``DRAFT202012``
#: whereas the class method ``Specification.detect({})`` will raise an
#: error.
#:
#: (Note that of course ``DRAFT202012.detect(...)`` may return some other
#: specification when given a schema which *does* identify as being for
#: another version).
#:
#: Raises:
#:
#: `CannotDetermineSpecification`
#:
#: if the given contents don't have any discernible
#: information which could be used to guess which
#: specification they identify as
detect = _SpecificationDetector()
def __repr__(self) -> str:
return f""
def anchors_in(self, contents: D):
"""
Retrieve the anchors contained in the given document.
"""
return self._anchors_in(self, contents)
def create_resource(self, contents: D) -> Resource[D]:
"""
Create a resource which is interpreted using this specification.
"""
return Resource(contents=contents, specification=self)
Specification.OPAQUE = Specification(
name="opaque",
id_of=lambda contents: None,
subresources_of=lambda contents: [],
anchors_in=lambda specification, contents: [],
maybe_in_subresource=lambda segments, resolver, subresource: resolver,
)
@frozen
class Resource(Generic[D]):
r"""
A document (deserialized JSON) with a concrete interpretation under a spec.
In other words, a Python object, along with an instance of `Specification`
which describes how the document interacts with referencing -- both
internally (how it refers to other `Resource`\ s) and externally (how it
should be identified such that it is referenceable by other documents).
"""
contents: D
_specification: Specification[D] = field(alias="specification")
@classmethod
def from_contents(
cls,
contents: D,
default_specification: (
type[Specification[D]] | Specification[D]
) = Specification,
) -> Resource[D]:
"""
Create a resource guessing which specification applies to the contents.
Raises:
`CannotDetermineSpecification`
if the given contents don't have any discernible
information which could be used to guess which
specification they identify as
"""
specification = default_specification.detect(contents)
return specification.create_resource(contents=contents)
@classmethod
def opaque(cls, contents: D) -> Resource[D]:
"""
Create an opaque `Resource` -- i.e. one with opaque specification.
See `Specification.OPAQUE` for details.
"""
return Specification.OPAQUE.create_resource(contents=contents)
def id(self) -> URI | None:
"""
Retrieve this resource's (specification-specific) identifier.
"""
id = self._specification.id_of(self.contents)
if id is None:
return
return id.rstrip("#")
def subresources(self) -> Iterable[Resource[D]]:
"""
Retrieve this resource's subresources.
"""
return (
Resource.from_contents(
each,
default_specification=self._specification,
)
for each in self._specification.subresources_of(self.contents)
)
def anchors(self) -> Iterable[AnchorType[D]]:
"""
Retrieve this resource's (specification-specific) identifier.
"""
return self._specification.anchors_in(self.contents)
def pointer(self, pointer: str, resolver: Resolver[D]) -> Resolved[D]:
"""
Resolve the given JSON pointer.
Raises:
`exceptions.PointerToNowhere`
if the pointer points to a location not present in the document
"""
if not pointer:
return Resolved(contents=self.contents, resolver=resolver)
contents = self.contents
segments: list[int | str] = []
for segment in unquote(pointer[1:]).split("/"):
if isinstance(contents, Sequence):
segment = int(segment)
else:
segment = segment.replace("~1", "/").replace("~0", "~")
try:
contents = contents[segment] # type: ignore[reportUnknownArgumentType]
except LookupError as lookup_error:
error = exceptions.PointerToNowhere(ref=pointer, resource=self)
raise error from lookup_error
segments.append(segment)
last = resolver
resolver = self._specification.maybe_in_subresource(
segments=segments,
resolver=resolver,
subresource=self._specification.create_resource(contents),
)
if resolver is not last:
segments = []
return Resolved(contents=contents, resolver=resolver) # type: ignore[reportUnknownArgumentType]
def _fail_to_retrieve(uri: URI):
raise exceptions.NoSuchResource(ref=uri)
@frozen
class Registry(Mapping[URI, Resource[D]]):
r"""
A registry of `Resource`\ s, each identified by their canonical URIs.
Registries store a collection of in-memory resources, and optionally
enable additional resources which may be stored elsewhere (e.g. in a
database, a separate set of files, over the network, etc.).
They also lazily walk their known resources, looking for subresources
within them. In other words, subresources contained within any added
resources will be retrievable via their own IDs (though this discovery of
subresources will be delayed until necessary).
Registries are immutable, and their methods return new instances of the
registry with the additional resources added to them.
The ``retrieve`` argument can be used to configure retrieval of resources
dynamically, either over the network, from a database, or the like.
Pass it a callable which will be called if any URI not present in the
registry is accessed. It must either return a `Resource` or else raise a
`NoSuchResource` exception indicating that the resource does not exist
even according to the retrieval logic.
"""
_resources: HashTrieMap[URI, Resource[D]] = field(
default=HashTrieMap(),
converter=HashTrieMap.convert, # type: ignore[reportGeneralTypeIssues]
alias="resources",
)
_anchors: HashTrieMap[tuple[URI, str], AnchorType[D]] = HashTrieMap()
_uncrawled: HashTrieSet[URI] = EMPTY_UNCRAWLED
_retrieve: Retrieve[D] = field(default=_fail_to_retrieve, alias="retrieve")
def __getitem__(self, uri: URI) -> Resource[D]:
"""
Return the (already crawled) `Resource` identified by the given URI.
"""
try:
return self._resources[uri.rstrip("#")]
except KeyError:
raise exceptions.NoSuchResource(ref=uri) from None
def __iter__(self) -> Iterator[URI]:
"""
Iterate over all crawled URIs in the registry.
"""
return iter(self._resources)
def __len__(self) -> int:
"""
Count the total number of fully crawled resources in this registry.
"""
return len(self._resources)
def __rmatmul__(
self,
new: Resource[D] | Iterable[Resource[D]],
) -> Registry[D]:
"""
Create a new registry with resource(s) added using their internal IDs.
Resources must have a internal IDs (e.g. the :kw:`$id` keyword in
modern JSON Schema versions), otherwise an error will be raised.
Both a single resource as well as an iterable of resources works, i.e.:
* ``resource @ registry`` or
* ``[iterable, of, multiple, resources] @ registry``
which -- again, assuming the resources have internal IDs -- is
equivalent to calling `Registry.with_resources` as such:
.. code:: python
registry.with_resources(
(resource.id(), resource) for resource in new_resources
)
Raises:
`NoInternalID`
if the resource(s) in fact do not have IDs
"""
if isinstance(new, Resource):
new = (new,)
resources = self._resources
uncrawled = self._uncrawled
for resource in new:
id = resource.id()
if id is None:
raise exceptions.NoInternalID(resource=resource)
uncrawled = uncrawled.insert(id)
resources = resources.insert(id, resource)
return evolve(self, resources=resources, uncrawled=uncrawled)
def __repr__(self) -> str:
size = len(self)
pluralized = "resource" if size == 1 else "resources"
if self._uncrawled:
uncrawled = len(self._uncrawled)
if uncrawled == size:
summary = f"uncrawled {pluralized}"
else:
summary = f"{pluralized}, {uncrawled} uncrawled"
else:
summary = f"{pluralized}"
return f""
def get_or_retrieve(self, uri: URI) -> Retrieved[D, Resource[D]]:
"""
Get a resource from the registry, crawling or retrieving if necessary.
May involve crawling to find the given URI if it is not already known,
so the returned object is a `Retrieved` object which contains both the
resource value as well as the registry which ultimately contained it.
"""
resource = self._resources.get(uri)
if resource is not None:
return Retrieved(registry=self, value=resource)
registry = self.crawl()
resource = registry._resources.get(uri)
if resource is not None:
return Retrieved(registry=registry, value=resource)
try:
resource = registry._retrieve(uri)
except (
exceptions.CannotDetermineSpecification,
exceptions.NoSuchResource,
):
raise
except Exception as error:
raise exceptions.Unretrievable(ref=uri) from error
else:
registry = registry.with_resource(uri, resource)
return Retrieved(registry=registry, value=resource)
def remove(self, uri: URI):
"""
Return a registry with the resource identified by a given URI removed.
"""
if uri not in self._resources:
raise exceptions.NoSuchResource(ref=uri)
return evolve(
self,
resources=self._resources.remove(uri),
uncrawled=self._uncrawled.discard(uri),
anchors=HashTrieMap(
(k, v) for k, v in self._anchors.items() if k[0] != uri
),
)
def anchor(self, uri: URI, name: str):
"""
Retrieve a given anchor from a resource which must already be crawled.
"""
value = self._anchors.get((uri, name))
if value is not None:
return Retrieved(value=value, registry=self)
registry = self.crawl()
value = registry._anchors.get((uri, name))
if value is not None:
return Retrieved(value=value, registry=registry)
resource = self[uri]
canonical_uri = resource.id()
if canonical_uri is not None:
value = registry._anchors.get((canonical_uri, name))
if value is not None:
return Retrieved(value=value, registry=registry)
if "/" in name:
raise exceptions.InvalidAnchor(
ref=uri,
resource=resource,
anchor=name,
)
raise exceptions.NoSuchAnchor(ref=uri, resource=resource, anchor=name)
def contents(self, uri: URI) -> D:
"""
Retrieve the (already crawled) contents identified by the given URI.
"""
return self[uri].contents
def crawl(self) -> Registry[D]:
"""
Crawl all added resources, discovering subresources.
"""
resources = self._resources
anchors = self._anchors
uncrawled = [(uri, resources[uri]) for uri in self._uncrawled]
while uncrawled:
uri, resource = uncrawled.pop()
id = resource.id()
if id is not None:
uri = urljoin(uri, id)
resources = resources.insert(uri, resource)
for each in resource.anchors():
anchors = anchors.insert((uri, each.name), each)
uncrawled.extend((uri, each) for each in resource.subresources())
return evolve(
self,
resources=resources,
anchors=anchors,
uncrawled=EMPTY_UNCRAWLED,
)
def with_resource(self, uri: URI, resource: Resource[D]):
"""
Add the given `Resource` to the registry, without crawling it.
"""
return self.with_resources([(uri, resource)])
def with_resources(
self,
pairs: Iterable[tuple[URI, Resource[D]]],
) -> Registry[D]:
r"""
Add the given `Resource`\ s to the registry, without crawling them.
"""
resources = self._resources
uncrawled = self._uncrawled
for uri, resource in pairs:
# Empty fragment URIs are equivalent to URIs without the fragment.
# TODO: Is this true for non JSON Schema resources? Probably not.
uri = uri.rstrip("#")
uncrawled = uncrawled.insert(uri)
resources = resources.insert(uri, resource)
return evolve(self, resources=resources, uncrawled=uncrawled)
def with_contents(
self,
pairs: Iterable[tuple[URI, D]],
**kwargs: Any,
) -> Registry[D]:
r"""
Add the given contents to the registry, autodetecting when necessary.
"""
return self.with_resources(
(uri, Resource.from_contents(each, **kwargs))
for uri, each in pairs
)
def combine(self, *registries: Registry[D]) -> Registry[D]:
"""
Combine together one or more other registries, producing a unified one.
"""
if registries == (self,):
return self
resources = self._resources
anchors = self._anchors
uncrawled = self._uncrawled
retrieve = self._retrieve
for registry in registries:
resources = resources.update(registry._resources)
anchors = anchors.update(registry._anchors)
uncrawled = uncrawled.update(registry._uncrawled)
if registry._retrieve is not _fail_to_retrieve: # type: ignore[reportUnnecessaryComparison] ???
if registry._retrieve is not retrieve is not _fail_to_retrieve: # type: ignore[reportUnnecessaryComparison] ???
raise ValueError( # noqa: TRY003
"Cannot combine registries with conflicting retrieval "
"functions.",
)
retrieve = registry._retrieve
return evolve(
self,
anchors=anchors,
resources=resources,
uncrawled=uncrawled,
retrieve=retrieve,
)
def resolver(self, base_uri: URI = "") -> Resolver[D]:
"""
Return a `Resolver` which resolves references against this registry.
"""
return Resolver(base_uri=base_uri, registry=self)
def resolver_with_root(self, resource: Resource[D]) -> Resolver[D]:
"""
Return a `Resolver` with a specific root resource.
"""
uri = resource.id() or ""
return Resolver(
base_uri=uri,
registry=self.with_resource(uri, resource),
)
#: An anchor or resource.
AnchorOrResource = TypeVar(
"AnchorOrResource",
AnchorType[Any],
Resource[Any],
default=Resource[Any],
)
@frozen
class Retrieved(Generic[D, AnchorOrResource]):
"""
A value retrieved from a `Registry`.
"""
value: AnchorOrResource
registry: Registry[D]
@frozen
class Resolved(Generic[D]):
"""
A reference resolved to its contents by a `Resolver`.
"""
contents: D
resolver: Resolver[D]
@frozen
class Resolver(Generic[D]):
"""
A reference resolver.
Resolvers help resolve references (including relative ones) by
pairing a fixed base URI with a `Registry`.
This object, under normal circumstances, is expected to be used by
*implementers of libraries* built on top of `referencing` (e.g. JSON Schema
implementations or other libraries resolving JSON references),
not directly by end-users populating registries or while writing
schemas or other resources.
References are resolved against the base URI, and the combined URI
is then looked up within the registry.
The process of resolving a reference may itself involve calculating
a *new* base URI for future reference resolution (e.g. if an
intermediate resource sets a new base URI), or may involve encountering
additional subresources and adding them to a new registry.
"""
_base_uri: URI = field(alias="base_uri")
_registry: Registry[D] = field(alias="registry")
_previous: List[URI] = field(default=List(), repr=False, alias="previous")
def lookup(self, ref: URI) -> Resolved[D]:
"""
Resolve the given reference to the resource it points to.
Raises:
`exceptions.Unresolvable`
or a subclass thereof (see below) if the reference isn't
resolvable
`exceptions.NoSuchAnchor`
if the reference is to a URI where a resource exists but
contains a plain name fragment which does not exist within
the resource
`exceptions.PointerToNowhere`
if the reference is to a URI where a resource exists but
contains a JSON pointer to a location within the resource
that does not exist
"""
if ref.startswith("#"):
uri, fragment = self._base_uri, ref[1:]
else:
uri, fragment = urldefrag(urljoin(self._base_uri, ref))
try:
retrieved = self._registry.get_or_retrieve(uri)
except exceptions.NoSuchResource:
raise exceptions.Unresolvable(ref=ref) from None
except exceptions.Unretrievable as error:
raise exceptions.Unresolvable(ref=ref) from error
if fragment.startswith("/"):
resolver = self._evolve(registry=retrieved.registry, base_uri=uri)
return retrieved.value.pointer(pointer=fragment, resolver=resolver)
if fragment:
retrieved = retrieved.registry.anchor(uri, fragment)
resolver = self._evolve(registry=retrieved.registry, base_uri=uri)
return retrieved.value.resolve(resolver=resolver)
resolver = self._evolve(registry=retrieved.registry, base_uri=uri)
return Resolved(contents=retrieved.value.contents, resolver=resolver)
def in_subresource(self, subresource: Resource[D]) -> Resolver[D]:
"""
Create a resolver for a subresource (which may have a new base URI).
"""
id = subresource.id()
if id is None:
return self
return evolve(self, base_uri=urljoin(self._base_uri, id))
def dynamic_scope(self) -> Iterable[tuple[URI, Registry[D]]]:
"""
In specs with such a notion, return the URIs in the dynamic scope.
"""
for uri in self._previous:
yield uri, self._registry
def _evolve(self, base_uri: URI, **kwargs: Any):
"""
Evolve, appending to the dynamic scope.
"""
previous = self._previous
if self._base_uri and (not previous or base_uri != self._base_uri):
previous = previous.push_front(self._base_uri)
return evolve(self, base_uri=base_uri, previous=previous, **kwargs)
@frozen
class Anchor(Generic[D]):
"""
A simple anchor in a `Resource`.
"""
name: str
resource: Resource[D]
def resolve(self, resolver: Resolver[D]):
"""
Return the resource for this anchor.
"""
return Resolved(contents=self.resource.contents, resolver=resolver)
referencing-0.36.2/referencing/exceptions.py 0000644 0000000 0000000 00000010120 13615410400 016025 0 ustar 00 """
Errors, oh no!
"""
from __future__ import annotations
from typing import TYPE_CHECKING, Any
import attrs
from referencing._attrs import frozen
if TYPE_CHECKING:
from referencing import Resource
from referencing.typing import URI
@frozen
class NoSuchResource(KeyError):
"""
The given URI is not present in a registry.
Unlike most exceptions, this class *is* intended to be publicly
instantiable and *is* part of the public API of the package.
"""
ref: URI
def __eq__(self, other: object) -> bool:
if self.__class__ is not other.__class__:
return NotImplemented
return attrs.astuple(self) == attrs.astuple(other)
def __hash__(self) -> int:
return hash(attrs.astuple(self))
@frozen
class NoInternalID(Exception):
"""
A resource has no internal ID, but one is needed.
E.g. in modern JSON Schema drafts, this is the :kw:`$id` keyword.
One might be needed if a resource was to-be added to a registry but no
other URI is available, and the resource doesn't declare its canonical URI.
"""
resource: Resource[Any]
def __eq__(self, other: object) -> bool:
if self.__class__ is not other.__class__:
return NotImplemented
return attrs.astuple(self) == attrs.astuple(other)
def __hash__(self) -> int:
return hash(attrs.astuple(self))
@frozen
class Unretrievable(KeyError):
"""
The given URI is not present in a registry, and retrieving it failed.
"""
ref: URI
def __eq__(self, other: object) -> bool:
if self.__class__ is not other.__class__:
return NotImplemented
return attrs.astuple(self) == attrs.astuple(other)
def __hash__(self) -> int:
return hash(attrs.astuple(self))
@frozen
class CannotDetermineSpecification(Exception):
"""
Attempting to detect the appropriate `Specification` failed.
This happens if no discernible information is found in the contents of the
new resource which would help identify it.
"""
contents: Any
def __eq__(self, other: object) -> bool:
if self.__class__ is not other.__class__:
return NotImplemented
return attrs.astuple(self) == attrs.astuple(other)
def __hash__(self) -> int:
return hash(attrs.astuple(self))
@attrs.frozen # Because here we allow subclassing below.
class Unresolvable(Exception):
"""
A reference was unresolvable.
"""
ref: URI
def __eq__(self, other: object) -> bool:
if self.__class__ is not other.__class__:
return NotImplemented
return attrs.astuple(self) == attrs.astuple(other)
def __hash__(self) -> int:
return hash(attrs.astuple(self))
@frozen
class PointerToNowhere(Unresolvable):
"""
A JSON Pointer leads to a part of a document that does not exist.
"""
resource: Resource[Any]
def __str__(self) -> str:
msg = f"{self.ref!r} does not exist within {self.resource.contents!r}"
if self.ref == "/":
msg += (
". The pointer '/' is a valid JSON Pointer but it points to "
"an empty string property ''. If you intended to point "
"to the entire resource, you should use '#'."
)
return msg
@frozen
class NoSuchAnchor(Unresolvable):
"""
An anchor does not exist within a particular resource.
"""
resource: Resource[Any]
anchor: str
def __str__(self) -> str:
return (
f"{self.anchor!r} does not exist within {self.resource.contents!r}"
)
@frozen
class InvalidAnchor(Unresolvable):
"""
An anchor which could never exist in a resource was dereferenced.
It is somehow syntactically invalid.
"""
resource: Resource[Any]
anchor: str
def __str__(self) -> str:
return (
f"'#{self.anchor}' is not a valid anchor, neither as a "
"plain name anchor nor as a JSON Pointer. You may have intended "
f"to use '#/{self.anchor}', as the slash is required *before each "
"segment* of a JSON pointer."
)
referencing-0.36.2/referencing/jsonschema.py 0000644 0000000 0000000 00000044304 13615410400 016011 0 ustar 00 """
Referencing implementations for JSON Schema specs (historic & current).
"""
from __future__ import annotations
from collections.abc import Iterable, Sequence, Set
from typing import Any, Union
from referencing import Anchor, Registry, Resource, Specification, exceptions
from referencing._attrs import frozen
from referencing._core import (
_UNSET, # type: ignore[reportPrivateUsage]
Resolved as _Resolved,
Resolver as _Resolver,
_Unset, # type: ignore[reportPrivateUsage]
)
from referencing.typing import URI, Anchor as AnchorType, Mapping
#: A JSON Schema which is a JSON object
ObjectSchema = Mapping[str, Any]
#: A JSON Schema of any kind
Schema = Union[bool, ObjectSchema]
#: A Resource whose contents are JSON Schemas
SchemaResource = Resource[Schema]
#: A JSON Schema Registry
SchemaRegistry = Registry[Schema]
#: The empty JSON Schema Registry
EMPTY_REGISTRY: SchemaRegistry = Registry()
@frozen
class UnknownDialect(Exception):
"""
A dialect identifier was found for a dialect unknown by this library.
If it's a custom ("unofficial") dialect, be sure you've registered it.
"""
uri: URI
def _dollar_id(contents: Schema) -> URI | None:
if isinstance(contents, bool):
return
return contents.get("$id")
def _legacy_dollar_id(contents: Schema) -> URI | None:
if isinstance(contents, bool) or "$ref" in contents:
return
id = contents.get("$id")
if id is not None and not id.startswith("#"):
return id
def _legacy_id(contents: ObjectSchema) -> URI | None:
if "$ref" in contents:
return
id = contents.get("id")
if id is not None and not id.startswith("#"):
return id
def _anchor(
specification: Specification[Schema],
contents: Schema,
) -> Iterable[AnchorType[Schema]]:
if isinstance(contents, bool):
return
anchor = contents.get("$anchor")
if anchor is not None:
yield Anchor(
name=anchor,
resource=specification.create_resource(contents),
)
dynamic_anchor = contents.get("$dynamicAnchor")
if dynamic_anchor is not None:
yield DynamicAnchor(
name=dynamic_anchor,
resource=specification.create_resource(contents),
)
def _anchor_2019(
specification: Specification[Schema],
contents: Schema,
) -> Iterable[Anchor[Schema]]:
if isinstance(contents, bool):
return []
anchor = contents.get("$anchor")
if anchor is None:
return []
return [
Anchor(
name=anchor,
resource=specification.create_resource(contents),
),
]
def _legacy_anchor_in_dollar_id(
specification: Specification[Schema],
contents: Schema,
) -> Iterable[Anchor[Schema]]:
if isinstance(contents, bool):
return []
id = contents.get("$id", "")
if not id.startswith("#"):
return []
return [
Anchor(
name=id[1:],
resource=specification.create_resource(contents),
),
]
def _legacy_anchor_in_id(
specification: Specification[ObjectSchema],
contents: ObjectSchema,
) -> Iterable[Anchor[ObjectSchema]]:
id = contents.get("id", "")
if not id.startswith("#"):
return []
return [
Anchor(
name=id[1:],
resource=specification.create_resource(contents),
),
]
def _subresources_of(
in_value: Set[str] = frozenset(),
in_subvalues: Set[str] = frozenset(),
in_subarray: Set[str] = frozenset(),
):
"""
Create a callable returning JSON Schema specification-style subschemas.
Relies on specifying the set of keywords containing subschemas in their
values, in a subobject's values, or in a subarray.
"""
def subresources_of(contents: Schema) -> Iterable[ObjectSchema]:
if isinstance(contents, bool):
return
for each in in_value:
if each in contents:
yield contents[each]
for each in in_subarray:
if each in contents:
yield from contents[each]
for each in in_subvalues:
if each in contents:
yield from contents[each].values()
return subresources_of
def _subresources_of_with_crazy_items(
in_value: Set[str] = frozenset(),
in_subvalues: Set[str] = frozenset(),
in_subarray: Set[str] = frozenset(),
):
"""
Specifically handle older drafts where there are some funky keywords.
"""
def subresources_of(contents: Schema) -> Iterable[ObjectSchema]:
if isinstance(contents, bool):
return
for each in in_value:
if each in contents:
yield contents[each]
for each in in_subarray:
if each in contents:
yield from contents[each]
for each in in_subvalues:
if each in contents:
yield from contents[each].values()
items = contents.get("items")
if items is not None:
if isinstance(items, Sequence):
yield from items
else:
yield items
return subresources_of
def _subresources_of_with_crazy_items_dependencies(
in_value: Set[str] = frozenset(),
in_subvalues: Set[str] = frozenset(),
in_subarray: Set[str] = frozenset(),
):
"""
Specifically handle older drafts where there are some funky keywords.
"""
def subresources_of(contents: Schema) -> Iterable[ObjectSchema]:
if isinstance(contents, bool):
return
for each in in_value:
if each in contents:
yield contents[each]
for each in in_subarray:
if each in contents:
yield from contents[each]
for each in in_subvalues:
if each in contents:
yield from contents[each].values()
items = contents.get("items")
if items is not None:
if isinstance(items, Sequence):
yield from items
else:
yield items
dependencies = contents.get("dependencies")
if dependencies is not None:
values = iter(dependencies.values())
value = next(values, None)
if isinstance(value, Mapping):
yield value
yield from values
return subresources_of
def _subresources_of_with_crazy_aP_items_dependencies(
in_value: Set[str] = frozenset(),
in_subvalues: Set[str] = frozenset(),
in_subarray: Set[str] = frozenset(),
):
"""
Specifically handle even older drafts where there are some funky keywords.
"""
def subresources_of(contents: ObjectSchema) -> Iterable[ObjectSchema]:
for each in in_value:
if each in contents:
yield contents[each]
for each in in_subarray:
if each in contents:
yield from contents[each]
for each in in_subvalues:
if each in contents:
yield from contents[each].values()
items = contents.get("items")
if items is not None:
if isinstance(items, Sequence):
yield from items
else:
yield items
dependencies = contents.get("dependencies")
if dependencies is not None:
values = iter(dependencies.values())
value = next(values, None)
if isinstance(value, Mapping):
yield value
yield from values
for each in "additionalItems", "additionalProperties":
value = contents.get(each)
if isinstance(value, Mapping):
yield value
return subresources_of
def _maybe_in_subresource(
in_value: Set[str] = frozenset(),
in_subvalues: Set[str] = frozenset(),
in_subarray: Set[str] = frozenset(),
):
in_child = in_subvalues | in_subarray
def maybe_in_subresource(
segments: Sequence[int | str],
resolver: _Resolver[Any],
subresource: Resource[Any],
) -> _Resolver[Any]:
_segments = iter(segments)
for segment in _segments:
if segment not in in_value and (
segment not in in_child or next(_segments, None) is None
):
return resolver
return resolver.in_subresource(subresource)
return maybe_in_subresource
def _maybe_in_subresource_crazy_items(
in_value: Set[str] = frozenset(),
in_subvalues: Set[str] = frozenset(),
in_subarray: Set[str] = frozenset(),
):
in_child = in_subvalues | in_subarray
def maybe_in_subresource(
segments: Sequence[int | str],
resolver: _Resolver[Any],
subresource: Resource[Any],
) -> _Resolver[Any]:
_segments = iter(segments)
for segment in _segments:
if segment == "items" and isinstance(
subresource.contents,
Mapping,
):
return resolver.in_subresource(subresource)
if segment not in in_value and (
segment not in in_child or next(_segments, None) is None
):
return resolver
return resolver.in_subresource(subresource)
return maybe_in_subresource
def _maybe_in_subresource_crazy_items_dependencies(
in_value: Set[str] = frozenset(),
in_subvalues: Set[str] = frozenset(),
in_subarray: Set[str] = frozenset(),
):
in_child = in_subvalues | in_subarray
def maybe_in_subresource(
segments: Sequence[int | str],
resolver: _Resolver[Any],
subresource: Resource[Any],
) -> _Resolver[Any]:
_segments = iter(segments)
for segment in _segments:
if segment in {"items", "dependencies"} and isinstance(
subresource.contents,
Mapping,
):
return resolver.in_subresource(subresource)
if segment not in in_value and (
segment not in in_child or next(_segments, None) is None
):
return resolver
return resolver.in_subresource(subresource)
return maybe_in_subresource
#: JSON Schema draft 2020-12
DRAFT202012 = Specification(
name="draft2020-12",
id_of=_dollar_id,
subresources_of=_subresources_of(
in_value={
"additionalProperties",
"contains",
"contentSchema",
"else",
"if",
"items",
"not",
"propertyNames",
"then",
"unevaluatedItems",
"unevaluatedProperties",
},
in_subarray={"allOf", "anyOf", "oneOf", "prefixItems"},
in_subvalues={
"$defs",
"definitions",
"dependentSchemas",
"patternProperties",
"properties",
},
),
anchors_in=_anchor,
maybe_in_subresource=_maybe_in_subresource(
in_value={
"additionalProperties",
"contains",
"contentSchema",
"else",
"if",
"items",
"not",
"propertyNames",
"then",
"unevaluatedItems",
"unevaluatedProperties",
},
in_subarray={"allOf", "anyOf", "oneOf", "prefixItems"},
in_subvalues={
"$defs",
"definitions",
"dependentSchemas",
"patternProperties",
"properties",
},
),
)
#: JSON Schema draft 2019-09
DRAFT201909 = Specification(
name="draft2019-09",
id_of=_dollar_id,
subresources_of=_subresources_of_with_crazy_items(
in_value={
"additionalItems",
"additionalProperties",
"contains",
"contentSchema",
"else",
"if",
"not",
"propertyNames",
"then",
"unevaluatedItems",
"unevaluatedProperties",
},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={
"$defs",
"definitions",
"dependentSchemas",
"patternProperties",
"properties",
},
),
anchors_in=_anchor_2019,
maybe_in_subresource=_maybe_in_subresource_crazy_items(
in_value={
"additionalItems",
"additionalProperties",
"contains",
"contentSchema",
"else",
"if",
"not",
"propertyNames",
"then",
"unevaluatedItems",
"unevaluatedProperties",
},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={
"$defs",
"definitions",
"dependentSchemas",
"patternProperties",
"properties",
},
),
)
#: JSON Schema draft 7
DRAFT7 = Specification(
name="draft-07",
id_of=_legacy_dollar_id,
subresources_of=_subresources_of_with_crazy_items_dependencies(
in_value={
"additionalItems",
"additionalProperties",
"contains",
"else",
"if",
"not",
"propertyNames",
"then",
},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
anchors_in=_legacy_anchor_in_dollar_id,
maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies(
in_value={
"additionalItems",
"additionalProperties",
"contains",
"else",
"if",
"not",
"propertyNames",
"then",
},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
)
#: JSON Schema draft 6
DRAFT6 = Specification(
name="draft-06",
id_of=_legacy_dollar_id,
subresources_of=_subresources_of_with_crazy_items_dependencies(
in_value={
"additionalItems",
"additionalProperties",
"contains",
"not",
"propertyNames",
},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
anchors_in=_legacy_anchor_in_dollar_id,
maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies(
in_value={
"additionalItems",
"additionalProperties",
"contains",
"not",
"propertyNames",
},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
)
#: JSON Schema draft 4
DRAFT4 = Specification(
name="draft-04",
id_of=_legacy_id,
subresources_of=_subresources_of_with_crazy_aP_items_dependencies(
in_value={"not"},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
anchors_in=_legacy_anchor_in_id,
maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies(
in_value={"additionalItems", "additionalProperties", "not"},
in_subarray={"allOf", "anyOf", "oneOf"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
)
#: JSON Schema draft 3
DRAFT3 = Specification(
name="draft-03",
id_of=_legacy_id,
subresources_of=_subresources_of_with_crazy_aP_items_dependencies(
in_subarray={"extends"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
anchors_in=_legacy_anchor_in_id,
maybe_in_subresource=_maybe_in_subresource_crazy_items_dependencies(
in_value={"additionalItems", "additionalProperties"},
in_subarray={"extends"},
in_subvalues={"definitions", "patternProperties", "properties"},
),
)
_SPECIFICATIONS: Registry[Specification[Schema]] = Registry(
{
dialect_id: Resource.opaque(specification)
for dialect_id, specification in [
("https://json-schema.org/draft/2020-12/schema", DRAFT202012),
("https://json-schema.org/draft/2019-09/schema", DRAFT201909),
("http://json-schema.org/draft-07/schema", DRAFT7),
("http://json-schema.org/draft-06/schema", DRAFT6),
("http://json-schema.org/draft-04/schema", DRAFT4),
("http://json-schema.org/draft-03/schema", DRAFT3),
]
},
)
def specification_with(
dialect_id: URI,
default: Specification[Any] | _Unset = _UNSET,
) -> Specification[Any]:
"""
Retrieve the `Specification` with the given dialect identifier.
Raises:
`UnknownDialect`
if the given ``dialect_id`` isn't known
"""
resource = _SPECIFICATIONS.get(dialect_id.rstrip("#"))
if resource is not None:
return resource.contents
if default is _UNSET:
raise UnknownDialect(dialect_id)
return default
@frozen
class DynamicAnchor:
"""
Dynamic anchors, introduced in draft 2020.
"""
name: str
resource: SchemaResource
def resolve(self, resolver: _Resolver[Schema]) -> _Resolved[Schema]:
"""
Resolve this anchor dynamically.
"""
last = self.resource
for uri, registry in resolver.dynamic_scope():
try:
anchor = registry.anchor(uri, self.name).value
except exceptions.NoSuchAnchor:
continue
if isinstance(anchor, DynamicAnchor):
last = anchor.resource
return _Resolved(
contents=last.contents,
resolver=resolver.in_subresource(last),
)
def lookup_recursive_ref(resolver: _Resolver[Schema]) -> _Resolved[Schema]:
"""
Recursive references (via recursive anchors), present only in draft 2019.
As per the 2019 specification (§ 8.2.4.2.1), only the ``#`` recursive
reference is supported (and is therefore assumed to be the relevant
reference).
"""
resolved = resolver.lookup("#")
if isinstance(resolved.contents, Mapping) and resolved.contents.get(
"$recursiveAnchor",
):
for uri, _ in resolver.dynamic_scope():
next_resolved = resolver.lookup(uri)
if not isinstance(
next_resolved.contents,
Mapping,
) or not next_resolved.contents.get("$recursiveAnchor"):
break
resolved = next_resolved
return resolved
referencing-0.36.2/referencing/py.typed 0000644 0000000 0000000 00000000000 13615410400 014765 0 ustar 00 referencing-0.36.2/referencing/retrieval.py 0000644 0000000 0000000 00000005211 13615410400 015646 0 ustar 00 """
Helpers related to (dynamic) resource retrieval.
"""
from __future__ import annotations
from functools import lru_cache
from typing import TYPE_CHECKING, Callable
import json
try:
from typing_extensions import TypeVar
except ImportError: # pragma: no cover
from typing import TypeVar
from referencing import Resource
if TYPE_CHECKING:
from referencing.typing import URI, D, Retrieve
#: A serialized document (e.g. a JSON string)
_T = TypeVar("_T", default=str)
def to_cached_resource(
cache: Callable[[Retrieve[D]], Retrieve[D]] | None = None,
loads: Callable[[_T], D] = json.loads,
from_contents: Callable[[D], Resource[D]] = Resource.from_contents,
) -> Callable[[Callable[[URI], _T]], Retrieve[D]]:
"""
Create a retriever which caches its return values from a simpler callable.
Takes a function which returns things like serialized JSON (strings) and
returns something suitable for passing to `Registry` as a retrieve
function.
This decorator both reduces a small bit of boilerplate for a common case
(deserializing JSON from strings and creating `Resource` objects from the
result) as well as makes the probable need for caching a bit easier.
Retrievers which otherwise do expensive operations (like hitting the
network) might otherwise be called repeatedly.
Examples
--------
.. testcode::
from referencing import Registry
from referencing.typing import URI
import referencing.retrieval
@referencing.retrieval.to_cached_resource()
def retrieve(uri: URI):
print(f"Retrieved {uri}")
# Normally, go get some expensive JSON from the network, a file ...
return '''
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"foo": "bar"
}
'''
one = Registry(retrieve=retrieve).get_or_retrieve("urn:example:foo")
print(one.value.contents["foo"])
# Retrieving the same URI again reuses the same value (and thus doesn't
# print another retrieval message here)
two = Registry(retrieve=retrieve).get_or_retrieve("urn:example:foo")
print(two.value.contents["foo"])
.. testoutput::
Retrieved urn:example:foo
bar
bar
"""
if cache is None:
cache = lru_cache(maxsize=None)
def decorator(retrieve: Callable[[URI], _T]):
@cache
def cached_retrieve(uri: URI):
response = retrieve(uri)
contents = loads(response)
return from_contents(contents)
return cached_retrieve
return decorator
referencing-0.36.2/referencing/typing.py 0000644 0000000 0000000 00000002645 13615410400 015173 0 ustar 00 """
Type-annotation related support for the referencing library.
"""
from __future__ import annotations
from collections.abc import Mapping as Mapping
from typing import TYPE_CHECKING, Any, Protocol
try:
from typing_extensions import TypeVar
except ImportError: # pragma: no cover
from typing import TypeVar
if TYPE_CHECKING:
from referencing._core import Resolved, Resolver, Resource
#: A URI which identifies a `Resource`.
URI = str
#: The type of documents within a registry.
D = TypeVar("D", default=Any)
class Retrieve(Protocol[D]):
"""
A retrieval callable, usable within a `Registry` for resource retrieval.
Does not make assumptions about where the resource might be coming from.
"""
def __call__(self, uri: URI) -> Resource[D]:
"""
Retrieve the resource with the given URI.
Raise `referencing.exceptions.NoSuchResource` if you wish to indicate
the retriever cannot lookup the given URI.
"""
...
class Anchor(Protocol[D]):
"""
An anchor within a `Resource`.
Beyond "simple" anchors, some specifications like JSON Schema's 2020
version have dynamic anchors.
"""
@property
def name(self) -> str:
"""
Return the name of this anchor.
"""
...
def resolve(self, resolver: Resolver[D]) -> Resolved[D]:
"""
Return the resource for this anchor.
"""
...
referencing-0.36.2/referencing/tests/__init__.py 0000644 0000000 0000000 00000000000 13615410400 016541 0 ustar 00 referencing-0.36.2/referencing/tests/test_core.py 0000644 0000000 0000000 00000111736 13615410400 017014 0 ustar 00 from rpds import HashTrieMap
import pytest
from referencing import Anchor, Registry, Resource, Specification, exceptions
from referencing.jsonschema import DRAFT202012
ID_AND_CHILDREN = Specification(
name="id-and-children",
id_of=lambda contents: contents.get("ID"),
subresources_of=lambda contents: contents.get("children", []),
anchors_in=lambda specification, contents: [
Anchor(
name=name,
resource=specification.create_resource(contents=each),
)
for name, each in contents.get("anchors", {}).items()
],
maybe_in_subresource=lambda segments, resolver, subresource: (
resolver.in_subresource(subresource)
if not len(segments) % 2
and all(each == "children" for each in segments[::2])
else resolver
),
)
def blow_up(uri): # pragma: no cover
"""
A retriever suitable for use in tests which expect it never to be used.
"""
raise RuntimeError("This retrieve function expects to never be called!")
class TestRegistry:
def test_with_resource(self):
"""
Adding a resource to the registry then allows re-retrieving it.
"""
resource = Resource.opaque(contents={"foo": "bar"})
uri = "urn:example"
registry = Registry().with_resource(uri=uri, resource=resource)
assert registry[uri] is resource
def test_with_resources(self):
"""
Adding multiple resources to the registry is like adding each one.
"""
one = Resource.opaque(contents={})
two = Resource(contents={"foo": "bar"}, specification=ID_AND_CHILDREN)
registry = Registry().with_resources(
[
("http://example.com/1", one),
("http://example.com/foo/bar", two),
],
)
assert registry == Registry().with_resource(
uri="http://example.com/1",
resource=one,
).with_resource(
uri="http://example.com/foo/bar",
resource=two,
)
def test_matmul_resource(self):
uri = "urn:example:resource"
resource = ID_AND_CHILDREN.create_resource({"ID": uri, "foo": 12})
registry = resource @ Registry()
assert registry == Registry().with_resource(uri, resource)
def test_matmul_many_resources(self):
one_uri = "urn:example:one"
one = ID_AND_CHILDREN.create_resource({"ID": one_uri, "foo": 12})
two_uri = "urn:example:two"
two = ID_AND_CHILDREN.create_resource({"ID": two_uri, "foo": 12})
registry = [one, two] @ Registry()
assert registry == Registry().with_resources(
[(one_uri, one), (two_uri, two)],
)
def test_matmul_resource_without_id(self):
resource = Resource.opaque(contents={"foo": "bar"})
with pytest.raises(exceptions.NoInternalID) as e:
resource @ Registry()
assert e.value == exceptions.NoInternalID(resource=resource)
def test_with_contents_from_json_schema(self):
uri = "urn:example"
schema = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
registry = Registry().with_contents([(uri, schema)])
expected = Resource(contents=schema, specification=DRAFT202012)
assert registry[uri] == expected
def test_with_contents_and_default_specification(self):
uri = "urn:example"
registry = Registry().with_contents(
[(uri, {"foo": "bar"})],
default_specification=Specification.OPAQUE,
)
assert registry[uri] == Resource.opaque({"foo": "bar"})
def test_len(self):
total = 5
registry = Registry().with_contents(
[(str(i), {"foo": "bar"}) for i in range(total)],
default_specification=Specification.OPAQUE,
)
assert len(registry) == total
def test_bool_empty(self):
assert not Registry()
def test_bool_not_empty(self):
registry = Registry().with_contents(
[(str(i), {"foo": "bar"}) for i in range(3)],
default_specification=Specification.OPAQUE,
)
assert registry
def test_iter(self):
registry = Registry().with_contents(
[(str(i), {"foo": "bar"}) for i in range(8)],
default_specification=Specification.OPAQUE,
)
assert set(registry) == {str(i) for i in range(8)}
def test_crawl_still_has_top_level_resource(self):
resource = Resource.opaque({"foo": "bar"})
uri = "urn:example"
registry = Registry({uri: resource}).crawl()
assert registry[uri] is resource
def test_crawl_finds_a_subresource(self):
child_id = "urn:child"
root = ID_AND_CHILDREN.create_resource(
{"ID": "urn:root", "children": [{"ID": child_id, "foo": 12}]},
)
registry = root @ Registry()
with pytest.raises(LookupError):
registry[child_id]
expected = ID_AND_CHILDREN.create_resource({"ID": child_id, "foo": 12})
assert registry.crawl()[child_id] == expected
def test_crawl_finds_anchors_with_id(self):
resource = ID_AND_CHILDREN.create_resource(
{"ID": "urn:bar", "anchors": {"foo": 12}},
)
registry = resource @ Registry()
assert registry.crawl().anchor(resource.id(), "foo").value == Anchor(
name="foo",
resource=ID_AND_CHILDREN.create_resource(12),
)
def test_crawl_finds_anchors_no_id(self):
resource = ID_AND_CHILDREN.create_resource({"anchors": {"foo": 12}})
registry = Registry().with_resource("urn:root", resource)
assert registry.crawl().anchor("urn:root", "foo").value == Anchor(
name="foo",
resource=ID_AND_CHILDREN.create_resource(12),
)
def test_contents(self):
resource = Resource.opaque({"foo": "bar"})
uri = "urn:example"
registry = Registry().with_resource(uri, resource)
assert registry.contents(uri) == {"foo": "bar"}
def test_getitem_strips_empty_fragments(self):
uri = "http://example.com/"
resource = ID_AND_CHILDREN.create_resource({"ID": uri + "#"})
registry = resource @ Registry()
assert registry[uri] == registry[uri + "#"] == resource
def test_contents_strips_empty_fragments(self):
uri = "http://example.com/"
resource = ID_AND_CHILDREN.create_resource({"ID": uri + "#"})
registry = resource @ Registry()
assert (
registry.contents(uri)
== registry.contents(uri + "#")
== {"ID": uri + "#"}
)
def test_contents_nonexistent_resource(self):
registry = Registry()
with pytest.raises(exceptions.NoSuchResource) as e:
registry.contents("urn:example")
assert e.value == exceptions.NoSuchResource(ref="urn:example")
def test_crawled_anchor(self):
resource = ID_AND_CHILDREN.create_resource({"anchors": {"foo": "bar"}})
registry = Registry().with_resource("urn:example", resource)
retrieved = registry.anchor("urn:example", "foo")
assert retrieved.value == Anchor(
name="foo",
resource=ID_AND_CHILDREN.create_resource("bar"),
)
assert retrieved.registry == registry.crawl()
def test_anchor_in_nonexistent_resource(self):
registry = Registry()
with pytest.raises(exceptions.NoSuchResource) as e:
registry.anchor("urn:example", "foo")
assert e.value == exceptions.NoSuchResource(ref="urn:example")
def test_init(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
registry = Registry(
{
"http://example.com/1": one,
"http://example.com/foo/bar": two,
},
)
assert (
registry
== Registry()
.with_resources(
[
("http://example.com/1", one),
("http://example.com/foo/bar", two),
],
)
.crawl()
)
def test_dict_conversion(self):
"""
Passing a `dict` to `Registry` gets converted to a `HashTrieMap`.
So continuing to use the registry works.
"""
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
registry = Registry(
{"http://example.com/1": one},
).with_resource("http://example.com/foo/bar", two)
assert (
registry.crawl()
== Registry()
.with_resources(
[
("http://example.com/1", one),
("http://example.com/foo/bar", two),
],
)
.crawl()
)
def test_no_such_resource(self):
registry = Registry()
with pytest.raises(exceptions.NoSuchResource) as e:
registry["urn:bigboom"]
assert e.value == exceptions.NoSuchResource(ref="urn:bigboom")
def test_combine(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
three = ID_AND_CHILDREN.create_resource({"baz": "quux"})
four = ID_AND_CHILDREN.create_resource({"anchors": {"foo": 12}})
first = Registry({"http://example.com/1": one})
second = Registry().with_resource("http://example.com/foo/bar", two)
third = Registry(
{
"http://example.com/1": one,
"http://example.com/baz": three,
},
)
fourth = (
Registry()
.with_resource(
"http://example.com/foo/quux",
four,
)
.crawl()
)
assert first.combine(second, third, fourth) == Registry(
[
("http://example.com/1", one),
("http://example.com/baz", three),
("http://example.com/foo/quux", four),
],
anchors=HashTrieMap(
{
("http://example.com/foo/quux", "foo"): Anchor(
name="foo",
resource=ID_AND_CHILDREN.create_resource(12),
),
},
),
).with_resource("http://example.com/foo/bar", two)
def test_combine_self(self):
"""
Combining a registry with itself short-circuits.
This is a performance optimization -- otherwise we do lots more work
(in jsonschema this seems to correspond to making the test suite take
*3x* longer).
"""
registry = Registry({"urn:foo": "bar"})
assert registry.combine(registry) is registry
def test_combine_with_uncrawled_resources(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
three = ID_AND_CHILDREN.create_resource({"baz": "quux"})
first = Registry().with_resource("http://example.com/1", one)
second = Registry().with_resource("http://example.com/foo/bar", two)
third = Registry(
{
"http://example.com/1": one,
"http://example.com/baz": three,
},
)
expected = Registry(
[
("http://example.com/1", one),
("http://example.com/foo/bar", two),
("http://example.com/baz", three),
],
)
combined = first.combine(second, third)
assert combined != expected
assert combined.crawl() == expected
def test_combine_with_single_retrieve(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
three = ID_AND_CHILDREN.create_resource({"baz": "quux"})
def retrieve(uri): # pragma: no cover
pass
first = Registry().with_resource("http://example.com/1", one)
second = Registry(
retrieve=retrieve,
).with_resource("http://example.com/2", two)
third = Registry().with_resource("http://example.com/3", three)
assert first.combine(second, third) == Registry(
retrieve=retrieve,
).with_resources(
[
("http://example.com/1", one),
("http://example.com/2", two),
("http://example.com/3", three),
],
)
assert second.combine(first, third) == Registry(
retrieve=retrieve,
).with_resources(
[
("http://example.com/1", one),
("http://example.com/2", two),
("http://example.com/3", three),
],
)
def test_combine_with_common_retrieve(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
three = ID_AND_CHILDREN.create_resource({"baz": "quux"})
def retrieve(uri): # pragma: no cover
pass
first = Registry(retrieve=retrieve).with_resource(
"http://example.com/1",
one,
)
second = Registry(
retrieve=retrieve,
).with_resource("http://example.com/2", two)
third = Registry(retrieve=retrieve).with_resource(
"http://example.com/3",
three,
)
assert first.combine(second, third) == Registry(
retrieve=retrieve,
).with_resources(
[
("http://example.com/1", one),
("http://example.com/2", two),
("http://example.com/3", three),
],
)
assert second.combine(first, third) == Registry(
retrieve=retrieve,
).with_resources(
[
("http://example.com/1", one),
("http://example.com/2", two),
("http://example.com/3", three),
],
)
def test_combine_conflicting_retrieve(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
three = ID_AND_CHILDREN.create_resource({"baz": "quux"})
def foo_retrieve(uri): # pragma: no cover
pass
def bar_retrieve(uri): # pragma: no cover
pass
first = Registry(retrieve=foo_retrieve).with_resource(
"http://example.com/1",
one,
)
second = Registry().with_resource("http://example.com/2", two)
third = Registry(retrieve=bar_retrieve).with_resource(
"http://example.com/3",
three,
)
with pytest.raises(Exception, match="conflict.*retriev"):
first.combine(second, third)
def test_remove(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
registry = Registry({"urn:foo": one, "urn:bar": two})
assert registry.remove("urn:foo") == Registry({"urn:bar": two})
def test_remove_uncrawled(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
registry = Registry().with_resources(
[("urn:foo", one), ("urn:bar", two)],
)
assert registry.remove("urn:foo") == Registry().with_resource(
"urn:bar",
two,
)
def test_remove_with_anchors(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"anchors": {"foo": "bar"}})
registry = (
Registry()
.with_resources(
[("urn:foo", one), ("urn:bar", two)],
)
.crawl()
)
assert (
registry.remove("urn:bar")
== Registry()
.with_resource(
"urn:foo",
one,
)
.crawl()
)
def test_remove_nonexistent_uri(self):
with pytest.raises(exceptions.NoSuchResource) as e:
Registry().remove("urn:doesNotExist")
assert e.value == exceptions.NoSuchResource(ref="urn:doesNotExist")
def test_retrieve(self):
foo = Resource.opaque({"foo": "bar"})
registry = Registry(retrieve=lambda uri: foo)
assert registry.get_or_retrieve("urn:example").value == foo
def test_retrieve_arbitrary_exception(self):
foo = Resource.opaque({"foo": "bar"})
def retrieve(uri):
if uri == "urn:succeed":
return foo
raise Exception("Oh no!")
registry = Registry(retrieve=retrieve)
assert registry.get_or_retrieve("urn:succeed").value == foo
with pytest.raises(exceptions.Unretrievable):
registry.get_or_retrieve("urn:uhoh")
def test_retrieve_no_such_resource(self):
foo = Resource.opaque({"foo": "bar"})
def retrieve(uri):
if uri == "urn:succeed":
return foo
raise exceptions.NoSuchResource(ref=uri)
registry = Registry(retrieve=retrieve)
assert registry.get_or_retrieve("urn:succeed").value == foo
with pytest.raises(exceptions.NoSuchResource):
registry.get_or_retrieve("urn:uhoh")
def test_retrieve_cannot_determine_specification(self):
def retrieve(uri):
return Resource.from_contents({})
registry = Registry(retrieve=retrieve)
with pytest.raises(exceptions.CannotDetermineSpecification):
registry.get_or_retrieve("urn:uhoh")
def test_retrieve_already_available_resource(self):
foo = Resource.opaque({"foo": "bar"})
registry = Registry({"urn:example": foo}, retrieve=blow_up)
assert registry["urn:example"] == foo
assert registry.get_or_retrieve("urn:example").value == foo
def test_retrieve_first_checks_crawlable_resource(self):
child = ID_AND_CHILDREN.create_resource({"ID": "urn:child", "foo": 12})
root = ID_AND_CHILDREN.create_resource({"children": [child.contents]})
registry = Registry(retrieve=blow_up).with_resource("urn:root", root)
assert registry.crawl()["urn:child"] == child
def test_resolver(self):
one = Resource.opaque(contents={})
registry = Registry({"http://example.com": one})
resolver = registry.resolver(base_uri="http://example.com")
assert resolver.lookup("#").contents == {}
def test_resolver_with_root_identified(self):
root = ID_AND_CHILDREN.create_resource({"ID": "http://example.com"})
resolver = Registry().resolver_with_root(root)
assert resolver.lookup("http://example.com").contents == root.contents
assert resolver.lookup("#").contents == root.contents
def test_resolver_with_root_unidentified(self):
root = Resource.opaque(contents={})
resolver = Registry().resolver_with_root(root)
assert resolver.lookup("#").contents == root.contents
def test_repr(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
registry = Registry().with_resources(
[
("http://example.com/1", one),
("http://example.com/foo/bar", two),
],
)
assert repr(registry) == ""
assert repr(registry.crawl()) == ""
def test_repr_mixed_crawled(self):
one = Resource.opaque(contents={})
two = ID_AND_CHILDREN.create_resource({"foo": "bar"})
registry = (
Registry(
{"http://example.com/1": one},
)
.crawl()
.with_resource(uri="http://example.com/foo/bar", resource=two)
)
assert repr(registry) == ""
def test_repr_one_resource(self):
registry = Registry().with_resource(
uri="http://example.com/1",
resource=Resource.opaque(contents={}),
)
assert repr(registry) == ""
def test_repr_empty(self):
assert repr(Registry()) == ""
class TestResource:
def test_from_contents_from_json_schema(self):
schema = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
resource = Resource.from_contents(schema)
assert resource == Resource(contents=schema, specification=DRAFT202012)
def test_from_contents_with_no_discernible_information(self):
"""
Creating a resource with no discernible way to see what
specification it belongs to (e.g. no ``$schema`` keyword for JSON
Schema) raises an error.
"""
with pytest.raises(exceptions.CannotDetermineSpecification):
Resource.from_contents({"foo": "bar"})
def test_from_contents_with_no_discernible_information_and_default(self):
resource = Resource.from_contents(
{"foo": "bar"},
default_specification=Specification.OPAQUE,
)
assert resource == Resource.opaque(contents={"foo": "bar"})
def test_from_contents_unneeded_default(self):
schema = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
resource = Resource.from_contents(
schema,
default_specification=Specification.OPAQUE,
)
assert resource == Resource(
contents=schema,
specification=DRAFT202012,
)
def test_non_mapping_from_contents(self):
resource = Resource.from_contents(
True,
default_specification=ID_AND_CHILDREN,
)
assert resource == Resource(
contents=True,
specification=ID_AND_CHILDREN,
)
def test_from_contents_with_fallback(self):
resource = Resource.from_contents(
{"foo": "bar"},
default_specification=Specification.OPAQUE,
)
assert resource == Resource.opaque(contents={"foo": "bar"})
def test_id_delegates_to_specification(self):
specification = Specification(
name="",
id_of=lambda contents: "urn:fixedID",
subresources_of=lambda contents: [],
anchors_in=lambda specification, contents: [],
maybe_in_subresource=(
lambda segments, resolver, subresource: resolver
),
)
resource = Resource(
contents={"foo": "baz"},
specification=specification,
)
assert resource.id() == "urn:fixedID"
def test_id_strips_empty_fragment(self):
uri = "http://example.com/"
root = ID_AND_CHILDREN.create_resource({"ID": uri + "#"})
assert root.id() == uri
def test_subresources_delegates_to_specification(self):
resource = ID_AND_CHILDREN.create_resource({"children": [{}, 12]})
assert list(resource.subresources()) == [
ID_AND_CHILDREN.create_resource(each) for each in [{}, 12]
]
def test_subresource_with_different_specification(self):
schema = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
resource = ID_AND_CHILDREN.create_resource({"children": [schema]})
assert list(resource.subresources()) == [
DRAFT202012.create_resource(schema),
]
def test_anchors_delegates_to_specification(self):
resource = ID_AND_CHILDREN.create_resource(
{"anchors": {"foo": {}, "bar": 1, "baz": ""}},
)
assert list(resource.anchors()) == [
Anchor(name="foo", resource=ID_AND_CHILDREN.create_resource({})),
Anchor(name="bar", resource=ID_AND_CHILDREN.create_resource(1)),
Anchor(name="baz", resource=ID_AND_CHILDREN.create_resource("")),
]
def test_pointer_to_mapping(self):
resource = Resource.opaque(contents={"foo": "baz"})
resolver = Registry().resolver()
assert resource.pointer("/foo", resolver=resolver).contents == "baz"
def test_pointer_to_array(self):
resource = Resource.opaque(contents={"foo": {"bar": [3]}})
resolver = Registry().resolver()
assert resource.pointer("/foo/bar/0", resolver=resolver).contents == 3
def test_root_pointer(self):
contents = {"foo": "baz"}
resource = Resource.opaque(contents=contents)
resolver = Registry().resolver()
assert resource.pointer("", resolver=resolver).contents == contents
def test_opaque(self):
contents = {"foo": "bar"}
assert Resource.opaque(contents) == Resource(
contents=contents,
specification=Specification.OPAQUE,
)
class TestResolver:
def test_lookup_exact_uri(self):
resource = Resource.opaque(contents={"foo": "baz"})
resolver = Registry({"http://example.com/1": resource}).resolver()
resolved = resolver.lookup("http://example.com/1")
assert resolved.contents == resource.contents
def test_lookup_subresource(self):
root = ID_AND_CHILDREN.create_resource(
{
"ID": "http://example.com/",
"children": [
{"ID": "http://example.com/a", "foo": 12},
],
},
)
registry = root @ Registry()
resolved = registry.resolver().lookup("http://example.com/a")
assert resolved.contents == {"ID": "http://example.com/a", "foo": 12}
def test_lookup_anchor_with_id(self):
root = ID_AND_CHILDREN.create_resource(
{
"ID": "http://example.com/",
"anchors": {"foo": 12},
},
)
registry = root @ Registry()
resolved = registry.resolver().lookup("http://example.com/#foo")
assert resolved.contents == 12
def test_lookup_anchor_without_id(self):
root = ID_AND_CHILDREN.create_resource({"anchors": {"foo": 12}})
resolver = Registry().with_resource("urn:example", root).resolver()
resolved = resolver.lookup("urn:example#foo")
assert resolved.contents == 12
def test_lookup_unknown_reference(self):
resolver = Registry().resolver()
ref = "http://example.com/does/not/exist"
with pytest.raises(exceptions.Unresolvable) as e:
resolver.lookup(ref)
assert e.value == exceptions.Unresolvable(ref=ref)
def test_lookup_non_existent_pointer(self):
resource = Resource.opaque({"foo": {}})
resolver = Registry({"http://example.com/1": resource}).resolver()
ref = "http://example.com/1#/foo/bar"
with pytest.raises(exceptions.Unresolvable) as e:
resolver.lookup(ref)
assert e.value == exceptions.PointerToNowhere(
ref="/foo/bar",
resource=resource,
)
assert str(e.value) == "'/foo/bar' does not exist within {'foo': {}}"
def test_lookup_non_existent_pointer_to_array_index(self):
resource = Resource.opaque([1, 2, 4, 8])
resolver = Registry({"http://example.com/1": resource}).resolver()
ref = "http://example.com/1#/10"
with pytest.raises(exceptions.Unresolvable) as e:
resolver.lookup(ref)
assert e.value == exceptions.PointerToNowhere(
ref="/10",
resource=resource,
)
def test_lookup_pointer_to_empty_string(self):
resolver = Registry().resolver_with_root(Resource.opaque({"": {}}))
assert resolver.lookup("#/").contents == {}
def test_lookup_non_existent_pointer_to_empty_string(self):
resource = Resource.opaque({"foo": {}})
resolver = Registry().resolver_with_root(resource)
with pytest.raises(
exceptions.Unresolvable,
match="^'/' does not exist within {'foo': {}}.*'#'",
) as e:
resolver.lookup("#/")
assert e.value == exceptions.PointerToNowhere(
ref="/",
resource=resource,
)
def test_lookup_non_existent_anchor(self):
root = ID_AND_CHILDREN.create_resource({"anchors": {}})
resolver = Registry().with_resource("urn:example", root).resolver()
resolved = resolver.lookup("urn:example")
assert resolved.contents == root.contents
ref = "urn:example#noSuchAnchor"
with pytest.raises(exceptions.Unresolvable) as e:
resolver.lookup(ref)
assert "'noSuchAnchor' does not exist" in str(e.value)
assert e.value == exceptions.NoSuchAnchor(
ref="urn:example",
resource=root,
anchor="noSuchAnchor",
)
def test_lookup_invalid_JSON_pointerish_anchor(self):
resolver = Registry().resolver_with_root(
ID_AND_CHILDREN.create_resource(
{
"ID": "http://example.com/",
"foo": {"bar": 12},
},
),
)
valid = resolver.lookup("#/foo/bar")
assert valid.contents == 12
with pytest.raises(exceptions.InvalidAnchor) as e:
resolver.lookup("#foo/bar")
assert " '#/foo/bar'" in str(e.value)
def test_lookup_retrieved_resource(self):
resource = Resource.opaque(contents={"foo": "baz"})
resolver = Registry(retrieve=lambda uri: resource).resolver()
resolved = resolver.lookup("http://example.com/")
assert resolved.contents == resource.contents
def test_lookup_failed_retrieved_resource(self):
"""
Unretrievable exceptions are also wrapped in Unresolvable.
"""
uri = "http://example.com/"
registry = Registry(retrieve=blow_up)
with pytest.raises(exceptions.Unretrievable):
registry.get_or_retrieve(uri)
resolver = registry.resolver()
with pytest.raises(exceptions.Unresolvable):
resolver.lookup(uri)
def test_repeated_lookup_from_retrieved_resource(self):
"""
A (custom-)retrieved resource is added to the registry returned by
looking it up.
"""
resource = Resource.opaque(contents={"foo": "baz"})
once = [resource]
def retrieve(uri):
return once.pop()
resolver = Registry(retrieve=retrieve).resolver()
resolved = resolver.lookup("http://example.com/")
assert resolved.contents == resource.contents
resolved = resolved.resolver.lookup("http://example.com/")
assert resolved.contents == resource.contents
def test_repeated_anchor_lookup_from_retrieved_resource(self):
resource = Resource.opaque(contents={"foo": "baz"})
once = [resource]
def retrieve(uri):
return once.pop()
resolver = Registry(retrieve=retrieve).resolver()
resolved = resolver.lookup("http://example.com/")
assert resolved.contents == resource.contents
resolved = resolved.resolver.lookup("#")
assert resolved.contents == resource.contents
# FIXME: The tests below aren't really representable in the current
# suite, though we should probably think of ways to do so.
def test_in_subresource(self):
root = ID_AND_CHILDREN.create_resource(
{
"ID": "http://example.com/",
"children": [
{
"ID": "child/",
"children": [{"ID": "grandchild"}],
},
],
},
)
registry = root @ Registry()
resolver = registry.resolver()
first = resolver.lookup("http://example.com/")
assert first.contents == root.contents
with pytest.raises(exceptions.Unresolvable):
first.resolver.lookup("grandchild")
sub = first.resolver.in_subresource(
ID_AND_CHILDREN.create_resource(first.contents["children"][0]),
)
second = sub.lookup("grandchild")
assert second.contents == {"ID": "grandchild"}
def test_in_pointer_subresource(self):
root = ID_AND_CHILDREN.create_resource(
{
"ID": "http://example.com/",
"children": [
{
"ID": "child/",
"children": [{"ID": "grandchild"}],
},
],
},
)
registry = root @ Registry()
resolver = registry.resolver()
first = resolver.lookup("http://example.com/")
assert first.contents == root.contents
with pytest.raises(exceptions.Unresolvable):
first.resolver.lookup("grandchild")
second = first.resolver.lookup("#/children/0")
third = second.resolver.lookup("grandchild")
assert third.contents == {"ID": "grandchild"}
def test_dynamic_scope(self):
one = ID_AND_CHILDREN.create_resource(
{
"ID": "http://example.com/",
"children": [
{
"ID": "child/",
"children": [{"ID": "grandchild"}],
},
],
},
)
two = ID_AND_CHILDREN.create_resource(
{
"ID": "http://example.com/two",
"children": [{"ID": "two-child/"}],
},
)
registry = [one, two] @ Registry()
resolver = registry.resolver()
first = resolver.lookup("http://example.com/")
second = first.resolver.lookup("#/children/0")
third = second.resolver.lookup("grandchild")
fourth = third.resolver.lookup("http://example.com/two")
assert list(fourth.resolver.dynamic_scope()) == [
("http://example.com/child/grandchild", fourth.resolver._registry),
("http://example.com/child/", fourth.resolver._registry),
("http://example.com/", fourth.resolver._registry),
]
assert list(third.resolver.dynamic_scope()) == [
("http://example.com/child/", third.resolver._registry),
("http://example.com/", third.resolver._registry),
]
assert list(second.resolver.dynamic_scope()) == [
("http://example.com/", second.resolver._registry),
]
assert list(first.resolver.dynamic_scope()) == []
class TestSpecification:
def test_create_resource(self):
specification = Specification(
name="",
id_of=lambda contents: "urn:fixedID",
subresources_of=lambda contents: [],
anchors_in=lambda specification, contents: [],
maybe_in_subresource=(
lambda segments, resolver, subresource: resolver
),
)
resource = specification.create_resource(contents={"foo": "baz"})
assert resource == Resource(
contents={"foo": "baz"},
specification=specification,
)
assert resource.id() == "urn:fixedID"
def test_detect_from_json_schema(self):
schema = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
specification = Specification.detect(schema)
assert specification == DRAFT202012
def test_detect_with_no_discernible_information(self):
with pytest.raises(exceptions.CannotDetermineSpecification):
Specification.detect({"foo": "bar"})
def test_detect_with_non_URI_schema(self):
with pytest.raises(exceptions.CannotDetermineSpecification):
Specification.detect({"$schema": 37})
def test_detect_with_no_discernible_information_and_default(self):
specification = Specification.OPAQUE.detect({"foo": "bar"})
assert specification is Specification.OPAQUE
def test_detect_unneeded_default(self):
schema = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
specification = Specification.OPAQUE.detect(schema)
assert specification == DRAFT202012
def test_non_mapping_detect(self):
with pytest.raises(exceptions.CannotDetermineSpecification):
Specification.detect(True)
def test_non_mapping_detect_with_default(self):
specification = ID_AND_CHILDREN.detect(True)
assert specification is ID_AND_CHILDREN
def test_detect_with_fallback(self):
specification = Specification.OPAQUE.detect({"foo": "bar"})
assert specification is Specification.OPAQUE
def test_repr(self):
assert (
repr(ID_AND_CHILDREN) == ""
)
class TestOpaqueSpecification:
THINGS = [{"foo": "bar"}, True, 37, "foo", object()]
@pytest.mark.parametrize("thing", THINGS)
def test_no_id(self, thing):
"""
An arbitrary thing has no ID.
"""
assert Specification.OPAQUE.id_of(thing) is None
@pytest.mark.parametrize("thing", THINGS)
def test_no_subresources(self, thing):
"""
An arbitrary thing has no subresources.
"""
assert list(Specification.OPAQUE.subresources_of(thing)) == []
@pytest.mark.parametrize("thing", THINGS)
def test_no_anchors(self, thing):
"""
An arbitrary thing has no anchors.
"""
assert list(Specification.OPAQUE.anchors_in(thing)) == []
@pytest.mark.parametrize(
"cls",
[Anchor, Registry, Resource, Specification, exceptions.PointerToNowhere],
)
def test_nonsubclassable(cls):
with pytest.raises(Exception, match="(?i)subclassing"):
class Boom(cls): # pragma: no cover
pass
referencing-0.36.2/referencing/tests/test_exceptions.py 0000644 0000000 0000000 00000001646 13615410400 020243 0 ustar 00 import itertools
import pytest
from referencing import Resource, exceptions
def pairs(choices):
return itertools.combinations(choices, 2)
TRUE = Resource.opaque(True)
thunks = (
lambda: exceptions.CannotDetermineSpecification(TRUE),
lambda: exceptions.NoSuchResource("urn:example:foo"),
lambda: exceptions.NoInternalID(TRUE),
lambda: exceptions.InvalidAnchor(resource=TRUE, anchor="foo", ref="a#b"),
lambda: exceptions.NoSuchAnchor(resource=TRUE, anchor="foo", ref="a#b"),
lambda: exceptions.PointerToNowhere(resource=TRUE, ref="urn:example:foo"),
lambda: exceptions.Unresolvable("urn:example:foo"),
lambda: exceptions.Unretrievable("urn:example:foo"),
)
@pytest.mark.parametrize("one, two", pairs(each() for each in thunks))
def test_eq_incompatible_types(one, two):
assert one != two
@pytest.mark.parametrize("thunk", thunks)
def test_hash(thunk):
assert thunk() in {thunk()}
referencing-0.36.2/referencing/tests/test_jsonschema.py 0000644 0000000 0000000 00000026647 13615410400 020224 0 ustar 00 import pytest
from referencing import Registry, Resource, Specification
import referencing.jsonschema
@pytest.mark.parametrize(
"uri, expected",
[
(
"https://json-schema.org/draft/2020-12/schema",
referencing.jsonschema.DRAFT202012,
),
(
"https://json-schema.org/draft/2019-09/schema",
referencing.jsonschema.DRAFT201909,
),
(
"http://json-schema.org/draft-07/schema#",
referencing.jsonschema.DRAFT7,
),
(
"http://json-schema.org/draft-06/schema#",
referencing.jsonschema.DRAFT6,
),
(
"http://json-schema.org/draft-04/schema#",
referencing.jsonschema.DRAFT4,
),
(
"http://json-schema.org/draft-03/schema#",
referencing.jsonschema.DRAFT3,
),
],
)
def test_schemas_with_explicit_schema_keywords_are_detected(uri, expected):
"""
The $schema keyword in JSON Schema is a dialect identifier.
"""
contents = {"$schema": uri}
resource = Resource.from_contents(contents)
assert resource == Resource(contents=contents, specification=expected)
def test_unknown_dialect():
dialect_id = "http://example.com/unknown-json-schema-dialect-id"
with pytest.raises(referencing.jsonschema.UnknownDialect) as excinfo:
Resource.from_contents({"$schema": dialect_id})
assert excinfo.value.uri == dialect_id
@pytest.mark.parametrize(
"id, specification",
[
("$id", referencing.jsonschema.DRAFT202012),
("$id", referencing.jsonschema.DRAFT201909),
("$id", referencing.jsonschema.DRAFT7),
("$id", referencing.jsonschema.DRAFT6),
("id", referencing.jsonschema.DRAFT4),
("id", referencing.jsonschema.DRAFT3),
],
)
def test_id_of_mapping(id, specification):
uri = "http://example.com/some-schema"
assert specification.id_of({id: uri}) == uri
@pytest.mark.parametrize(
"specification",
[
referencing.jsonschema.DRAFT202012,
referencing.jsonschema.DRAFT201909,
referencing.jsonschema.DRAFT7,
referencing.jsonschema.DRAFT6,
],
)
@pytest.mark.parametrize("value", [True, False])
def test_id_of_bool(specification, value):
assert specification.id_of(value) is None
@pytest.mark.parametrize(
"specification",
[
referencing.jsonschema.DRAFT202012,
referencing.jsonschema.DRAFT201909,
referencing.jsonschema.DRAFT7,
referencing.jsonschema.DRAFT6,
],
)
@pytest.mark.parametrize("value", [True, False])
def test_anchors_in_bool(specification, value):
assert list(specification.anchors_in(value)) == []
@pytest.mark.parametrize(
"specification",
[
referencing.jsonschema.DRAFT202012,
referencing.jsonschema.DRAFT201909,
referencing.jsonschema.DRAFT7,
referencing.jsonschema.DRAFT6,
],
)
@pytest.mark.parametrize("value", [True, False])
def test_subresources_of_bool(specification, value):
assert list(specification.subresources_of(value)) == []
@pytest.mark.parametrize(
"uri, expected",
[
(
"https://json-schema.org/draft/2020-12/schema",
referencing.jsonschema.DRAFT202012,
),
(
"https://json-schema.org/draft/2019-09/schema",
referencing.jsonschema.DRAFT201909,
),
(
"http://json-schema.org/draft-07/schema#",
referencing.jsonschema.DRAFT7,
),
(
"http://json-schema.org/draft-06/schema#",
referencing.jsonschema.DRAFT6,
),
(
"http://json-schema.org/draft-04/schema#",
referencing.jsonschema.DRAFT4,
),
(
"http://json-schema.org/draft-03/schema#",
referencing.jsonschema.DRAFT3,
),
],
)
def test_specification_with(uri, expected):
assert referencing.jsonschema.specification_with(uri) == expected
@pytest.mark.parametrize(
"uri, expected",
[
(
"http://json-schema.org/draft-07/schema",
referencing.jsonschema.DRAFT7,
),
(
"http://json-schema.org/draft-06/schema",
referencing.jsonschema.DRAFT6,
),
(
"http://json-schema.org/draft-04/schema",
referencing.jsonschema.DRAFT4,
),
(
"http://json-schema.org/draft-03/schema",
referencing.jsonschema.DRAFT3,
),
],
)
def test_specification_with_no_empty_fragment(uri, expected):
assert referencing.jsonschema.specification_with(uri) == expected
def test_specification_with_unknown_dialect():
dialect_id = "http://example.com/unknown-json-schema-dialect-id"
with pytest.raises(referencing.jsonschema.UnknownDialect) as excinfo:
referencing.jsonschema.specification_with(dialect_id)
assert excinfo.value.uri == dialect_id
def test_specification_with_default():
dialect_id = "http://example.com/unknown-json-schema-dialect-id"
specification = referencing.jsonschema.specification_with(
dialect_id,
default=Specification.OPAQUE,
)
assert specification is Specification.OPAQUE
# FIXME: The tests below should move to the referencing suite but I haven't yet
# figured out how to represent dynamic (& recursive) ref lookups in it.
def test_lookup_trivial_dynamic_ref():
one = referencing.jsonschema.DRAFT202012.create_resource(
{"$dynamicAnchor": "foo"},
)
resolver = Registry().with_resource("http://example.com", one).resolver()
resolved = resolver.lookup("http://example.com#foo")
assert resolved.contents == one.contents
def test_multiple_lookup_trivial_dynamic_ref():
TRUE = referencing.jsonschema.DRAFT202012.create_resource(True)
root = referencing.jsonschema.DRAFT202012.create_resource(
{
"$id": "http://example.com",
"$dynamicAnchor": "fooAnchor",
"$defs": {
"foo": {
"$id": "foo",
"$dynamicAnchor": "fooAnchor",
"$defs": {
"bar": True,
"baz": {
"$dynamicAnchor": "fooAnchor",
},
},
},
},
},
)
resolver = (
Registry()
.with_resources(
[
("http://example.com", root),
("http://example.com/foo/", TRUE),
("http://example.com/foo/bar", root),
],
)
.resolver()
)
first = resolver.lookup("http://example.com")
second = first.resolver.lookup("foo/")
resolver = second.resolver.lookup("bar").resolver
fourth = resolver.lookup("#fooAnchor")
assert fourth.contents == root.contents
def test_multiple_lookup_dynamic_ref_to_nondynamic_ref():
one = referencing.jsonschema.DRAFT202012.create_resource(
{"$anchor": "fooAnchor"},
)
two = referencing.jsonschema.DRAFT202012.create_resource(
{
"$id": "http://example.com",
"$dynamicAnchor": "fooAnchor",
"$defs": {
"foo": {
"$id": "foo",
"$dynamicAnchor": "fooAnchor",
"$defs": {
"bar": True,
"baz": {
"$dynamicAnchor": "fooAnchor",
},
},
},
},
},
)
resolver = (
Registry()
.with_resources(
[
("http://example.com", two),
("http://example.com/foo/", one),
("http://example.com/foo/bar", two),
],
)
.resolver()
)
first = resolver.lookup("http://example.com")
second = first.resolver.lookup("foo/")
resolver = second.resolver.lookup("bar").resolver
fourth = resolver.lookup("#fooAnchor")
assert fourth.contents == two.contents
def test_lookup_trivial_recursive_ref():
one = referencing.jsonschema.DRAFT201909.create_resource(
{"$recursiveAnchor": True},
)
resolver = Registry().with_resource("http://example.com", one).resolver()
first = resolver.lookup("http://example.com")
resolved = referencing.jsonschema.lookup_recursive_ref(
resolver=first.resolver,
)
assert resolved.contents == one.contents
def test_lookup_recursive_ref_to_bool():
TRUE = referencing.jsonschema.DRAFT201909.create_resource(True)
registry = Registry({"http://example.com": TRUE})
resolved = referencing.jsonschema.lookup_recursive_ref(
resolver=registry.resolver(base_uri="http://example.com"),
)
assert resolved.contents == TRUE.contents
def test_multiple_lookup_recursive_ref_to_bool():
TRUE = referencing.jsonschema.DRAFT201909.create_resource(True)
root = referencing.jsonschema.DRAFT201909.create_resource(
{
"$id": "http://example.com",
"$recursiveAnchor": True,
"$defs": {
"foo": {
"$id": "foo",
"$recursiveAnchor": True,
"$defs": {
"bar": True,
"baz": {
"$recursiveAnchor": True,
"$anchor": "fooAnchor",
},
},
},
},
},
)
resolver = (
Registry()
.with_resources(
[
("http://example.com", root),
("http://example.com/foo/", TRUE),
("http://example.com/foo/bar", root),
],
)
.resolver()
)
first = resolver.lookup("http://example.com")
second = first.resolver.lookup("foo/")
resolver = second.resolver.lookup("bar").resolver
fourth = referencing.jsonschema.lookup_recursive_ref(resolver=resolver)
assert fourth.contents == root.contents
def test_multiple_lookup_recursive_ref_with_nonrecursive_ref():
one = referencing.jsonschema.DRAFT201909.create_resource(
{"$recursiveAnchor": True},
)
two = referencing.jsonschema.DRAFT201909.create_resource(
{
"$id": "http://example.com",
"$recursiveAnchor": True,
"$defs": {
"foo": {
"$id": "foo",
"$recursiveAnchor": True,
"$defs": {
"bar": True,
"baz": {
"$recursiveAnchor": True,
"$anchor": "fooAnchor",
},
},
},
},
},
)
three = referencing.jsonschema.DRAFT201909.create_resource(
{"$recursiveAnchor": False},
)
resolver = (
Registry()
.with_resources(
[
("http://example.com", three),
("http://example.com/foo/", two),
("http://example.com/foo/bar", one),
],
)
.resolver()
)
first = resolver.lookup("http://example.com")
second = first.resolver.lookup("foo/")
resolver = second.resolver.lookup("bar").resolver
fourth = referencing.jsonschema.lookup_recursive_ref(resolver=resolver)
assert fourth.contents == two.contents
def test_empty_registry():
assert referencing.jsonschema.EMPTY_REGISTRY == Registry()
referencing-0.36.2/referencing/tests/test_referencing_suite.py 0000644 0000000 0000000 00000004437 13615410400 021563 0 ustar 00 from pathlib import Path
import json
import os
import pytest
from referencing import Registry
from referencing.exceptions import Unresolvable
import referencing.jsonschema
class SuiteNotFound(Exception):
def __str__(self): # pragma: no cover
return (
"Cannot find the referencing suite. "
"Set the REFERENCING_SUITE environment variable to the path to "
"the suite, or run the test suite from alongside a full checkout "
"of the git repository."
)
if "REFERENCING_SUITE" in os.environ: # pragma: no cover
SUITE = Path(os.environ["REFERENCING_SUITE"]) / "tests"
else:
SUITE = Path(__file__).parent.parent.parent / "suite/tests"
if not SUITE.is_dir(): # pragma: no cover
raise SuiteNotFound()
DIALECT_IDS = json.loads(SUITE.joinpath("specifications.json").read_text())
@pytest.mark.parametrize(
"test_path",
[
pytest.param(each, id=f"{each.parent.name}-{each.stem}")
for each in SUITE.glob("*/**/*.json")
],
)
def test_referencing_suite(test_path, subtests):
dialect_id = DIALECT_IDS[test_path.relative_to(SUITE).parts[0]]
specification = referencing.jsonschema.specification_with(dialect_id)
loaded = json.loads(test_path.read_text())
registry = loaded["registry"]
registry = Registry().with_resources(
(uri, specification.create_resource(contents))
for uri, contents in loaded["registry"].items()
)
for test in loaded["tests"]:
with subtests.test(test=test):
if "normalization" in test_path.stem:
pytest.xfail("APIs need to change for proper URL support.")
resolver = registry.resolver(base_uri=test.get("base_uri", ""))
if test.get("error"):
with pytest.raises(Unresolvable):
resolver.lookup(test["ref"])
else:
resolved = resolver.lookup(test["ref"])
assert resolved.contents == test["target"]
then = test.get("then")
while then: # pragma: no cover
with subtests.test(test=test, then=then):
resolved = resolved.resolver.lookup(then["ref"])
assert resolved.contents == then["target"]
then = then.get("then")
referencing-0.36.2/referencing/tests/test_retrieval.py 0000644 0000000 0000000 00000007207 13615410400 020056 0 ustar 00 from functools import lru_cache
import json
import pytest
from referencing import Registry, Resource, exceptions
from referencing.jsonschema import DRAFT202012
from referencing.retrieval import to_cached_resource
class TestToCachedResource:
def test_it_caches_retrieved_resources(self):
contents = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
stack = [json.dumps(contents)]
@to_cached_resource()
def retrieve(uri):
return stack.pop()
registry = Registry(retrieve=retrieve)
expected = Resource.from_contents(contents)
got = registry.get_or_retrieve("urn:example:schema")
assert got.value == expected
# And a second time we get the same value.
again = registry.get_or_retrieve("urn:example:schema")
assert again.value is got.value
def test_custom_loader(self):
contents = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
stack = [json.dumps(contents)[::-1]]
@to_cached_resource(loads=lambda s: json.loads(s[::-1]))
def retrieve(uri):
return stack.pop()
registry = Registry(retrieve=retrieve)
expected = Resource.from_contents(contents)
got = registry.get_or_retrieve("urn:example:schema")
assert got.value == expected
# And a second time we get the same value.
again = registry.get_or_retrieve("urn:example:schema")
assert again.value is got.value
def test_custom_from_contents(self):
contents = {}
stack = [json.dumps(contents)]
@to_cached_resource(from_contents=DRAFT202012.create_resource)
def retrieve(uri):
return stack.pop()
registry = Registry(retrieve=retrieve)
expected = DRAFT202012.create_resource(contents)
got = registry.get_or_retrieve("urn:example:schema")
assert got.value == expected
# And a second time we get the same value.
again = registry.get_or_retrieve("urn:example:schema")
assert again.value is got.value
def test_custom_cache(self):
schema = {"$schema": "https://json-schema.org/draft/2020-12/schema"}
mapping = {
"urn:example:1": dict(schema, foo=1),
"urn:example:2": dict(schema, foo=2),
"urn:example:3": dict(schema, foo=3),
}
resources = {
uri: Resource.from_contents(contents)
for uri, contents in mapping.items()
}
@to_cached_resource(cache=lru_cache(maxsize=2))
def retrieve(uri):
return json.dumps(mapping.pop(uri))
registry = Registry(retrieve=retrieve)
got = registry.get_or_retrieve("urn:example:1")
assert got.value == resources["urn:example:1"]
assert registry.get_or_retrieve("urn:example:1").value is got.value
assert registry.get_or_retrieve("urn:example:1").value is got.value
got = registry.get_or_retrieve("urn:example:2")
assert got.value == resources["urn:example:2"]
assert registry.get_or_retrieve("urn:example:2").value is got.value
assert registry.get_or_retrieve("urn:example:2").value is got.value
# This still succeeds, but evicts the first URI
got = registry.get_or_retrieve("urn:example:3")
assert got.value == resources["urn:example:3"]
assert registry.get_or_retrieve("urn:example:3").value is got.value
assert registry.get_or_retrieve("urn:example:3").value is got.value
# And now this fails (as we popped the value out of `mapping`)
with pytest.raises(exceptions.Unretrievable):
registry.get_or_retrieve("urn:example:1")
referencing-0.36.2/suite/.git 0000644 0000000 0000000 00000000036 13615410400 012725 0 ustar 00 gitdir: ../.git/modules/suite
referencing-0.36.2/suite/.markdownlint.jsonc 0000644 0000000 0000000 00000000246 13615410400 015771 0 ustar 00 {
"default": true,
"MD007": {
// indent lists
"start_indented": true,
},
"MD013": false, // disable line length checking, use one sentence per line
}
referencing-0.36.2/suite/.pre-commit-config.yaml 0000644 0000000 0000000 00000001671 13615410400 016430 0 ustar 00 repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-docstring-first
- id: check-json
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix, lf]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.2"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- name: black
id: black
args: ["--line-length", "79"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
exclude_types: ["markdown"]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.17.2
hooks:
- id: markdownlint-cli2
referencing-0.36.2/suite/LICENSE 0000644 0000000 0000000 00000002041 13615410400 013144 0 ustar 00 Copyright (c) 2022 Julian Berman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
referencing-0.36.2/suite/README.md 0000644 0000000 0000000 00000005302 13615410400 013421 0 ustar 00 # JSON Referencing Test Suite
[](https://doi.org/10.5281/zenodo.14675569)
This repository contains a set of JSON objects that implementers of JSON referencing specifications can use to test their implementations.
It is meant to be language agnostic and should require only a JSON parser.
The conversion of the JSON objects into tests within a specific language and test framework of choice is left to be done by the implementer.
This suite is inspired by the [official JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite), where some of its tests originated.
Indeed JSON referencing is heavily influenced by JSON Schema, and it is only [recently](https://github.com/json-schema-org/referencing) that discussions have begun to formalize JSON referencing in a more cross-specification-amenable way.
## Structure of the Suite
The `tests` directory contains a set of folders corresponding to each specification which is tested by this suite.
Currently, this covers all modern JSON Schema specifications (notably, not yet OpenAPI specifications).
A `specifications.json` file is also included which maps each folder to a URL which identifies the specification (for JSON Schema these are known as "dialect ID"s).
Within each directory are tests corresponding to the particular specification.
Below is an example of such a test file, followed by a description of how to interpret the test.
```json
{
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
```
Ignore the `$schema` property, it simply denotes that each test file satisfies a JSON Schema found at the given path.
The `registry` property contains a mapping between URIs and documents which are expected to be available for the duration of the tests.
The tests are found in the `tests` array, and each object within the array contain:
* a `ref` key which is a reference to be resolved, along with an optional base URI to use to resolve a relative reference against
* *either* of a `target` key which is the expected result of resolving the reference (taking into account the registry), *or* contain the key `error`, indicating that resolving the reference should produce some sort of error (because the reference is broken or somehow invalid)
* an optional `then` key, which itself is a further test (recursively), and which is meant to be resolved *statefully* given the result of parent tests
referencing-0.36.2/suite/noxfile.py 0000644 0000000 0000000 00000001446 13615410400 014165 0 ustar 00 from pathlib import Path
import nox
ROOT = Path(__file__).parent
TESTS = ROOT / "test_sanity.py"
nox.options.default_venv_backend = "uv|virtualenv"
nox.options.sessions = []
def session(default=True, **kwargs): # noqa: D103
def _session(fn):
if default:
nox.options.sessions.append(kwargs.get("name", fn.__name__))
return nox.session(**kwargs)(fn)
return _session
@session()
def tests(session):
"""
Run the sanity test suite to check the tests themselves.
"""
session.install("jsonschema", "pytest")
session.run("pytest", *session.posargs)
@session(tags=["style"])
def style(session):
"""
Check Python code style in the sanity test suite.
"""
session.install("ruff")
session.run("ruff", "check", ROOT, TESTS, __file__)
referencing-0.36.2/suite/pyproject.toml 0000644 0000000 0000000 00000004632 13615410400 015063 0 ustar 00 [tool.ruff]
line-length = 79
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A001", # It's fine to shadow builtins
"A002",
"A003",
"A005",
"ARG", # This is all wrong whenever an interface is involved
"ANN", # Just let the type checker do this
"B006", # Mutable arguments require care but are OK if you don't abuse them
"B008", # It's totally OK to call functions for default arguments.
"B904", # raise SomeException(...) is fine.
"B905", # No need for explicit strict, this is simply zip's default behavior
"C408", # Calling dict is fine when it saves quoting the keys
"C901", # Not really something to focus on
"D105", # It's fine to not have docstrings for magic methods.
"D107", # __init__ especially doesn't need a docstring
"D200", # This rule makes diffs uglier when expanding docstrings
"D203", # No blank lines before docstrings.
"D212", # Start docstrings on the second line.
"D400", # This rule misses sassy docstrings ending with ! or ?
"D401", # This rule is too flaky.
"D406", # Section headers should end with a colon not a newline
"D407", # Underlines aren't needed
"D412", # Plz spaces after section headers
"EM101", # These don't bother me, it's fine there's some duplication.
"EM102",
"FBT", # It's worth avoiding boolean args but I don't care to enforce it
"FIX", # Yes thanks, if I could it wouldn't be there
"N", # These naming rules are silly
"PLR0912", # These metrics are fine to be aware of but not to enforce
"PLR0913",
"PLR0915",
"PLW2901", # Shadowing for loop variables is occasionally fine.
"PT006", # pytest parametrize takes strings as well
"PYI025", # wat, I'm not confused, thanks.
"RET502", # Returning None implicitly is fine
"RET503",
"RET505", # These push you to use `if` instead of `elif`, but for no reason
"RET506",
"RSE102", # Ha, what, who even knew you could leave the parens off. But no.
"SIM300", # Not sure what heuristic this uses, but it's easily incorrect
"SLF001", # Private usage within this package itself is fine
"TD", # These TODO style rules are also silly
]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
combine-as-imports = true
from-first = true
[tool.ruff.lint.per-file-ignores]
"noxfile.py" = ["ANN", "D100", "S101", "T201"]
"test_*.py" = ["ANN", "D", "RUF012", "S", "PLR", "TRY"]
referencing-0.36.2/suite/test-schema.json 0000644 0000000 0000000 00000005322 13615410400 015254 0 ustar 00 {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A schema for files contained within this suite",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"pattern": "\\.\\./\\.\\./test-schema.json$"
},
"registry": {
"description": "A collection of schemas, identified by (retrieval) URI which may be referenced in tests in this file.",
"default": {},
"type": "object",
"propertyNames": { "format": "uri-reference" }
},
"tests": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "$ref": "#test" }
}
},
"required": ["$schema", "tests"],
"additionalProperties": false,
"$defs": {
"test": {
"$anchor": "test",
"type": "object",
"properties": {
"base_uri": { "type": "string", "format": "uri" },
"why": {
"description": "A human-readable explanation of the results of this test.",
"type": "object",
"unevaluatedProperties": false,
"properties": {
"summary": {
"description": "A summary of the behavior specified in the linked specifications",
"type": "string"
},
"specifications": {
"description": "One or more releavnt specifications for this test.",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"oneOf": [{ "required": ["rfc"] }, { "required": ["name"] }],
"properties": {
"rfc": {
"description": "An IETF RFC",
"type": "number"
},
"name": {
"description": "Any other specification",
"type": "string"
},
"section": { "type": "string" },
"link": { "type": "string", "format": "uri" }
}
}
}
}
},
"ref": { "type": "string" },
"target": {},
"then": {
"title": "A further test to run which should maintain state from the initial lookup.",
"$ref": "#test",
"properties": { "base_uri": false }
},
"error": { "const": true }
},
"oneOf": [
{
"description": "A test with an expected result to the reference lookup.",
"required": ["target"]
},
{
"description": "A test with some form of invalid reference. How this is reported will be language-specific.",
"required": ["error"]
}
],
"required": ["ref"],
"unevaluatedProperties": false
}
}
}
referencing-0.36.2/suite/test_sanity.py 0000644 0000000 0000000 00000002200 13615410400 015054 0 ustar 00 """
Sanity check the tests in the suite.
To run this, unless you otherwise know what you're doing:
* install ``pipx`` (see its documentation page)
* install nox via ``pipx install nox``
* run ``nox`` in the root of this repository
"""
from pathlib import Path
import json
from jsonschema.validators import validator_for
import pytest
ROOT = Path(__file__).parent
VERSIONS = ROOT / "tests"
SPECS = json.loads(VERSIONS.joinpath("specifications.json").read_text())
_SCHEMA = json.loads(ROOT.joinpath("test-schema.json").read_text())
Validator = validator_for(_SCHEMA)
Validator.check_schema(_SCHEMA)
VALIDATOR = Validator(_SCHEMA)
@pytest.mark.parametrize("test_path", VERSIONS.glob("*/**/*.json"))
def test_tests_are_valid(test_path):
try:
test = json.loads(test_path.read_text())
except json.JSONDecodeError:
pytest.fail(f"{test_path} contains invalid JSON")
else:
VALIDATOR.validate(test)
@pytest.mark.parametrize(
"version",
[version for version in VERSIONS.iterdir() if version.is_dir()],
)
def test_specification_directories_are_identified(version):
assert version.name in SPECS
referencing-0.36.2/suite/.github/dependabot.yml 0000644 0000000 0000000 00000000166 13615410400 016335 0 ustar 00 version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
referencing-0.36.2/suite/.github/release.yml 0000644 0000000 0000000 00000000114 13615410400 015641 0 ustar 00 changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
referencing-0.36.2/suite/.github/workflows/ci.yml 0000644 0000000 0000000 00000000740 13615410400 016656 0 ustar 00 name: Test Suite Sanity Checking
on:
push:
branches-ignore:
- "wip*"
tags:
- "v*"
pull_request:
schedule:
# Daily at 3:42, arbitrarily as a time that's possibly non-busy
- cron: "42 3 * * *"
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Run nox
run: uvx nox
referencing-0.36.2/suite/tests/specifications.json 0000644 0000000 0000000 00000000665 13615410400 017211 0 ustar 00 {
"json-schema-draft-2020-12": "https://json-schema.org/draft/2020-12/schema",
"json-schema-draft-2019-09": "https://json-schema.org/draft/2019-09/schema",
"json-schema-draft-07": "http://json-schema.org/draft-07/schema#",
"json-schema-draft-06": "http://json-schema.org/draft-06/schema#",
"json-schema-draft-04": "http://json-schema.org/draft-04/schema#",
"json-schema-draft-03": "http://json-schema.org/draft-03/schema#"
}
referencing-0.36.2/suite/tests/json-schema-draft-03/bad-future-anchor.json 0000644 0000000 0000000 00000000476 13615410400 023241 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/bad-future-id.json 0000644 0000000 0000000 00000000506 13615410400 022355 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"$id": "http://example.com/great-scott",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/great-scott",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/empty-fragment.json 0000644 0000000 0000000 00000000353 13615410400 022664 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/external-absolute-uri.json 0000644 0000000 0000000 00000000324 13615410400 024156 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/ignored-siblings.json 0000644 0000000 0000000 00000000455 13615410400 023167 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"id": "http://example.com/",
"extends": [{ "id": "ignored-id.json", "$ref": "foo.json" }]
}
},
"tests": [
{
"ref": "http://example.com/ignored-id.json",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-additionalItems-boolean.json 0000644 0000000 0000000 00000000465 13615410400 026325 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": false,
"properties": {
"foo": { "id": "urn:example:foo" }
}
}
},
"tests": [
{
"ref": "urn:example:foo",
"target": { "id": "urn:example:foo" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-additionalItems-schema.json 0000644 0000000 0000000 00000000634 13615410400 026144 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": {
"id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalItems",
"target": {
"id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-additionalProperties-boolean.json 0000644 0000000 0000000 00000000472 13615410400 027376 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": false,
"properties": {
"foo": { "id": "urn:example:foo" }
}
}
},
"tests": [
{
"ref": "urn:example:foo",
"target": { "id": "urn:example:foo" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-additionalProperties-schema.json 0000644 0000000 0000000 00000000660 13615410400 027216 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalProperties",
"target": {
"id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-dependencies-array.json 0000644 0000000 0000000 00000000363 13615410400 025335 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": { "foo": ["bar"] }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-dependencies-object.json 0000644 0000000 0000000 00000000643 13615410400 025466 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-extends.json 0000644 0000000 0000000 00000000460 13615410400 023243 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"extends": [{ "id": "http://example.com/0", "title": "First!" }]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "id": "http://example.com/0", "title": "First!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-items-array.json 0000644 0000000 0000000 00000001063 13615410400 024026 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{ "title": "First!" },
{ "id": "http://example.com/0", "title": "Second!" },
{ "title": "Third!" },
{ "id": "http://example.com/1", "title": "Fourth!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "id": "http://example.com/0", "title": "Second!" }
},
{
"ref": "http://example.com/1",
"target": { "id": "http://example.com/1", "title": "Fourth!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-items-object.json 0000644 0000000 0000000 00000000564 13615410400 024163 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-items",
"target": {
"id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-patternProperties.json 0000644 0000000 0000000 00000000650 13615410400 025324 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"patternProperties": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/keywords-properties.json 0000644 0000000 0000000 00000000641 13615410400 023766 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/multiple-lookup-pointer.json 0000644 0000000 0000000 00000000476 13615410400 024553 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo/",
"target": { "foo": "bar" },
"then": {
"ref": "#/foo",
"target": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/multiple-lookup.json 0000644 0000000 0000000 00000000706 13615410400 023071 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" },
"http://example.com/foo/bar": { "baz": "quux" }
},
"tests": [
{
"ref": "http://example.com/",
"target": {},
"then": {
"ref": "foo/",
"target": { "foo": "bar" },
"then": {
"ref": "bar",
"target": { "baz": "quux" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/nonreferencing-keywords-default.json 0000644 0000000 0000000 00000000411 13615410400 026211 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"default": { "id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/nonreferencing-keywords-enum.json 0000644 0000000 0000000 00000000410 13615410400 025530 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"enum": [{ "id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/pointer-crossing-id-in-dependencies-object.json 0000644 0000000 0000000 00000001131 13615410400 030113 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"properties": {
"id": {},
"foo": {
"id": "foo",
"bar": "baz"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/dependencies/foo/properties/foo",
"target": { "id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-array.json 0000644 0000000 0000000 00000001077 13615410400 026467 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{
"id": "http://example.com/oh-hey-an-items",
"properties": {
"id": {},
"foo": {
"id": "foo",
"bar": "baz"
}
}
}
]
}
},
"tests": [
{
"ref": "http://example.com/#/items/0/properties/foo",
"target": { "id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-object.json 0000644 0000000 0000000 00000001031 13615410400 026605 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"id": "http://example.com/oh-hey-an-items",
"properties": {
"id": {},
"foo": {
"id": "foo",
"bar": "baz"
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/items/properties/foo",
"target": { "id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id-in-subvalue.json0000644 0000000 0000000 00000000467 13615410400 030334 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/#/properties/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id.json 0000644 0000000 0000000 00000000574 13615410400 026103 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"properties": {
"id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/additionalProperties/properties/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/relative-pointer-array.json 0000644 0000000 0000000 00000000346 13615410400 024334 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": [2, 4, 6] }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/1",
"target": 4
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/relative-pointer-escapes.json 0000644 0000000 0000000 00000001103 13615410400 024631 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": {
"foo": {
"tilde~field": "bar",
"slash/field": "baz",
"percent%field": "quux"
}
}
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/tilde~0field",
"target": "bar"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/slash~1field",
"target": "baz"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/percent%25field",
"target": "quux"
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/relative-pointer-object.json 0000644 0000000 0000000 00000000403 13615410400 024456 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": { "bar": { "baz": 12 } } }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/bar",
"target": { "baz": 12 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/rfc3986-normalization-on-insertion.json 0000644 0000000 0000000 00000002021 13615410400 026331 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"hTtP://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://exAmpLe.com/case-insensitive-host": { "baz": "quux" },
"hTtP://exAmpLe.com/case-SENSITIVE-path": {},
"http://example.com/escapes/a%c2%b1b": { "spam": "eggs" },
"http://example.com/unreserved/%7Efoo": { "snap": "crackle" },
"http://example.com:80/default/port": { "pop": 37 }
},
"tests": [
{
"ref": "http://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://example.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "http://example.com/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%C2%B1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/~foo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com/default/port",
"target": { "pop": 37 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/rfc3986-normalization-on-retrieval.json 0000644 0000000 0000000 00000002021 13615410400 026314 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://example.com/case-insensitive-host": { "baz": "quux" },
"http://example.com/case-sensitive-path": {},
"http://example.com/escapes/a%C2%B1b": { "spam": "eggs" },
"http://example.com/unreserved/~foo": { "snap": "crackle" },
"http://example.com/default/port": { "pop": 37 }
},
"tests": [
{
"ref": "hTtP://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://exAmpLe.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "hTtP://exAmpLe.com/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%c2%b1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/%7Efoo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com:80/default/port",
"target": { "pop": 37 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-03/unknown-keyword.json 0000644 0000000 0000000 00000000506 13615410400 023106 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unknownKeyword": {
"id": "http://example.com/oh-hey-not-a-real-known-id",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-a-real-known-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000471 13615410400 025277 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"id": "http://example.com/foo#",
"foo": "bar"
}
},
"tests": [
{
"ref": "http://example.com/foo",
"target": {
"id": "http://example.com/foo#",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/anchor.json 0000644 0000000 0000000 00000000554 13615410400 021203 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"target": {
"id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/bad-future-anchor.json 0000644 0000000 0000000 00000000477 13615410400 023243 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/bad-future-id.json 0000644 0000000 0000000 00000000507 13615410400 022357 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "http://example.com/great-scott",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/great-scott",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/empty-fragment.json 0000644 0000000 0000000 00000000353 13615410400 022665 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/external-absolute-uri-anchor.json 0000644 0000000 0000000 00000000526 13615410400 025433 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/external-absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000325 13615410400 027115 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo#": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000161 00000000000 010213 x ustar 00 113 path=referencing-0.36.2/suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.j0000644 0000000 0000000 00000000601 13615410400 030214 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"id": "http://example.org/internal",
"definitions": {
"foo": {
"id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/external-absolute-uri.json 0000644 0000000 0000000 00000000324 13615410400 024157 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/external-absolute-urn-anchor.json 0000644 0000000 0000000 00000000524 13615410400 025436 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": {
"definitions": {
"foo": {
"id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "urn:example:schema#foo",
"target": {
"id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/external-absolute-urn.json 0000644 0000000 0000000 00000000314 13615410400 024163 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": { "foo": "bar" }
},
"tests": [
{
"ref": "urn:example:schema",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000157 00000000000 010220 x ustar 00 111 path=referencing-0.36.2/suite/tests/json-schema-draft-04/external-uri-with-nested-relative-uri-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-04/external-uri-with-nested-relative-uri-anchor.jso0000644 0000000 0000000 00000000705 13615410400 030277 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"id": "foo",
"definitions": {
"spam": {
"id": "#bar",
"baz": "quux"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/foo#bar",
"target": {
"id": "#bar",
"baz": "quux"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/ignored-siblings.json 0000644 0000000 0000000 00000000643 13615410400 023167 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"id": "http://example.com/",
"allOf": [
{
"id": "ignored-id.json",
"$ref": "foo.json"
},
{ "id": "foo.json" },
{ "id": "ignored-id.json/foo.json" }
]
}
},
"tests": [
{
"ref": "http://example.com/ignored-id.json",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/invalid-anchor-with-pointer.json 0000644 0000000 0000000 00000001241 13615410400 025250 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"id": "#foo",
"definitions": {
"bar": { "baz": "quux" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo/definitions/bar",
"error": true
},
{
"base_uri": "http://example.com/",
"ref": "#foo#/definitions/bar",
"error": true
},
{
"ref": "http://example.com/#foo/definitions/bar",
"error": true
},
{
"ref": "http://example.com#foo/definitions/bar",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-additionalItems-boolean.json 0000644 0000000 0000000 00000000466 13615410400 026327 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": false,
"definitions": {
"foo": { "id": "urn:example:foo" }
}
}
},
"tests": [
{
"ref": "urn:example:foo",
"target": { "id": "urn:example:foo" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-additionalItems-schema.json 0000644 0000000 0000000 00000000634 13615410400 026145 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": {
"id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalItems",
"target": {
"id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-additionalProperties-boolean.json 0000644 0000000 0000000 00000000473 13615410400 027400 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": false,
"definitions": {
"foo": { "id": "urn:example:foo" }
}
}
},
"tests": [
{
"ref": "urn:example:foo",
"target": { "id": "urn:example:foo" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-additionalProperties-schema.json 0000644 0000000 0000000 00000000660 13615410400 027217 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalProperties",
"target": {
"id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-allOf.json 0000644 0000000 0000000 00000000763 13615410400 022635 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"allOf": [
{ "id": "http://example.com/0", "title": "First!" },
{ "id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-anyOf.json 0000644 0000000 0000000 00000000763 13615410400 022654 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"anyOf": [
{ "id": "http://example.com/0", "title": "First!" },
{ "id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-definitions.json 0000644 0000000 0000000 00000000642 13615410400 024107 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-dependencies-array.json 0000644 0000000 0000000 00000000363 13615410400 025336 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": { "foo": ["bar"] }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-dependencies-object.json 0000644 0000000 0000000 00000000643 13615410400 025467 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-items-array.json 0000644 0000000 0000000 00000001063 13615410400 024027 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{ "title": "First!" },
{ "id": "http://example.com/0", "title": "Second!" },
{ "title": "Third!" },
{ "id": "http://example.com/1", "title": "Fourth!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "id": "http://example.com/0", "title": "Second!" }
},
{
"ref": "http://example.com/1",
"target": { "id": "http://example.com/1", "title": "Fourth!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-items-object.json 0000644 0000000 0000000 00000000564 13615410400 024164 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-items",
"target": {
"id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-not.json 0000644 0000000 0000000 00000000551 13615410400 022373 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"not": {
"id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-not",
"target": {
"id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-oneOf.json 0000644 0000000 0000000 00000000763 13615410400 022646 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"oneOf": [
{ "id": "http://example.com/0", "title": "First!" },
{ "id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-patternProperties.json 0000644 0000000 0000000 00000000650 13615410400 025325 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"patternProperties": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/keywords-properties.json 0000644 0000000 0000000 00000000641 13615410400 023767 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/multiple-lookup-anchor.json 0000644 0000000 0000000 00000000637 13615410400 024345 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": { "id": "#foo", "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/",
"target": { "definitions": { "foo": { "id": "#foo", "bar": "baz" } } },
"then": {
"ref": "#foo",
"target": { "id": "#foo", "bar": "baz" }
}
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000201 00000000000 010206 x ustar 00 129 path=referencing-0.36.2/suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-diffe0000644 0000000 0000000 00000001704 13615410400 030376 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"id": "http://example.org/foo",
"definitions": {
"bar": {
"id": "#baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/definitions/foo",
"target": {
"id": "http://example.org/foo",
"definitions": { "bar": { "id": "#baz", "quux": "eggs" } }
},
"then": {
"ref": "#baz",
"target": { "id": "#baz", "quux": "eggs" }
}
},
{
"ref": "http://example.com/#/definitions/foo",
"target": {
"id": "http://example.org/foo",
"definitions": { "bar": { "id": "#baz", "quux": "eggs" } }
},
"then": {
"ref": "http://example.org/foo#baz",
"target": { "id": "#baz", "quux": "eggs" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/multiple-lookup-pointer.json 0000644 0000000 0000000 00000000476 13615410400 024554 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo/",
"target": { "foo": "bar" },
"then": {
"ref": "#/foo",
"target": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/multiple-lookup.json 0000644 0000000 0000000 00000000706 13615410400 023072 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" },
"http://example.com/foo/bar": { "baz": "quux" }
},
"tests": [
{
"ref": "http://example.com/",
"target": {},
"then": {
"ref": "foo/",
"target": { "foo": "bar" },
"then": {
"ref": "bar",
"target": { "baz": "quux" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/nested-absolute-id.json 0000644 0000000 0000000 00000001244 13615410400 023416 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"id": "http://example.com/",
"definitions": {
"foo": {
"id": "http://example.com/nested",
"definitions": {
"inner": { "foo": "bar" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/nested",
"ref": "#/definitions/inner",
"target": { "foo": "bar" }
},
{
"base_uri": "http://example.com/",
"ref": "nested",
"target": {
"id": "http://example.com/nested",
"definitions": {
"inner": { "foo": "bar" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/nested-relative-id-only-retrieval-uri.json 0000644 0000000 0000000 00000000531 13615410400 027160 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/nested-relative-id.json 0000644 0000000 0000000 00000000574 13615410400 023420 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"id": "http://example.com/",
"definitions": {
"foo": {
"id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/nonreferencing-keywords-default.json 0000644 0000000 0000000 00000000411 13615410400 026212 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"default": { "id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/nonreferencing-keywords-enum.json 0000644 0000000 0000000 00000000410 13615410400 025531 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"enum": [{ "id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/pointer-crossing-id-in-dependencies-object.json 0000644 0000000 0000000 00000001133 13615410400 030116 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"id": "http://example.com/oh-hey-a-subschema",
"definitions": {
"id": {},
"foo": {
"id": "foo",
"bar": "baz"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/dependencies/foo/definitions/foo",
"target": { "id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-array.json 0000644 0000000 0000000 00000001101 13615410400 026454 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{
"id": "http://example.com/oh-hey-an-items",
"definitions": {
"id": {},
"foo": {
"id": "foo",
"bar": "baz"
}
}
}
]
}
},
"tests": [
{
"ref": "http://example.com/#/items/0/definitions/foo",
"target": { "id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-object.json 0000644 0000000 0000000 00000001033 13615410400 026610 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"id": "http://example.com/oh-hey-an-items",
"definitions": {
"id": {},
"foo": {
"id": "foo",
"bar": "baz"
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/items/definitions/foo",
"target": { "id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id-in-subvalue.json0000644 0000000 0000000 00000000471 13615410400 030330 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/#/definitions/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id.json 0000644 0000000 0000000 00000000576 13615410400 026106 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"definitions": {
"id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/additionalProperties/definitions/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/relative-pointer-array.json 0000644 0000000 0000000 00000000346 13615410400 024335 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": [2, 4, 6] }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/1",
"target": 4
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/relative-pointer-escapes.json 0000644 0000000 0000000 00000001103 13615410400 024632 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": {
"foo": {
"tilde~field": "bar",
"slash/field": "baz",
"percent%field": "quux"
}
}
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/tilde~0field",
"target": "bar"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/slash~1field",
"target": "baz"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/percent%25field",
"target": "quux"
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/relative-pointer-object.json 0000644 0000000 0000000 00000000403 13615410400 024457 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": { "bar": { "baz": 12 } } }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/bar",
"target": { "baz": 12 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/rfc3986-normalization-on-insertion.json 0000644 0000000 0000000 00000005304 13615410400 026341 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"hTtP://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://exAmpLe.com/case-insensitive-host": { "baz": "quux" },
"hTtP://exAmpLe.com/case-SENSITIVE-path": {},
"http://example.com/escapes/a%c2%b1b": { "spam": "eggs" },
"http://example.com/unreserved/%7Efoo": { "snap": "crackle" },
"http://example.com:80/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"definitions": {
"scheme": {
"id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path"
},
"escapes": {
"id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
},
"unreserved": {
"id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
},
"port": {
"id": "http://example.com:80/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "http://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://example.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "http://example.com/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%C2%B1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/~foo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com/default/port",
"target": { "pop": 37 }
},
{
"ref": "http://example.com/id/case-insensitive-scheme",
"target": {
"id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://example.com/id/case-insensitive-host",
"target": {
"id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "http://example.com/id/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%C2%B1b",
"target": {
"id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/~foo",
"target": {
"id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
}
},
{
"ref": "http://example.com/id/default/port",
"target": {
"id": "http://example.com:80/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/rfc3986-normalization-on-retrieval.json 0000644 0000000 0000000 00000005277 13615410400 026335 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://example.com/case-insensitive-host": { "baz": "quux" },
"http://example.com/case-sensitive-path": {},
"http://example.com/escapes/a%C2%B1b": { "spam": "eggs" },
"http://example.com/unreserved/~foo": { "snap": "crackle" },
"http://example.com/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"definitions": {
"scheme": {
"id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"id": "http://example.com/id/case-sensitive-path"
},
"escapes": {
"id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
},
"unreserved": {
"id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
},
"port": {
"id": "http://example.com/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "hTtP://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://exAmpLe.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "hTtP://exAmpLe.com/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%c2%b1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/%7Efoo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com:80/default/port",
"target": { "pop": 37 }
},
{
"ref": "hTtP://example.com/id/case-insensitive-scheme",
"target": {
"id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://exAmpLe.com/id/case-insensitive-host",
"target": {
"id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%c2%b1b",
"target": {
"id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/%7Efoo",
"target": {
"id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
}
},
{
"ref": "http://example.com:80/id/default/port",
"target": {
"id": "http://example.com/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/tag-uris.json 0000644 0000000 0000000 00000003276 13615410400 021470 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
"definitions": {
"foo": {
"id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"definitions": {
"bar": {
"id": "#baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"target": {
"id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"definitions": {
"bar": {
"id": "#baz",
"quux": "eggs"
}
}
},
"then": {
"ref": "#baz",
"target": { "id": "#baz", "quux": "eggs" }
}
},
{
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
"specifications": [
{
"rfc": 4151,
"section": "2.2",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
}
]
}
},
{
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
"specifications": [
{
"rfc": 4151,
"section": "2.1",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
}
]
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-04/unknown-keyword.json 0000644 0000000 0000000 00000000506 13615410400 023107 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unknownKeyword": {
"id": "http://example.com/oh-hey-not-a-real-known-id",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-a-real-known-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000473 13615410400 025303 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
},
"tests": [
{
"ref": "http://example.com/foo",
"target": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/anchor.json 0000644 0000000 0000000 00000000556 13615410400 021207 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/boolean-schemas.json 0000644 0000000 0000000 00000001220 13615410400 022762 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": true,
"additionalProperties": true,
"contains": true,
"items": true,
"not": false,
"propertyNames": true,
"allOf": [true],
"anyOf": [true],
"oneOf": [true],
"definitions": {
"foo": true,
"bar": { "$id": "bar" }
},
"dependencies": { "foo": true },
"patternProperties": { "foo": true },
"properties": { "foo": true }
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "bar",
"target": { "$id": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/empty-fragment.json 0000644 0000000 0000000 00000000353 13615410400 022667 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/external-absolute-uri-anchor.json 0000644 0000000 0000000 00000000530 13615410400 025430 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/external-absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000325 13615410400 027117 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo#": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000161 00000000000 010213 x ustar 00 113 path=referencing-0.36.2/suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.j0000644 0000000 0000000 00000000604 13615410400 030221 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.org/internal",
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/external-absolute-uri.json 0000644 0000000 0000000 00000000324 13615410400 024161 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/external-absolute-urn-anchor.json 0000644 0000000 0000000 00000000526 13615410400 025442 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": {
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "urn:example:schema#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/external-absolute-urn.json 0000644 0000000 0000000 00000000314 13615410400 024165 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": { "foo": "bar" }
},
"tests": [
{
"ref": "urn:example:schema",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000157 00000000000 010220 x ustar 00 111 path=referencing-0.36.2/suite/tests/json-schema-draft-06/external-uri-with-nested-relative-uri-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-06/external-uri-with-nested-relative-uri-anchor.jso0000644 0000000 0000000 00000000710 13615410400 030275 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "foo",
"definitions": {
"spam": {
"$id": "#bar",
"baz": "quux"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/foo#bar",
"target": {
"$id": "#bar",
"baz": "quux"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/ignored-siblings.json 0000644 0000000 0000000 00000000647 13615410400 023175 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"allOf": [
{
"$id": "ignored-id.json",
"$ref": "foo.json"
},
{ "$id": "foo.json" },
{ "$id": "ignored-id.json/foo.json" }
]
}
},
"tests": [
{
"ref": "http://example.com/ignored-id.json",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/invalid-anchor-with-pointer.json 0000644 0000000 0000000 00000001242 13615410400 025253 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "#foo",
"definitions": {
"bar": { "baz": "quux" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo/definitions/bar",
"error": true
},
{
"base_uri": "http://example.com/",
"ref": "#foo#/definitions/bar",
"error": true
},
{
"ref": "http://example.com/#foo/definitions/bar",
"error": true
},
{
"ref": "http://example.com#foo/definitions/bar",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-additionalItems.json 0000644 0000000 0000000 00000000636 13615410400 024713 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": {
"$id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalItems",
"target": {
"$id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-additionalProperties.json 0000644 0000000 0000000 00000000662 13615410400 025765 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalProperties",
"target": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-allOf.json 0000644 0000000 0000000 00000000767 13615410400 022643 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"allOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-anyOf.json 0000644 0000000 0000000 00000000767 13615410400 022662 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"anyOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-contains.json 0000644 0000000 0000000 00000000577 13615410400 023423 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"contains": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-contains",
"target": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-definitions.json 0000644 0000000 0000000 00000000644 13615410400 024113 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-dependencies-array.json 0000644 0000000 0000000 00000000363 13615410400 025340 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": { "foo": ["bar"] }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-dependencies-object.json 0000644 0000000 0000000 00000000645 13615410400 025473 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-items-array.json 0000644 0000000 0000000 00000001067 13615410400 024035 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{ "title": "First!" },
{ "$id": "http://example.com/0", "title": "Second!" },
{ "title": "Third!" },
{ "$id": "http://example.com/1", "title": "Fourth!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "Second!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Fourth!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-items-object.json 0000644 0000000 0000000 00000000566 13615410400 024170 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-items",
"target": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-not.json 0000644 0000000 0000000 00000000553 13615410400 022377 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"not": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-not",
"target": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-oneOf.json 0000644 0000000 0000000 00000000767 13615410400 022654 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"oneOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-patternProperties.json 0000644 0000000 0000000 00000000652 13615410400 025331 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"patternProperties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-properties.json 0000644 0000000 0000000 00000000643 13615410400 023773 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/keywords-propertyNames.json 0000644 0000000 0000000 00000000623 13615410400 024445 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"propertyNames": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-propertyNames",
"target": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/multiple-lookup-anchor.json 0000644 0000000 0000000 00000000642 13615410400 024343 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": { "$id": "#foo", "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/",
"target": { "definitions": { "foo": { "$id": "#foo", "bar": "baz" } } },
"then": {
"ref": "#foo",
"target": { "$id": "#foo", "bar": "baz" }
}
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000201 00000000000 010206 x ustar 00 129 path=referencing-0.36.2/suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-diffe0000644 0000000 0000000 00000001714 13615410400 030401 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "http://example.org/foo",
"definitions": {
"bar": {
"$id": "#baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/definitions/foo",
"target": {
"$id": "http://example.org/foo",
"definitions": { "bar": { "$id": "#baz", "quux": "eggs" } }
},
"then": {
"ref": "#baz",
"target": { "$id": "#baz", "quux": "eggs" }
}
},
{
"ref": "http://example.com/#/definitions/foo",
"target": {
"$id": "http://example.org/foo",
"definitions": { "bar": { "$id": "#baz", "quux": "eggs" } }
},
"then": {
"ref": "http://example.org/foo#baz",
"target": { "$id": "#baz", "quux": "eggs" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/multiple-lookup-pointer.json 0000644 0000000 0000000 00000000476 13615410400 024556 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo/",
"target": { "foo": "bar" },
"then": {
"ref": "#/foo",
"target": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/multiple-lookup.json 0000644 0000000 0000000 00000000706 13615410400 023074 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" },
"http://example.com/foo/bar": { "baz": "quux" }
},
"tests": [
{
"ref": "http://example.com/",
"target": {},
"then": {
"ref": "foo/",
"target": { "foo": "bar" },
"then": {
"ref": "bar",
"target": { "baz": "quux" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/nested-absolute-id.json 0000644 0000000 0000000 00000001247 13615410400 023423 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"definitions": {
"foo": {
"$id": "http://example.com/nested",
"definitions": {
"inner": { "foo": "bar" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/nested",
"ref": "#/definitions/inner",
"target": { "foo": "bar" }
},
{
"base_uri": "http://example.com/",
"ref": "nested",
"target": {
"$id": "http://example.com/nested",
"definitions": {
"inner": { "foo": "bar" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/nested-relative-id-only-retrieval-uri.json 0000644 0000000 0000000 00000000533 13615410400 027164 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/nested-relative-id.json 0000644 0000000 0000000 00000000577 13615410400 023425 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"definitions": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/nonreferencing-keywords-const.json 0000644 0000000 0000000 00000000410 13615410400 025715 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"const": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/nonreferencing-keywords-default.json 0000644 0000000 0000000 00000000412 13615410400 026215 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"default": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/nonreferencing-keywords-enum.json 0000644 0000000 0000000 00000000411 13615410400 025534 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/nonreferencing-keywords-examples.json 0000644 0000000 0000000 00000000415 13615410400 026412 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/pointer-crossing-id-in-dependencies-object.json 0000644 0000000 0000000 00000001140 13615410400 030116 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"definitions": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/dependencies/foo/definitions/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-array.json 0000644 0000000 0000000 00000001106 13615410400 026463 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{
"$id": "http://example.com/oh-hey-an-items",
"definitions": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
]
}
},
"tests": [
{
"ref": "http://example.com/#/items/0/definitions/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-object.json 0000644 0000000 0000000 00000001040 13615410400 026610 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"$id": "http://example.com/oh-hey-an-items",
"definitions": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/items/definitions/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id-in-subvalue.json0000644 0000000 0000000 00000000472 13615410400 030333 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/#/definitions/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id.json 0000644 0000000 0000000 00000000577 13615410400 026111 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"definitions": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/additionalProperties/definitions/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/relative-pointer-array.json 0000644 0000000 0000000 00000000346 13615410400 024337 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": [2, 4, 6] }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/1",
"target": 4
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/relative-pointer-escapes.json 0000644 0000000 0000000 00000001103 13615410400 024634 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": {
"foo": {
"tilde~field": "bar",
"slash/field": "baz",
"percent%field": "quux"
}
}
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/tilde~0field",
"target": "bar"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/slash~1field",
"target": "baz"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/percent%25field",
"target": "quux"
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/relative-pointer-object.json 0000644 0000000 0000000 00000000403 13615410400 024461 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": { "bar": { "baz": 12 } } }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/bar",
"target": { "baz": 12 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/rfc3986-normalization-on-insertion.json 0000644 0000000 0000000 00000005317 13615410400 026347 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"hTtP://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://exAmpLe.com/case-insensitive-host": { "baz": "quux" },
"hTtP://exAmpLe.com/case-SENSITIVE-path": {},
"http://example.com/escapes/a%c2%b1b": { "spam": "eggs" },
"http://example.com/unreserved/%7Efoo": { "snap": "crackle" },
"http://example.com:80/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"definitions": {
"scheme": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "http://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://example.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "http://example.com/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%C2%B1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/~foo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com/default/port",
"target": { "pop": 37 }
},
{
"ref": "http://example.com/id/case-insensitive-scheme",
"target": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://example.com/id/case-insensitive-host",
"target": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "http://example.com/id/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%C2%B1b",
"target": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/~foo",
"target": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
}
},
{
"ref": "http://example.com/id/default/port",
"target": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/rfc3986-normalization-on-retrieval.json 0000644 0000000 0000000 00000005312 13615410400 026325 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://example.com/case-insensitive-host": { "baz": "quux" },
"http://example.com/case-sensitive-path": {},
"http://example.com/escapes/a%C2%B1b": { "spam": "eggs" },
"http://example.com/unreserved/~foo": { "snap": "crackle" },
"http://example.com/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"definitions": {
"scheme": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "http://example.com/id/case-sensitive-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "hTtP://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://exAmpLe.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "hTtP://exAmpLe.com/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%c2%b1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/%7Efoo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com:80/default/port",
"target": { "pop": 37 }
},
{
"ref": "hTtP://example.com/id/case-insensitive-scheme",
"target": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://exAmpLe.com/id/case-insensitive-host",
"target": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%c2%b1b",
"target": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/%7Efoo",
"target": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
}
},
{
"ref": "http://example.com:80/id/default/port",
"target": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/tag-uris.json 0000644 0000000 0000000 00000003303 13615410400 021461 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
"definitions": {
"foo": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"definitions": {
"bar": {
"$id": "#baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"target": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"definitions": {
"bar": {
"$id": "#baz",
"quux": "eggs"
}
}
},
"then": {
"ref": "#baz",
"target": { "$id": "#baz", "quux": "eggs" }
}
},
{
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
"specifications": [
{
"rfc": 4151,
"section": "2.2",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
}
]
}
},
{
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
"specifications": [
{
"rfc": 4151,
"section": "2.1",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
}
]
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-06/unknown-keyword.json 0000644 0000000 0000000 00000000507 13615410400 023112 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unknownKeyword": {
"$id": "http://example.com/oh-hey-not-a-real-known-id",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-a-real-known-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000473 13615410400 025304 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
},
"tests": [
{
"ref": "http://example.com/foo",
"target": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/anchor.json 0000644 0000000 0000000 00000000556 13615410400 021210 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/bad-future-anchor.json 0000644 0000000 0000000 00000000477 13615410400 023246 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/boolean-schemas.json 0000644 0000000 0000000 00000001312 13615410400 022765 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": true,
"additionalProperties": true,
"contains": true,
"else": true,
"if": true,
"items": true,
"not": false,
"propertyNames": true,
"then": true,
"allOf": [true],
"anyOf": [true],
"oneOf": [true],
"definitions": {
"foo": true,
"bar": { "$id": "bar" }
},
"dependencies": { "foo": true },
"patternProperties": { "foo": true },
"properties": { "foo": true }
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "bar",
"target": { "$id": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/empty-fragment.json 0000644 0000000 0000000 00000000353 13615410400 022670 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/external-absolute-uri-anchor.json 0000644 0000000 0000000 00000000530 13615410400 025431 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/external-absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000325 13615410400 027120 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo#": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000161 00000000000 010213 x ustar 00 113 path=referencing-0.36.2/suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.j0000644 0000000 0000000 00000000604 13615410400 030222 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.org/internal",
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/external-absolute-uri.json 0000644 0000000 0000000 00000000324 13615410400 024162 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/external-absolute-urn-anchor.json 0000644 0000000 0000000 00000000526 13615410400 025443 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": {
"definitions": {
"foo": {
"$id": "#foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "urn:example:schema#foo",
"target": {
"$id": "#foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/external-absolute-urn.json 0000644 0000000 0000000 00000000314 13615410400 024166 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": { "foo": "bar" }
},
"tests": [
{
"ref": "urn:example:schema",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000157 00000000000 010220 x ustar 00 111 path=referencing-0.36.2/suite/tests/json-schema-draft-07/external-uri-with-nested-relative-uri-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-07/external-uri-with-nested-relative-uri-anchor.jso0000644 0000000 0000000 00000000710 13615410400 030276 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "foo",
"definitions": {
"spam": {
"$id": "#bar",
"baz": "quux"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/foo#bar",
"target": {
"$id": "#bar",
"baz": "quux"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/ignored-siblings.json 0000644 0000000 0000000 00000000647 13615410400 023176 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"allOf": [
{
"$id": "ignored-id.json",
"$ref": "foo.json"
},
{ "$id": "foo.json" },
{ "$id": "ignored-id.json/foo.json" }
]
}
},
"tests": [
{
"ref": "http://example.com/ignored-id.json",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/invalid-anchor-with-pointer.json 0000644 0000000 0000000 00000001242 13615410400 025254 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "#foo",
"definitions": {
"bar": { "baz": "quux" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo/definitions/bar",
"error": true
},
{
"base_uri": "http://example.com/",
"ref": "#foo#/definitions/bar",
"error": true
},
{
"ref": "http://example.com/#foo/definitions/bar",
"error": true
},
{
"ref": "http://example.com#foo/definitions/bar",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-additionalItems.json 0000644 0000000 0000000 00000000636 13615410400 024714 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": {
"$id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalItems",
"target": {
"$id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-additionalProperties.json 0000644 0000000 0000000 00000000662 13615410400 025766 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalProperties",
"target": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-allOf.json 0000644 0000000 0000000 00000000767 13615410400 022644 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"allOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-anyOf.json 0000644 0000000 0000000 00000000767 13615410400 022663 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"anyOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-contains.json 0000644 0000000 0000000 00000000577 13615410400 023424 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"contains": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-contains",
"target": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-definitions.json 0000644 0000000 0000000 00000000644 13615410400 024114 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-dependencies-array.json 0000644 0000000 0000000 00000000363 13615410400 025341 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": { "foo": ["bar"] }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-dependencies-object.json 0000644 0000000 0000000 00000000645 13615410400 025474 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-else.json 0000644 0000000 0000000 00000000562 13615410400 022530 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"else": {
"$id": "http://example.com/oh-hey-an-else",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-else",
"target": {
"$id": "http://example.com/oh-hey-an-else",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-if.json 0000644 0000000 0000000 00000000552 13615410400 022175 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"if": {
"$id": "http://example.com/oh-hey-an-if",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-if",
"target": {
"$id": "http://example.com/oh-hey-an-if",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-items-array.json 0000644 0000000 0000000 00000001067 13615410400 024036 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{ "title": "First!" },
{ "$id": "http://example.com/0", "title": "Second!" },
{ "title": "Third!" },
{ "$id": "http://example.com/1", "title": "Fourth!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "Second!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Fourth!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-items-object.json 0000644 0000000 0000000 00000000566 13615410400 024171 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-items",
"target": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-not.json 0000644 0000000 0000000 00000000553 13615410400 022400 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"not": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-not",
"target": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-oneOf.json 0000644 0000000 0000000 00000000767 13615410400 022655 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"oneOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-patternProperties.json 0000644 0000000 0000000 00000000652 13615410400 025332 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"patternProperties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-properties.json 0000644 0000000 0000000 00000000643 13615410400 023774 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-propertyNames.json 0000644 0000000 0000000 00000000623 13615410400 024446 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"propertyNames": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-propertyNames",
"target": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/keywords-then.json 0000644 0000000 0000000 00000000557 13615410400 022542 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"then": {
"$id": "http://example.com/oh-hey-a-then",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-then",
"target": {
"$id": "http://example.com/oh-hey-a-then",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/multiple-lookup-anchor.json 0000644 0000000 0000000 00000000642 13615410400 024344 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": { "$id": "#foo", "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/",
"target": { "definitions": { "foo": { "$id": "#foo", "bar": "baz" } } },
"then": {
"ref": "#foo",
"target": { "$id": "#foo", "bar": "baz" }
}
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000201 00000000000 010206 x ustar 00 129 path=referencing-0.36.2/suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-diffe0000644 0000000 0000000 00000001714 13615410400 030402 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "http://example.org/foo",
"definitions": {
"bar": {
"$id": "#baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/definitions/foo",
"target": {
"$id": "http://example.org/foo",
"definitions": { "bar": { "$id": "#baz", "quux": "eggs" } }
},
"then": {
"ref": "#baz",
"target": { "$id": "#baz", "quux": "eggs" }
}
},
{
"ref": "http://example.com/#/definitions/foo",
"target": {
"$id": "http://example.org/foo",
"definitions": { "bar": { "$id": "#baz", "quux": "eggs" } }
},
"then": {
"ref": "http://example.org/foo#baz",
"target": { "$id": "#baz", "quux": "eggs" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/multiple-lookup-pointer.json 0000644 0000000 0000000 00000000476 13615410400 024557 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo/",
"target": { "foo": "bar" },
"then": {
"ref": "#/foo",
"target": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/multiple-lookup.json 0000644 0000000 0000000 00000000706 13615410400 023075 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" },
"http://example.com/foo/bar": { "baz": "quux" }
},
"tests": [
{
"ref": "http://example.com/",
"target": {},
"then": {
"ref": "foo/",
"target": { "foo": "bar" },
"then": {
"ref": "bar",
"target": { "baz": "quux" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/nested-absolute-id.json 0000644 0000000 0000000 00000001247 13615410400 023424 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"definitions": {
"foo": {
"$id": "http://example.com/nested",
"definitions": {
"inner": { "foo": "bar" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/nested",
"ref": "#/definitions/inner",
"target": { "foo": "bar" }
},
{
"base_uri": "http://example.com/",
"ref": "nested",
"target": {
"$id": "http://example.com/nested",
"definitions": {
"inner": { "foo": "bar" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/nested-relative-id-only-retrieval-uri.json 0000644 0000000 0000000 00000000533 13615410400 027165 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/nested-relative-id.json 0000644 0000000 0000000 00000000577 13615410400 023426 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"definitions": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/nonreferencing-keywords-const.json 0000644 0000000 0000000 00000000410 13615410400 025716 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"const": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/nonreferencing-keywords-default.json 0000644 0000000 0000000 00000000412 13615410400 026216 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"default": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/nonreferencing-keywords-enum.json 0000644 0000000 0000000 00000000411 13615410400 025535 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/nonreferencing-keywords-examples.json 0000644 0000000 0000000 00000000415 13615410400 026413 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/pointer-crossing-id-in-dependencies-object.json 0000644 0000000 0000000 00000001140 13615410400 030117 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependencies": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"definitions": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/dependencies/foo/definitions/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-array.json 0000644 0000000 0000000 00000001106 13615410400 026464 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{
"$id": "http://example.com/oh-hey-an-items",
"definitions": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
]
}
},
"tests": [
{
"ref": "http://example.com/#/items/0/definitions/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-object.json 0000644 0000000 0000000 00000001040 13615410400 026611 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"$id": "http://example.com/oh-hey-an-items",
"definitions": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/items/definitions/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id-in-subvalue.json0000644 0000000 0000000 00000000472 13615410400 030334 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/#/definitions/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id.json 0000644 0000000 0000000 00000000577 13615410400 026112 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"definitions": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/additionalProperties/definitions/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/relative-pointer-array.json 0000644 0000000 0000000 00000000346 13615410400 024340 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": [2, 4, 6] }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/1",
"target": 4
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/relative-pointer-escapes.json 0000644 0000000 0000000 00000001103 13615410400 024635 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": {
"foo": {
"tilde~field": "bar",
"slash/field": "baz",
"percent%field": "quux"
}
}
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/tilde~0field",
"target": "bar"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/slash~1field",
"target": "baz"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/percent%25field",
"target": "quux"
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/relative-pointer-object.json 0000644 0000000 0000000 00000000403 13615410400 024462 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": { "bar": { "baz": 12 } } }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/bar",
"target": { "baz": 12 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/rfc3986-normalization-on-insertion.json 0000644 0000000 0000000 00000005317 13615410400 026350 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"hTtP://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://exAmpLe.com/case-insensitive-host": { "baz": "quux" },
"hTtP://exAmpLe.com/case-SENSITIVE-path": {},
"http://example.com/escapes/a%c2%b1b": { "spam": "eggs" },
"http://example.com/unreserved/%7Efoo": { "snap": "crackle" },
"http://example.com:80/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"definitions": {
"scheme": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "http://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://example.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "http://example.com/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%C2%B1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/~foo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com/default/port",
"target": { "pop": 37 }
},
{
"ref": "http://example.com/id/case-insensitive-scheme",
"target": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://example.com/id/case-insensitive-host",
"target": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "http://example.com/id/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%C2%B1b",
"target": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/~foo",
"target": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
}
},
{
"ref": "http://example.com/id/default/port",
"target": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/rfc3986-normalization-on-retrieval.json 0000644 0000000 0000000 00000005312 13615410400 026326 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://example.com/case-insensitive-host": { "baz": "quux" },
"http://example.com/case-sensitive-path": {},
"http://example.com/escapes/a%C2%B1b": { "spam": "eggs" },
"http://example.com/unreserved/~foo": { "snap": "crackle" },
"http://example.com/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"definitions": {
"scheme": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "http://example.com/id/case-sensitive-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "hTtP://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://exAmpLe.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "hTtP://exAmpLe.com/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%c2%b1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/%7Efoo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com:80/default/port",
"target": { "pop": 37 }
},
{
"ref": "hTtP://example.com/id/case-insensitive-scheme",
"target": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://exAmpLe.com/id/case-insensitive-host",
"target": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%c2%b1b",
"target": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/%7Efoo",
"target": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
}
},
{
"ref": "http://example.com:80/id/default/port",
"target": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/tag-uris.json 0000644 0000000 0000000 00000003303 13615410400 021462 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
"definitions": {
"foo": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"definitions": {
"bar": {
"$id": "#baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"target": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"definitions": {
"bar": {
"$id": "#baz",
"quux": "eggs"
}
}
},
"then": {
"ref": "#baz",
"target": { "$id": "#baz", "quux": "eggs" }
}
},
{
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
"specifications": [
{
"rfc": 4151,
"section": "2.2",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
}
]
}
},
{
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
"specifications": [
{
"rfc": 4151,
"section": "2.1",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
}
]
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-07/unknown-keyword.json 0000644 0000000 0000000 00000000507 13615410400 023113 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unknownKeyword": {
"$id": "http://example.com/oh-hey-not-a-real-known-id",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-a-real-known-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000473 13615410400 025677 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
},
"tests": [
{
"ref": "http://example.com/foo",
"target": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/anchor.json 0000644 0000000 0000000 00000000556 13615410400 021603 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/boolean-schemas.json 0000644 0000000 0000000 00000001452 13615410400 023365 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": true,
"additionalProperties": true,
"contains": true,
"contentSchema": true,
"else": true,
"if": true,
"items": true,
"not": false,
"propertyNames": true,
"then": true,
"unevaluatedItems": true,
"unevaluatedProperties": true,
"allOf": [true],
"anyOf": [true],
"oneOf": [true],
"$defs": {
"foo": true,
"bar": { "$id": "bar" }
},
"dependentSchemas": { "foo": true },
"patternProperties": { "foo": true },
"properties": { "foo": true }
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "bar",
"target": { "$id": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/empty-fragment.json 0000644 0000000 0000000 00000000353 13615410400 023263 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-absolute-uri-anchor.json 0000644 0000000 0000000 00000000530 13615410400 026024 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000325 13615410400 027513 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo#": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000166 00000000000 010220 x ustar 00 118 path=referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anc0000644 0000000 0000000 00000000604 13615410400 027654 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.org/internal",
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-absolute-uri.json 0000644 0000000 0000000 00000000324 13615410400 024555 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-absolute-urn-anchor.json 0000644 0000000 0000000 00000000526 13615410400 026036 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": {
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "urn:example:schema#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-absolute-urn.json 0000644 0000000 0000000 00000000314 13615410400 024561 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": { "foo": "bar" }
},
"tests": [
{
"ref": "urn:example:schema",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000164 00000000000 010216 x ustar 00 116 path=referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-uri-with-nested-relative-uri-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/external-uri-with-nested-relative-uri-ancho0000644 0000000 0000000 00000000702 13615410400 027716 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "foo",
"$defs": {
"spam": {
"$anchor": "bar",
"baz": "quux"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/foo#bar",
"target": {
"$anchor": "bar",
"baz": "quux"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/invalid-anchor-with-pointer.json 0000644 0000000 0000000 00000001201 13615410400 025642 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$anchor": "foo",
"$defs": {
"bar": { "baz": "quux" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo/$defs/bar",
"error": true
},
{
"base_uri": "http://example.com/",
"ref": "#foo#/$defs/bar",
"error": true
},
{
"ref": "http://example.com/#foo/$defs/bar",
"error": true
},
{
"ref": "http://example.com#foo/$defs/bar",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-additionalItems.json 0000644 0000000 0000000 00000000636 13615410400 025307 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalItems": {
"$id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalItems",
"target": {
"$id": "http://example.com/oh-hey-an-additionalItems",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-additionalProperties.json 0000644 0000000 0000000 00000000662 13615410400 026361 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalProperties",
"target": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-allOf.json 0000644 0000000 0000000 00000000767 13615410400 023237 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"allOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-anyOf.json 0000644 0000000 0000000 00000000767 13615410400 023256 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"anyOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-contains.json 0000644 0000000 0000000 00000000577 13615410400 024017 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"contains": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-contains",
"target": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-contentSchema.json 0000644 0000000 0000000 00000000672 13615410400 024770 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"contentMediaType": "image/png",
"contentSchema": {
"$id": "http://example.com/oh-hey-a-contentSchema",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-contentSchema",
"target": {
"$id": "http://example.com/oh-hey-a-contentSchema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-definitions.json 0000644 0000000 0000000 00000000644 13615410400 024507 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-defs.json 0000644 0000000 0000000 00000000636 13615410400 023116 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-dependentSchemas.json 0000644 0000000 0000000 00000000651 13615410400 025444 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependentSchemas": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-else.json 0000644 0000000 0000000 00000000562 13615410400 023123 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"else": {
"$id": "http://example.com/oh-hey-an-else",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-else",
"target": {
"$id": "http://example.com/oh-hey-an-else",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-if.json 0000644 0000000 0000000 00000000552 13615410400 022570 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"if": {
"$id": "http://example.com/oh-hey-an-if",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-if",
"target": {
"$id": "http://example.com/oh-hey-an-if",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-items-array.json 0000644 0000000 0000000 00000001067 13615410400 024431 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{ "title": "First!" },
{ "$id": "http://example.com/0", "title": "Second!" },
{ "title": "Third!" },
{ "$id": "http://example.com/1", "title": "Fourth!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "Second!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Fourth!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-items-object.json 0000644 0000000 0000000 00000000566 13615410400 024564 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-items",
"target": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-not.json 0000644 0000000 0000000 00000000553 13615410400 022773 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"not": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-not",
"target": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-oneOf.json 0000644 0000000 0000000 00000000767 13615410400 023250 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"oneOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-patternProperties.json 0000644 0000000 0000000 00000000652 13615410400 025725 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"patternProperties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-properties.json 0000644 0000000 0000000 00000000643 13615410400 024367 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-propertyNames.json 0000644 0000000 0000000 00000000623 13615410400 025041 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"propertyNames": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-propertyNames",
"target": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-then.json 0000644 0000000 0000000 00000000557 13615410400 023135 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"then": {
"$id": "http://example.com/oh-hey-a-then",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-then",
"target": {
"$id": "http://example.com/oh-hey-a-then",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-unevaluatedItems.json 0000644 0000000 0000000 00000000642 13615410400 025511 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unevaluatedItems": {
"$id": "http://example.com/oh-hey-an-unevaluatedItems",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-unevaluatedItems",
"target": {
"$id": "http://example.com/oh-hey-an-unevaluatedItems",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/keywords-unevaluatedProperties.json 0000644 0000000 0000000 00000000666 13615410400 026572 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unevaluatedProperties": {
"$id": "http://example.com/oh-hey-an-unevaluatedProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-unevaluatedProperties",
"target": {
"$id": "http://example.com/oh-hey-an-unevaluatedProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/multiple-lookup-anchor.json 0000644 0000000 0000000 00000000637 13615410400 024743 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": { "$anchor": "foo", "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/",
"target": { "$defs": { "foo": { "$anchor": "foo", "bar": "baz" } } },
"then": {
"ref": "#foo",
"target": { "$anchor": "foo", "bar": "baz" }
}
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000206 00000000000 010213 x ustar 00 134 path=referencing-0.36.2/suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-0000644 0000000 0000000 00000002000 13615410400 027764 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "http://example.org/foo",
"$defs": {
"bar": {
"$anchor": "baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/$defs/foo",
"target": {
"$id": "http://example.org/foo",
"$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } }
},
"then": {
"ref": "#baz",
"target": { "$anchor": "baz", "quux": "eggs" }
}
},
{
"ref": "http://example.com/#/$defs/foo",
"target": {
"$id": "http://example.org/foo",
"$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } }
},
"then": {
"ref": "http://example.org/foo#baz",
"target": { "$anchor": "baz", "quux": "eggs" }
}
},
{
"ref": "http://example.com/#baz",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/multiple-lookup-pointer.json 0000644 0000000 0000000 00000000476 13615410400 025152 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo/",
"target": { "foo": "bar" },
"then": {
"ref": "#/foo",
"target": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/multiple-lookup.json 0000644 0000000 0000000 00000000706 13615410400 023470 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" },
"http://example.com/foo/bar": { "baz": "quux" }
},
"tests": [
{
"ref": "http://example.com/",
"target": {},
"then": {
"ref": "foo/",
"target": { "foo": "bar" },
"then": {
"ref": "bar",
"target": { "baz": "quux" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/nested-absolute-id.json 0000644 0000000 0000000 00000001217 13615410400 024014 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"$defs": {
"foo": {
"$id": "http://example.com/nested",
"$defs": {
"inner": { "foo": "bar" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/nested",
"ref": "#/$defs/inner",
"target": { "foo": "bar" }
},
{
"base_uri": "http://example.com/",
"ref": "nested",
"target": {
"$id": "http://example.com/nested",
"$defs": {
"inner": { "foo": "bar" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/nested-relative-id-only-retrieval-uri.json 0000644 0000000 0000000 00000000525 13615410400 027561 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/nested-relative-id.json 0000644 0000000 0000000 00000000571 13615410400 024013 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"$defs": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-const.json 0000644 0000000 0000000 00000000410 13615410400 026311 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"const": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-default.json 0000644 0000000 0000000 00000000412 13615410400 026611 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"default": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-enum.json 0000644 0000000 0000000 00000000411 13615410400 026130 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-examples.json 0000644 0000000 0000000 00000000415 13615410400 027006 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-array.json 0000644 0000000 0000000 00000001072 13615410400 027061 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": [
{
"$id": "http://example.com/oh-hey-an-items",
"$defs": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
]
}
},
"tests": [
{
"ref": "http://example.com/#/items/0/$defs/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-object.json 0000644 0000000 0000000 00000001024 13615410400 027206 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"$id": "http://example.com/oh-hey-an-items",
"$defs": {
"$id": {},
"foo": {
"$id": "foo",
"bar": "baz"
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/items/$defs/foo",
"target": { "$id": "foo", "bar": "baz" },
"then": {
"ref": "#",
"target": { "$id": "foo", "bar": "baz" }
}
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000163 00000000000 010215 x ustar 00 115 path=referencing-0.36.2/suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id-in-subvalue.json
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id-in-subvalue0000644 0000000 0000000 00000000456 13615410400 027761 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/#/$defs/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id.json 0000644 0000000 0000000 00000000563 13615410400 026500 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"$defs": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/additionalProperties/$defs/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/relative-pointer-array.json 0000644 0000000 0000000 00000000346 13615410400 024733 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": [2, 4, 6] }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/1",
"target": 4
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/relative-pointer-escapes.json 0000644 0000000 0000000 00000001103 13615410400 025230 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": {
"foo": {
"tilde~field": "bar",
"slash/field": "baz",
"percent%field": "quux"
}
}
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/tilde~0field",
"target": "bar"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/slash~1field",
"target": "baz"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/percent%25field",
"target": "quux"
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/relative-pointer-object.json 0000644 0000000 0000000 00000000403 13615410400 025055 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": { "bar": { "baz": 12 } } }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/bar",
"target": { "baz": 12 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-insertion.json 0000644 0000000 0000000 00000005311 13615410400 026735 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"hTtP://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://exAmpLe.com/case-insensitive-host": { "baz": "quux" },
"hTtP://exAmpLe.com/case-SENSITIVE-path": {},
"http://example.com/escapes/a%c2%b1b": { "spam": "eggs" },
"http://example.com/unreserved/%7Efoo": { "snap": "crackle" },
"http://example.com:80/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"$defs": {
"scheme": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "http://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://example.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "http://example.com/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%C2%B1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/~foo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com/default/port",
"target": { "pop": 37 }
},
{
"ref": "http://example.com/id/case-insensitive-scheme",
"target": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://example.com/id/case-insensitive-host",
"target": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "http://example.com/id/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%C2%B1b",
"target": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/~foo",
"target": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
}
},
{
"ref": "http://example.com/id/default/port",
"target": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-retrieval.json 0000644 0000000 0000000 00000005304 13615410400 026722 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://example.com/case-insensitive-host": { "baz": "quux" },
"http://example.com/case-sensitive-path": {},
"http://example.com/escapes/a%C2%B1b": { "spam": "eggs" },
"http://example.com/unreserved/~foo": { "snap": "crackle" },
"http://example.com/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"$defs": {
"scheme": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "http://example.com/id/case-sensitive-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "hTtP://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://exAmpLe.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "hTtP://exAmpLe.com/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%c2%b1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/%7Efoo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com:80/default/port",
"target": { "pop": 37 }
},
{
"ref": "hTtP://example.com/id/case-insensitive-scheme",
"target": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://exAmpLe.com/id/case-insensitive-host",
"target": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%c2%b1b",
"target": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/%7Efoo",
"target": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
}
},
{
"ref": "http://example.com:80/id/default/port",
"target": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/tag-uris.json 0000644 0000000 0000000 00000003272 13615410400 022062 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
"$defs": {
"foo": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"$defs": {
"bar": {
"$anchor": "baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"target": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"$defs": {
"bar": {
"$anchor": "baz",
"quux": "eggs"
}
}
},
"then": {
"ref": "#baz",
"target": { "$anchor": "baz", "quux": "eggs" }
}
},
{
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
"specifications": [
{
"rfc": 4151,
"section": "2.2",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
}
]
}
},
{
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
"specifications": [
{
"rfc": 4151,
"section": "2.1",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
}
]
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/unignored-siblings.json 0000644 0000000 0000000 00000000744 13615410400 024132 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"allOf": [
{
"$id": "not-ignored-id.json",
"$ref": "foo.json"
},
{ "$id": "foo.json" },
{ "$id": "not-ignored-id.json/foo.json" }
]
}
},
"tests": [
{
"ref": "http://example.com/not-ignored-id.json",
"target": { "$id": "not-ignored-id.json", "$ref": "foo.json" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2019-09/unknown-keyword.json 0000644 0000000 0000000 00000000507 13615410400 023506 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unknownKeyword": {
"$id": "http://example.com/oh-hey-not-a-real-known-id",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-a-real-known-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000473 13615410400 025661 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
},
"tests": [
{
"ref": "http://example.com/foo",
"target": {
"$id": "http://example.com/foo#",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/anchor.json 0000644 0000000 0000000 00000000556 13615410400 021565 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/boolean-schemas.json 0000644 0000000 0000000 00000001450 13615410400 023345 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": true,
"contains": true,
"contentSchema": true,
"else": true,
"if": true,
"items": true,
"not": false,
"propertyNames": true,
"then": true,
"unevaluatedItems": true,
"unevaluatedProperties": true,
"allOf": [true],
"anyOf": [true],
"oneOf": [true],
"prefixItems": [true],
"$defs": {
"foo": true,
"bar": { "$id": "bar" }
},
"dependentSchemas": { "foo": true },
"patternProperties": { "foo": true },
"properties": { "foo": true }
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "bar",
"target": { "$id": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/empty-fragment.json 0000644 0000000 0000000 00000000353 13615410400 023245 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-absolute-uri-anchor.json 0000644 0000000 0000000 00000000530 13615410400 026006 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-absolute-uri-empty-fragment.json 0000644 0000000 0000000 00000000325 13615410400 027475 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo#": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000166 00000000000 010220 x ustar 00 118 path=referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anc0000644 0000000 0000000 00000000604 13615410400 027636 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.org/internal",
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "http://example.com/#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-absolute-uri.json 0000644 0000000 0000000 00000000324 13615410400 024537 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo",
"target": { "foo": "bar" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-absolute-urn.json 0000644 0000000 0000000 00000000314 13615410400 024543 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": { "foo": "bar" }
},
"tests": [
{
"ref": "urn:example:schema",
"target": { "foo": "bar" }
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000164 00000000000 010216 x ustar 00 116 path=referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-uri-with-nested-relative-uri-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-uri-with-nested-relative-uri-ancho0000644 0000000 0000000 00000000702 13615410400 027700 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "foo",
"$defs": {
"spam": {
"$anchor": "bar",
"baz": "quux"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/foo#bar",
"target": {
"$anchor": "bar",
"baz": "quux"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/external-urn-anchor.json 0000644 0000000 0000000 00000000526 13615410400 024204 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"urn:example:schema": {
"$defs": {
"foo": {
"$anchor": "foo",
"foo": "bar"
}
}
}
},
"tests": [
{
"ref": "urn:example:schema#foo",
"target": {
"$anchor": "foo",
"foo": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/invalid-anchor-with-pointer.json 0000644 0000000 0000000 00000001201 13615410400 025624 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$anchor": "foo",
"$defs": {
"bar": { "baz": "quux" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/",
"ref": "#foo/$defs/bar",
"error": true
},
{
"base_uri": "http://example.com/",
"ref": "#foo#/$defs/bar",
"error": true
},
{
"ref": "http://example.com/#foo/$defs/bar",
"error": true
},
{
"ref": "http://example.com#foo/$defs/bar",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-additionalProperties.json 0000644 0000000 0000000 00000000662 13615410400 026343 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-additionalProperties",
"target": {
"$id": "http://example.com/oh-hey-an-additionalProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-allOf.json 0000644 0000000 0000000 00000000767 13615410400 023221 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"allOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-anyOf.json 0000644 0000000 0000000 00000000767 13615410400 023240 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"anyOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-contains.json 0000644 0000000 0000000 00000000577 13615410400 024001 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"contains": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-contains",
"target": {
"$id": "http://example.com/oh-hey-a-contains",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-contentSchema.json 0000644 0000000 0000000 00000000672 13615410400 024752 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"contentMediaType": "image/png",
"contentSchema": {
"$id": "http://example.com/oh-hey-a-contentSchema",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-contentSchema",
"target": {
"$id": "http://example.com/oh-hey-a-contentSchema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-definitions.json 0000644 0000000 0000000 00000000644 13615410400 024471 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"definitions": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-defs.json 0000644 0000000 0000000 00000000636 13615410400 023100 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-dependentSchemas.json 0000644 0000000 0000000 00000000651 13615410400 025426 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"dependentSchemas": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-else.json 0000644 0000000 0000000 00000000562 13615410400 023105 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"else": {
"$id": "http://example.com/oh-hey-an-else",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-else",
"target": {
"$id": "http://example.com/oh-hey-an-else",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-if.json 0000644 0000000 0000000 00000000552 13615410400 022552 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"if": {
"$id": "http://example.com/oh-hey-an-if",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-if",
"target": {
"$id": "http://example.com/oh-hey-an-if",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-items.json 0000644 0000000 0000000 00000000566 13615410400 023302 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"items": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-items",
"target": {
"$id": "http://example.com/oh-hey-an-items",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-not.json 0000644 0000000 0000000 00000000553 13615410400 022755 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"not": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-not",
"target": {
"$id": "http://example.com/oh-hey-a-not",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-oneOf.json 0000644 0000000 0000000 00000000767 13615410400 023232 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"oneOf": [
{ "$id": "http://example.com/0", "title": "First!" },
{ "$id": "http://example.com/1", "title": "Second!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "First!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Second!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-patternProperties.json 0000644 0000000 0000000 00000000652 13615410400 025707 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"patternProperties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-prefixItems.json 0000644 0000000 0000000 00000001075 13615410400 024454 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"prefixItems": [
{ "title": "First!" },
{ "$id": "http://example.com/0", "title": "Second!" },
{ "title": "Third!" },
{ "$id": "http://example.com/1", "title": "Fourth!" }
]
}
},
"tests": [
{
"ref": "http://example.com/0",
"target": { "$id": "http://example.com/0", "title": "Second!" }
},
{
"ref": "http://example.com/1",
"target": { "$id": "http://example.com/1", "title": "Fourth!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-properties.json 0000644 0000000 0000000 00000000643 13615410400 024351 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"properties": {
"foo": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-subschema",
"target": {
"$id": "http://example.com/oh-hey-a-subschema",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-propertyNames.json 0000644 0000000 0000000 00000000623 13615410400 025023 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"propertyNames": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-propertyNames",
"target": {
"$id": "http://example.com/oh-hey-a-propertyNames",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-then.json 0000644 0000000 0000000 00000000557 13615410400 023117 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"then": {
"$id": "http://example.com/oh-hey-a-then",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-a-then",
"target": {
"$id": "http://example.com/oh-hey-a-then",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-unevaluatedItems.json 0000644 0000000 0000000 00000000642 13615410400 025473 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unevaluatedItems": {
"$id": "http://example.com/oh-hey-an-unevaluatedItems",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-unevaluatedItems",
"target": {
"$id": "http://example.com/oh-hey-an-unevaluatedItems",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/keywords-unevaluatedProperties.json 0000644 0000000 0000000 00000000666 13615410400 026554 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unevaluatedProperties": {
"$id": "http://example.com/oh-hey-an-unevaluatedProperties",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-an-unevaluatedProperties",
"target": {
"$id": "http://example.com/oh-hey-an-unevaluatedProperties",
"abc": 123
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/multiple-lookup-anchor.json 0000644 0000000 0000000 00000000637 13615410400 024725 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": { "$anchor": "foo", "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/",
"target": { "$defs": { "foo": { "$anchor": "foo", "bar": "baz" } } },
"then": {
"ref": "#foo",
"target": { "$anchor": "foo", "bar": "baz" }
}
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000206 00000000000 010213 x ustar 00 134 path=referencing-0.36.2/suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-0000644 0000000 0000000 00000002000 13615410400 027746 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "http://example.org/foo",
"$defs": {
"bar": {
"$anchor": "baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/$defs/foo",
"target": {
"$id": "http://example.org/foo",
"$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } }
},
"then": {
"ref": "#baz",
"target": { "$anchor": "baz", "quux": "eggs" }
}
},
{
"ref": "http://example.com/#/$defs/foo",
"target": {
"$id": "http://example.org/foo",
"$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } }
},
"then": {
"ref": "http://example.org/foo#baz",
"target": { "$anchor": "baz", "quux": "eggs" }
}
},
{
"ref": "http://example.com/#baz",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/multiple-lookup-pointer.json 0000644 0000000 0000000 00000000476 13615410400 025134 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" }
},
"tests": [
{
"ref": "http://example.com/foo/",
"target": { "foo": "bar" },
"then": {
"ref": "#/foo",
"target": "bar"
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/multiple-lookup.json 0000644 0000000 0000000 00000000706 13615410400 023452 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {},
"http://example.com/foo/": { "foo": "bar" },
"http://example.com/foo/bar": { "baz": "quux" }
},
"tests": [
{
"ref": "http://example.com/",
"target": {},
"then": {
"ref": "foo/",
"target": { "foo": "bar" },
"then": {
"ref": "bar",
"target": { "baz": "quux" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/nested-absolute-id.json 0000644 0000000 0000000 00000001217 13615410400 023776 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"$defs": {
"foo": {
"$id": "http://example.com/nested",
"$defs": {
"inner": { "foo": "bar" }
}
}
}
}
},
"tests": [
{
"base_uri": "http://example.com/nested",
"ref": "#/$defs/inner",
"target": { "foo": "bar" }
},
{
"base_uri": "http://example.com/",
"ref": "nested",
"target": {
"$id": "http://example.com/nested",
"$defs": {
"inner": { "foo": "bar" }
}
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/nested-relative-id-only-retrieval-uri.json 0000644 0000000 0000000 00000000525 13615410400 027543 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/nested-relative-id.json 0000644 0000000 0000000 00000000571 13615410400 023775 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"$defs": {
"foo": {
"$id": "nested.json",
"title": "Hi!"
}
}
}
},
"tests": [
{
"ref": "http://example.com/nested.json",
"target": { "$id": "nested.json", "title": "Hi!" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-const.json 0000644 0000000 0000000 00000000410 13615410400 026273 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"const": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-default.json 0000644 0000000 0000000 00000000412 13615410400 026573 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"default": { "$id": "http://example.com/oh-hey-not-an-id" }
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-enum.json 0000644 0000000 0000000 00000000411 13615410400 026112 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-examples.json 0000644 0000000 0000000 00000000415 13615410400 026770 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }]
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-an-id",
"error": true
}
]
}
././@PaxHeader 0000000 0000000 0000000 00000000163 00000000000 010215 x ustar 00 115 path=referencing-0.36.2/suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id-in-subvalue.json
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id-in-subvalue0000644 0000000 0000000 00000000456 13615410400 027743 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$defs": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
},
"tests": [
{
"ref": "http://example.com/#/$defs/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id.json 0000644 0000000 0000000 00000000563 13615410400 026462 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"additionalProperties": {
"$defs": {
"$id": { "type": "string" },
"foo": { "bar": "baz" }
}
}
}
},
"tests": [
{
"ref": "http://example.com/#/additionalProperties/$defs/foo",
"target": { "bar": "baz" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/relative-pointer-array.json 0000644 0000000 0000000 00000000346 13615410400 024715 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": [2, 4, 6] }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/1",
"target": 4
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/relative-pointer-escapes.json 0000644 0000000 0000000 00000001103 13615410400 025212 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": {
"foo": {
"tilde~field": "bar",
"slash/field": "baz",
"percent%field": "quux"
}
}
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/tilde~0field",
"target": "bar"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/slash~1field",
"target": "baz"
},
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/percent%25field",
"target": "quux"
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/relative-pointer-object.json 0000644 0000000 0000000 00000000403 13615410400 025037 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/foo": { "foo": { "bar": { "baz": 12 } } }
},
"tests": [
{
"base_uri": "http://example.com/foo",
"ref": "#/foo/bar",
"target": { "baz": 12 }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-insertion.json 0000644 0000000 0000000 00000005311 13615410400 026717 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"hTtP://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://exAmpLe.com/case-insensitive-host": { "baz": "quux" },
"hTtP://exAmpLe.com/case-SENSITIVE-path": {},
"http://example.com/escapes/a%c2%b1b": { "spam": "eggs" },
"http://example.com/unreserved/%7Efoo": { "snap": "crackle" },
"http://example.com:80/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"$defs": {
"scheme": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "http://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://example.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "http://example.com/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%C2%B1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/~foo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com/default/port",
"target": { "pop": 37 }
},
{
"ref": "http://example.com/id/case-insensitive-scheme",
"target": {
"$id": "hTtP://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://example.com/id/case-insensitive-host",
"target": {
"$id": "http://exAmpLe.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "http://example.com/id/case-sensitive-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%C2%B1b",
"target": {
"$id": "http://example.com/id/escapes/a%c2%b1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/~foo",
"target": {
"$id": "http://example.com/id/unreserved/%7Efoo",
"snap": "crackle"
}
},
{
"ref": "http://example.com/id/default/port",
"target": {
"$id": "http://example.com:80/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-retrieval.json 0000644 0000000 0000000 00000005304 13615410400 026704 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/case-insensitive-scheme": { "foo": "bar" },
"http://example.com/case-insensitive-host": { "baz": "quux" },
"http://example.com/case-sensitive-path": {},
"http://example.com/escapes/a%C2%B1b": { "spam": "eggs" },
"http://example.com/unreserved/~foo": { "snap": "crackle" },
"http://example.com/default/port": { "pop": 37 },
"http://example.com/internal-ids": {
"$defs": {
"scheme": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
},
"host": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
},
"path": {
"$id": "http://example.com/id/case-sensitive-path"
},
"escapes": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
},
"unreserved": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
},
"port": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
}
},
"tests": [
{
"ref": "hTtP://example.com/case-insensitive-scheme",
"target": { "foo": "bar" }
},
{
"ref": "http://exAmpLe.com/case-insensitive-host",
"target": { "baz": "quux" }
},
{
"ref": "hTtP://exAmpLe.com/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/escapes/a%c2%b1b",
"target": { "spam": "eggs" }
},
{
"ref": "http://example.com/unreserved/%7Efoo",
"target": { "snap": "crackle" }
},
{
"ref": "http://example.com:80/default/port",
"target": { "pop": 37 }
},
{
"ref": "hTtP://example.com/id/case-insensitive-scheme",
"target": {
"$id": "http://example.com/id/case-insensitive-scheme",
"foo": "bar"
}
},
{
"ref": "http://exAmpLe.com/id/case-insensitive-host",
"target": {
"$id": "http://example.com/id/case-insensitive-host",
"baz": "quux"
}
},
{
"ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path",
"error": true
},
{
"ref": "http://example.com/id/escapes/a%c2%b1b",
"target": {
"$id": "http://example.com/id/escapes/a%C2%B1b",
"spam": "eggs"
}
},
{
"ref": "http://example.com/id/unreserved/%7Efoo",
"target": {
"$id": "http://example.com/id/unreserved/~foo",
"snap": "crackle"
}
},
{
"ref": "http://example.com:80/id/default/port",
"target": {
"$id": "http://example.com/id/default/port",
"pop": 37
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/tag-uris.json 0000644 0000000 0000000 00000003272 13615410400 022044 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
"$defs": {
"foo": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"$defs": {
"bar": {
"$anchor": "baz",
"quux": "eggs"
}
}
}
}
}
},
"tests": [
{
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"target": {
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
"$defs": {
"bar": {
"$anchor": "baz",
"quux": "eggs"
}
}
},
"then": {
"ref": "#baz",
"target": { "$anchor": "baz", "quux": "eggs" }
}
},
{
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
"specifications": [
{
"rfc": 4151,
"section": "2.2",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
}
]
}
},
{
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
"error": true,
"why": {
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
"specifications": [
{
"rfc": 4151,
"section": "2.1",
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
}
]
}
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/unignored-siblings.json 0000644 0000000 0000000 00000000744 13615410400 024114 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"$id": "http://example.com/",
"allOf": [
{
"$id": "not-ignored-id.json",
"$ref": "foo.json"
},
{ "$id": "foo.json" },
{ "$id": "not-ignored-id.json/foo.json" }
]
}
},
"tests": [
{
"ref": "http://example.com/not-ignored-id.json",
"target": { "$id": "not-ignored-id.json", "$ref": "foo.json" }
}
]
}
referencing-0.36.2/suite/tests/json-schema-draft-2020-12/unknown-keyword.json 0000644 0000000 0000000 00000000507 13615410400 023470 0 ustar 00 {
"$schema": "../../test-schema.json",
"registry": {
"http://example.com/": {
"unknownKeyword": {
"$id": "http://example.com/oh-hey-not-a-real-known-id",
"abc": 123
}
}
},
"tests": [
{
"ref": "http://example.com/oh-hey-not-a-real-known-id",
"error": true
}
]
}
referencing-0.36.2/.gitignore 0000644 0000000 0000000 00000005361 13615410400 013006 0 ustar 00 # Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dirhtml/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# User defined
_cache
TODO
referencing-0.36.2/COPYING 0000644 0000000 0000000 00000002041 13615410400 012041 0 ustar 00 Copyright (c) 2022 Julian Berman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
referencing-0.36.2/README.rst 0000644 0000000 0000000 00000002213 13615410400 012476 0 ustar 00 ===============
``referencing``
===============
|PyPI| |Pythons| |CI| |ReadTheDocs| |pre-commit|
.. |PyPI| image:: https://img.shields.io/pypi/v/referencing.svg
:alt: PyPI version
:target: https://pypi.org/project/referencing/
.. |Pythons| image:: https://img.shields.io/pypi/pyversions/referencing.svg
:alt: Supported Python versions
:target: https://pypi.org/project/referencing/
.. |CI| image:: https://github.com/python-jsonschema/referencing/workflows/CI/badge.svg
:alt: Build status
:target: https://github.com/python-jsonschema/referencing/actions?query=workflow%3ACI
.. |ReadTheDocs| image:: https://readthedocs.org/projects/referencing/badge/?version=stable&style=flat
:alt: ReadTheDocs status
:target: https://referencing.readthedocs.io/en/stable/
.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/python-jsonschema/referencing/main.svg
:alt: pre-commit.ci status
:target: https://results.pre-commit.ci/latest/github/python-jsonschema/referencing/main
An implementation-agnostic implementation of JSON reference resolution.
See `the documentation `_ for more details.
referencing-0.36.2/pyproject.toml 0000644 0000000 0000000 00000011472 13615410400 013732 0 ustar 00 [build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[project]
name = "referencing"
description = "JSON Referencing + Python"
requires-python = ">=3.9"
readme = "README.rst"
license = "MIT"
license-files = ["COPYING"]
keywords = ["json", "referencing", "jsonschema", "openapi", "asyncapi"]
authors = [
{ name = "Julian Berman", email = "Julian+referencing@GrayVines.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: File Formats :: JSON",
"Topic :: File Formats :: JSON :: JSON Schema",
]
dynamic = ["version"]
dependencies = [
"attrs>=22.2.0",
"rpds-py>=0.7.0",
"typing-extensions>=4.4.0; python_version<'3.13'",
]
[project.urls]
Documentation = "https://referencing.readthedocs.io/"
Homepage = "https://github.com/python-jsonschema/referencing"
Issues = "https://github.com/python-jsonschema/referencing/issues/"
Funding = "https://github.com/sponsors/Julian"
Tidelift = "https://tidelift.com/subscription/pkg/pypi-referencing?utm_source=pypi-referencing&utm_medium=referral&utm_campaign=pypi-link"
Changelog = "https://referencing.readthedocs.io/en/stable/changes/"
Source = "https://github.com/python-jsonschema/referencing"
[tool.coverage.html]
show_contexts = true
skip_covered = false
[tool.coverage.run]
branch = true
source = ["referencing"]
dynamic_context = "test_function"
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"\\s*\\.\\.\\.\\s*",
]
fail_under = 100
show_missing = true
skip_covered = true
[tool.doc8]
ignore = [
"D000", # see PyCQA/doc8#125
"D001", # one sentence per line, so max length doesn't make sense
]
[tool.mypy]
follow_imports = "skip"
ignore_errors = true
[tool.pyright]
reportUnnecessaryTypeIgnoreComment = true
strict = ["**/*"]
exclude = [
"**/tests/__init__.py",
"**/tests/test_*.py",
]
[tool.ruff]
line-length = 79
extend-exclude = ["suite"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A001", # It's fine to shadow builtins
"A002",
"A003",
"A005",
"ARG", # This is all wrong whenever an interface is involved
"ANN", # Just let the type checker do this
"B006", # Mutable arguments require care but are OK if you don't abuse them
"B008", # It's totally OK to call functions for default arguments.
"B904", # raise SomeException(...) is fine.
"B905", # No need for explicit strict, this is simply zip's default behavior
"C408", # Calling dict is fine when it saves quoting the keys
"C901", # Not really something to focus on
"D105", # It's fine to not have docstrings for magic methods.
"D107", # __init__ especially doesn't need a docstring
"D200", # This rule makes diffs uglier when expanding docstrings
"D203", # No blank lines before docstrings.
"D212", # Start docstrings on the second line.
"D400", # This rule misses sassy docstrings ending with ! or ?
"D401", # This rule is too flaky.
"D406", # Section headers should end with a colon not a newline
"D407", # Underlines aren't needed
"D412", # Plz spaces after section headers
"EM101", # These don't bother me, it's fine there's some duplication.
"EM102",
"FBT", # It's worth avoiding boolean args but I don't care to enforce it
"FIX", # Yes thanks, if I could it wouldn't be there
"N", # These naming rules are silly
"PLR0912", # These metrics are fine to be aware of but not to enforce
"PLR0913",
"PLR0915",
"PLW2901", # Shadowing for loop variables is occasionally fine.
"PT006", # pytest parametrize takes strings as well
"PYI025", # wat, I'm not confused, thanks.
"RET502", # Returning None implicitly is fine
"RET503",
"RET505", # These push you to use `if` instead of `elif`, but for no reason
"RET506",
"RSE102", # Ha, what, who even knew you could leave the parens off. But no.
"SIM300", # Not sure what heuristic this uses, but it's easily incorrect
"SLF001", # Private usage within this package itself is fine
"TD", # These TODO style rules are also silly
"UP007", # We support 3.9
]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
combine-as-imports = true
from-first = true
[tool.ruff.lint.per-file-ignores]
"noxfile.py" = ["ANN", "D100", "S101", "T201"]
"docs/*" = ["ANN", "D", "INP001"]
"referencing/tests/*" = ["ANN", "D", "RUF012", "S", "PLR", "TRY"]
"referencing/typing.py" = ["PLC0414"]
referencing-0.36.2/PKG-INFO 0000644 0000000 0000000 00000005433 13615410400 012113 0 ustar 00 Metadata-Version: 2.4
Name: referencing
Version: 0.36.2
Summary: JSON Referencing + Python
Project-URL: Documentation, https://referencing.readthedocs.io/
Project-URL: Homepage, https://github.com/python-jsonschema/referencing
Project-URL: Issues, https://github.com/python-jsonschema/referencing/issues/
Project-URL: Funding, https://github.com/sponsors/Julian
Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-referencing?utm_source=pypi-referencing&utm_medium=referral&utm_campaign=pypi-link
Project-URL: Changelog, https://referencing.readthedocs.io/en/stable/changes/
Project-URL: Source, https://github.com/python-jsonschema/referencing
Author-email: Julian Berman
License-Expression: MIT
License-File: COPYING
Keywords: asyncapi,json,jsonschema,openapi,referencing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: File Formats :: JSON
Classifier: Topic :: File Formats :: JSON :: JSON Schema
Requires-Python: >=3.9
Requires-Dist: attrs>=22.2.0
Requires-Dist: rpds-py>=0.7.0
Requires-Dist: typing-extensions>=4.4.0; python_version < '3.13'
Description-Content-Type: text/x-rst
===============
``referencing``
===============
|PyPI| |Pythons| |CI| |ReadTheDocs| |pre-commit|
.. |PyPI| image:: https://img.shields.io/pypi/v/referencing.svg
:alt: PyPI version
:target: https://pypi.org/project/referencing/
.. |Pythons| image:: https://img.shields.io/pypi/pyversions/referencing.svg
:alt: Supported Python versions
:target: https://pypi.org/project/referencing/
.. |CI| image:: https://github.com/python-jsonschema/referencing/workflows/CI/badge.svg
:alt: Build status
:target: https://github.com/python-jsonschema/referencing/actions?query=workflow%3ACI
.. |ReadTheDocs| image:: https://readthedocs.org/projects/referencing/badge/?version=stable&style=flat
:alt: ReadTheDocs status
:target: https://referencing.readthedocs.io/en/stable/
.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/python-jsonschema/referencing/main.svg
:alt: pre-commit.ci status
:target: https://results.pre-commit.ci/latest/github/python-jsonschema/referencing/main
An implementation-agnostic implementation of JSON reference resolution.
See `the documentation `_ for more details.