Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDC namespace: Broken w3id.org redirect #4825

Open
drhansbeck opened this issue Feb 16, 2025 · 4 comments
Open

EDC namespace: Broken w3id.org redirect #4825

drhansbeck opened this issue Feb 16, 2025 · 4 comments
Labels
triage all new issues awaiting classification

Comments

@drhansbeck
Copy link

Bug Report

Describe the Bug

We commonly include edc namespace via w3id.org

    "@context": {
        "@vocab": "https://w3id.org/edc/v0.0.1/ns/"
}

Unfortunately, the w3id.org redirect is broken and leads to an html page (instead of some json ld).

Expected Behavior

https://w3id.org/edc/v0.0.1/ns/ redirects to a proper json defining the edc vocabulary

Observed Behavior

https://w3id.org/edc/v0.0.1/ns/ redirects to https://eclipse-edc.github.io/docs, a human-readable html page

hbeck@COF-L-W010:~$ curl https://w3id.org/edc/v0.0.1/ns/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>303 See Other</title>
</head><body>
<h1>See Other</h1>
<p>The answer to your request is located <a href="https://eclipse-edc.github.io/docs">here</a>.</p>
<hr>
<address>Apache/2.4.29 (Ubuntu) Server at w3id.org Port 443</address>
</body></html>
hbeck@COF-L-W010:~$

Steps to Reproduce

  1. Click on this link: https://w3id.org/edc/v0.0.1/ns/
  2. Automatically get redirected to https://eclipse-edc.github.io/docs
  3. See this html-page which is not a json holding the edc namespace definition
screenshot

Context Information

Some of this EDC namespace is posssibly loaded into the edc already at compile time. However, edc vocabulary should be accessibly to the end user when writing, e.g., edc policies.

There's a list of shorthands allegedly loaded at compile time for tractus-x edc here: https://github.com/eclipse-tractusx/tractusx-edc/tree/main/core/json-ld-core/src/main/resources/document . However they do not define edc namespace vocab, they simply provide a shorthand "contractPolicyId": "edc:contractPolicyId" to not have to prefix frequently used edc vocabulary with edc:, it appears.

When writing, e.g., incorrect contract definitions, an end user is often confronted with error messages (good). However, when trying to follow up on error messages such as

{
        "message": "mandatory object 'https://w3id.org/edc/v0.0.1/ns/policy' is missing",
        "type": "ValidationFailure",
        "path": "https://w3id.org/edc/v0.0.1/ns/policy",
        "invalidValue": null
    }

either i) this error points directly to a broken redirect or ii) the end user can not (effectively) assess their mistake because they are confused by the broken redirect.

Detailed Description

Good w3id.org redirect

hbeck@COF-L-W010:~$ curl https://w3id.org/catenax/ontology/common
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://raw.githubusercontent.com/big-data-spaces/ontology/v24.12/ontology/common_ontology.ttl">here</a>.</p>
<hr>
<address>Apache/2.4.29 (Ubuntu) Server at w3id.org Port 443</address>
</body></html>
hbeck@COF-L-W010:~$
hbeck@COF-L-W010:~$ curl -Ls https://w3id.org/catenax/ontology/common | head -n30
# Copyright (c) 2024 T-Systems International GmbH
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2024 ZF Friedrichshafen AG
# Copyright (c) 2024 Mercedes-Benz AG
# Copyright (c) 2024 Contributors to the Catena-X Association
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0

@prefix : <https://w3id.org/catenax/ontology/common#>.
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix cx-common: <https://w3id.org/catenax/ontology/common#> .
@prefix cx-core: <https://w3id.org/catenax/ontology/core#> .
hbeck@COF-L-W010:~$

Possible Implementation

Work with w3id.org to have a proper redirect.

@github-actions github-actions bot added the triage all new issues awaiting classification label Feb 16, 2025
Copy link

Thanks for your contribution 🔥 We will take a look asap 🚀

@ndr-brt
Copy link
Member

ndr-brt commented Feb 17, 2025

I think you are mixing up concepts between "namespace iri" and "referenced context url".
I'd suggest looking into the Json-ld specification for more details
https://www.w3.org/TR/json-ld11/#the-context

@drhansbeck
Copy link
Author

Hi @ndr-brt ,

Thanks for the link. Indeed, it helps understand the syntax. Awesome! :)

Do you agree that https://w3id.org/edc/v0.0.1/ns/ is broken? Do you agree that it should be fixed?

Best,
Hans

@ndr-brt
Copy link
Member

ndr-brt commented Feb 19, 2025

it redirects to the EDC documentation, looks fair to me. What would have you expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage all new issues awaiting classification
Projects
None yet
Development

No branches or pull requests

2 participants