Skip to content

Commit

Permalink
feat: validate_ref accepts keyword arguments to pass to jsonref.repla…
Browse files Browse the repository at this point in the history
…ce_refs
  • Loading branch information
jpmckinney committed Jan 29, 2024
1 parent 97225f0 commit 13aacf6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

0.2.4 (2024-01-29)
------------------

Changed
~~~~~~~

- :meth:`jscc.testing.checks.validate_ref` accepts keyword arguments to pass to ``jsonref.replace_refs``.

0.2.3 (2023-07-06)
------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
author = "Open Contracting Partnership and Open Data Services Co-operative Limited"

# The short X.Y version
version = "0.2.3"
version = "0.2.4"
# The full version, including alpha/beta/rc tags
release = version

Expand Down
4 changes: 2 additions & 2 deletions jscc/testing/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def block(path, data, pointer):
return _traverse(block)(*args)


def validate_ref(path, data):
def validate_ref(path, data, **kwargs):
"""
Warns and returns ``1`` if not all ``$ref``'erences can be resolved.
Expand All @@ -665,7 +665,7 @@ def validate_ref(path, data):
:rtype: int
"""
try:
jsonref.replace_refs(data, lazy_load=False)
jsonref.replace_refs(data, lazy_load=False, **kwargs)
except jsonref.JsonRefError as e:
warn(f"{path} has {e.message} at {'/'.join(map(str, e.path))}", RefWarning)
return 1
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = jscc
version = 0.2.3
version = 0.2.4
author = Open Contracting Partnership and Open Data Services Co-operative Limited
author_email = data@open-contracting.org
license = BSD
Expand Down

0 comments on commit 13aacf6

Please sign in to comment.