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

Improve namespace prefixes configuration #4455

Closed
wolf4ood opened this issue Sep 5, 2024 · 1 comment
Closed

Improve namespace prefixes configuration #4455

wolf4ood opened this issue Sep 5, 2024 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@wolf4ood
Copy link
Contributor

wolf4ood commented Sep 5, 2024

Feature Request

Allow custom prefixes to be configured with EDC configurations without requiring a custom extension.

Which Areas Would Be Affected?

JsonLDExtension

Why Is the Feature Desired?

Currently it's possible only to configure cached document but if users wants to support custom namespace prefixes an extension is required.

Solution Proposal

Implement a new configuration in JsonLdExtension that read a configuration and register custom namespaces.

Example of configuration:

edc.jsonld.namespace.customns.scopes=MANAGEMENT_API
edc.jsonld.namespace.customns.iri=http://www.w3.org/ns/odrl/2/
edc.jsonld.namespace.customns.prefix=customprefix
edc.jsonld.namespace.customns.enabled=true

the enabled flag seems useless, but it can be used to override registered context via extensions.

This allow having a clean response for people who wants to bring their own context definition and remove the usage of prefix namespace mapping.

For example currently when using the extension management-api-json-ld-context is used, which is an experimental context definition for the EDC management API all the response will contain a @context like this:

{
    "@context": [
        "https://w3id.org/edc/connector/management/v0.0.1",
        {
            "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
            "edc": "https://w3id.org/edc/v0.0.1/ns/",
            "odrl": "http://www.w3.org/ns/odrl/2/"
        }
    ]
}

which is not ideal.

@wolf4ood wolf4ood added the enhancement New feature or request label Sep 5, 2024
@github-actions github-actions bot added the triage all new issues awaiting classification label Sep 5, 2024
@wolf4ood wolf4ood removed the triage all new issues awaiting classification label Sep 5, 2024
@wolf4ood
Copy link
Contributor Author

Not relevant, the improvements will be done manually via #4466

@wolf4ood wolf4ood added the wontfix This will not be worked on label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant