diff --git a/CHANGES.rst b/CHANGES.rst index 826dfb1..b191edf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,10 @@ Changes ======= +Version 2.0.0 (release 2024-12-05) + +- setup: bump major dependencies + Version 1.1.5 (release 2024-11-30) - fix: SphinxWarning diff --git a/invenio_jsonschemas/__init__.py b/invenio_jsonschemas/__init__.py index 3a61e19..bf4be5e 100644 --- a/invenio_jsonschemas/__init__.py +++ b/invenio_jsonschemas/__init__.py @@ -315,7 +315,7 @@ from .ext import InvenioJSONSchemas, InvenioJSONSchemasAPI, InvenioJSONSchemasUI from .proxies import current_jsonschemas -__version__ = "1.1.5" +__version__ = "2.0.0" __all__ = ( "__version__", diff --git a/invenio_jsonschemas/views.py b/invenio_jsonschemas/views.py index fc321e1..9bffeff 100644 --- a/invenio_jsonschemas/views.py +++ b/invenio_jsonschemas/views.py @@ -2,6 +2,7 @@ # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. +# Copyright (C) 2024 Graz University of Technology. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -53,7 +54,9 @@ def get_schema(schema_path): schema = state.get_schema( schema_path, with_refs=with_refs, resolved=resolved ) - return jsonify(schema) + return jsonify( + schema.__subject__ if isinstance(schema, JsonRef) else schema + ) else: return send_from_directory(schema_dir, schema_path) diff --git a/setup.cfg b/setup.cfg index 0c7e330..86bcfea 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,17 +27,17 @@ packages = find: python_requires = >=3.7 zip_safe = False install_requires = - invenio-base>=1.2.2,<2.0.0 + invenio-base>=2.0.0,<3.0.0 jsonref>=0.1 importlib_metadata>=4.0 importlib_resources>=4.0 [options.extras_require] tests = - pytest-black>=0.3.0,<0.3.10 + pytest-black-ng>=0.4.0 jsonresolver[jsonschema]>=0.2.1 mock>=1.3.0 - pytest-invenio>=1.4.0,<3.0.0 + pytest-invenio>=3.0.0,<4.0.0 sphinx>=4.5 # Kept for backwards compatibility docs =