diff --git a/kgforge/specializations/stores/nexus/prepare_methods.py b/kgforge/specializations/stores/nexus/prepare_methods.py index a3e02776..5dddbb9d 100644 --- a/kgforge/specializations/stores/nexus/prepare_methods.py +++ b/kgforge/specializations/stores/nexus/prepare_methods.py @@ -95,14 +95,10 @@ def _prepare_uri( ) -> Tuple[str, Dict]: schema_id = schema_uri or resource._store_metadata._constrainedBy - if schema_id == service.UNCONSTRAINED_SCHEMA and not keep_unconstrained: schema_id = None url = _make_url(service, schema_id, resource.id) - url = Service.add_schema_and_id_to_endpoint( - service.url_resources, schema_id, resource_id=resource.id - ) rev = resource._store_metadata._rev params = {"rev": rev} diff --git a/kgforge/specializations/stores/nexus/service.py b/kgforge/specializations/stores/nexus/service.py index 21c1ebc9..9758fc7f 100644 --- a/kgforge/specializations/stores/nexus/service.py +++ b/kgforge/specializations/stores/nexus/service.py @@ -70,7 +70,6 @@ class Service: NEXUS_CONTENT_LENGTH_HEADER = "x-nxs-file-content-length" - def __init__( self, endpoint: str, diff --git a/tests/specializations/stores/test_bluebrain_nexus.py b/tests/specializations/stores/test_bluebrain_nexus.py index a47817c2..b931d4f5 100644 --- a/tests/specializations/stores/test_bluebrain_nexus.py +++ b/tests/specializations/stores/test_bluebrain_nexus.py @@ -304,6 +304,14 @@ def test_to_resource(nexus_store, registered_building, building_jsonld, store_co ("/".join((NEXUS, "resources", BUCKET, quote_plus("_"), "{}", "tags"))), id="tag-unconstrained", ), + pytest.param( + (Service.SHACL_SCHEMA), + (Service.SHACL_SCHEMA), + ({"rev": 1}), + ("/".join((NEXUS, "schemas", BUCKET, "{}"))), + ("/".join((NEXUS, "schemas", BUCKET, "{}", "tags"))), + id="tag-schema", + ), ], ) def test_prepare_tag_uri(