Skip to content

Commit

Permalink
feat: Add kwargs to replace_refs
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 14, 2024
1 parent 4b1a6f2 commit 8abbe30
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

0.6.2 (2024-12-13)
------------------

- :meth:`ocdsextensionregistry.util.replace_refs`: Accepts keyword arguments to pass through to ``jsonref.replace_refs``.

0.6.1 (2024-12-13)
------------------

Expand All @@ -10,6 +15,7 @@ Changelog
------------------

- Add :meth:`ocdsextensionregistry.versioned_release_schema.get_versioned_release_schema`.
- Add :meth:`ocdsextensionregistry.util.replace_refs`.
- Prohibit extensions from using ``null`` to remove members.
- When replacing ``$ref``'erences:

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

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

Expand Down
4 changes: 2 additions & 2 deletions ocdsextensionregistry/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def loader(url, **kwargs):
raise NotImplementedError


def replace_refs(schema):
deref = jsonref.replace_refs(schema, proxies=False, merge_props=True, loader=loader)
def replace_refs(schema, **kwargs):
deref = jsonref.replace_refs(schema, proxies=False, merge_props=True, loader=loader, **kwargs)
deref.pop('definitions')
return deref

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ocdsextensionregistry"
version = "0.6.1"
version = "0.6.2"
authors = [{name = "Open Contracting Partnership", email = "[email protected]"}]
description = "Eases access to information from the extension registry of the Open Contracting Data Standard"
readme = "README.rst"
Expand Down

0 comments on commit 8abbe30

Please sign in to comment.