Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: Use correct JSON-LD context prefix #257

Conversation

leandro-cavalcante
Copy link
Contributor

Description

In the returned policies, the policy hub adds the https://w3id.org/catenax/v0.0.1/ns/ context with the cx prefix, but then uses the cx-policy prefix instead.

Why

The cx-policy prefix isn’t bound to any context within the JSON-LD document and therefore will fail to expand during serialization.

Issue

N/A

Issue

Link to Github issue.

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed IP checks for added or updated 3rd party libraries
  • I have created and linked IP issues or requested their creation by a committer
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally
  • I have added tests that prove my changes work
  • I have checked that new and existing tests pass locally with my changes
  • I have commented my code, particularly in hard-to-understand areas
  • I have added copyright and license headers, footers (for .md files) or files (for images)

@leandro-cavalcante
Copy link
Contributor Author

@evegufy the PR #232 was closed due some issues I had within my branch. I opened this one and it already has the changes requested by @Phil91

@evegufy evegufy requested review from Phil91 and evegufy February 7, 2025 08:09
@MaximilianHauer
Copy link

MaximilianHauer commented Feb 12, 2025

@leandro-cavalcante please refer to the policy standard of catena-x

https://catenax-ev.github.io/docs/standards/CX-0018-DataspaceConnectivity

i assume we would need to adjust the url regarding the cx-profile prefix

Catena-X ODRL Profile To clearly identify the relevant Catena-X ODRL Profile, every policy (and their subclasses) MUST use the ODRL ‘profile’ property with an IRI referring to the Catena-X ODRL Profile as defined in [ODRL policy](https://www.w3.org/TR/odrl-model/#policy) The current version is: https://w3id.org/catenax/policy/profile2405 or in compact form: cx-policy:profile2405.

@ntruchsess
Copy link
Contributor

@leandro-cavalcante please also solve the conflicts

Copy link
Contributor

@ntruchsess ntruchsess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the conflicts doing a rebase on upstream main. Your pull-request should not contain anything on the 'Files changed' page that is already present in the target-branch.

@leandro-cavalcante
Copy link
Contributor Author

@leandro-cavalcante please also solve the conflicts

I will open a new PR with the necessary changes, I'm doing the rebase but the other commits are coming together and I do not have the option to drop them.

@ntruchsess ntruchsess force-pushed the bugfix/Use-correct-json-ld-context-prefix branch from e52c7e8 to b54320b Compare February 13, 2025 10:29
@ntruchsess
Copy link
Contributor

ntruchsess commented Feb 13, 2025

@leandro-cavalcante I did remove the redundant commits leaving the conflict on your actual change. Please be aware that I did a force-push to do so. Of course you may also open a new PR reapplying your change to latest main if that is more easy for you.

@leandro-cavalcante
Copy link
Contributor Author

@leandro-cavalcante I did remove the redundant commits leaving the conflict on your actual change. Please be aware that I did a force-push to do so. Of course you may also open a new PR reapplying your change to latest main if that is more easy for you.

Thank you!

@ntruchsess
Copy link
Contributor

@leandro-cavalcante to ensure a PR would not contain any unintended changes in the swagger-documentation one always needs run 'dotnet build' on the respective service module after rebase on main to regenerate the swagger (hub-service.yaml). Just did that for you but keep in mind for your next PR.

@ntruchsess
Copy link
Contributor

i assume we would need to adjust the url regarding the cx-profile prefix
@MaximilianHauer : I agree - the iri specified should be adjusted as well. From my point of view this can be done independent from the current change which fixes the technical inconsistency of namespace declaration and usage being inconsistent.
I therefore merge this PR - fixing the other issues should be done in separate PR(s).
(it's not only the iri that is incorrect - the generated json-ld also doesn't contain the 'profile' property that would refer to the profile-version being in use)

@ntruchsess ntruchsess merged commit 199553d into eclipse-tractusx:main Feb 13, 2025
10 checks passed
@evegufy evegufy added this to the Release 25.03 milestone Feb 20, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: USER READY
Development

Successfully merging this pull request may close these issues.

5 participants