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

fix: action as @id if it's not refined #4193

Merged
merged 1 commit into from
May 17, 2024

Conversation

wolf4ood
Copy link
Contributor

@wolf4ood wolf4ood commented May 17, 2024

What this PR changes/adds

Fixes the serialization of an Action

Currently the output is when the action is not refined

 "odrl:action": {
    "odrl:type": "http://www.w3.org/ns/odrl/2/use"
   }

Now it changes to :

 "odrl:action": {
    "@id": "odrl:use"
   }

Since now the action is an @id in compaction phase:

http://www.w3.org/ns/odrl/2/use => odrl:use

Why it does that

bug fix

Further notes

This is a breaking change for the MGMT API mostly since at protocol level older EDC should be able to deal wit the @id syntax.

The patch also support in input the old wrong type when deserializing the action from json.

Linked Issue(s)

Closes #4192

@wolf4ood wolf4ood added bug Something isn't working breaking-change Will require manual intervention for version update labels May 17, 2024
@wolf4ood wolf4ood self-assigned this May 17, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 74.98%. Comparing base (7f20ba5) to head (47af2c6).
Report is 259 commits behind head on main.

Files Patch % Lines
...orm/odrl/from/JsonObjectFromPolicyTransformer.java 57.14% 0 Missing and 3 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4193      +/-   ##
==========================================
+ Coverage   71.74%   74.98%   +3.24%     
==========================================
  Files         919     1015      +96     
  Lines       18457    20635    +2178     
  Branches     1037     1163     +126     
==========================================
+ Hits        13242    15474    +2232     
+ Misses       4756     4651     -105     
- Partials      459      510      +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wolf4ood wolf4ood force-pushed the fix/4192_action_as_id branch 2 times, most recently from 1269616 to e4c9c4c Compare May 17, 2024 08:40
@wolf4ood wolf4ood marked this pull request as ready for review May 17, 2024 09:07
@wolf4ood wolf4ood requested a review from ndr-brt as a code owner May 17, 2024 09:07
@wolf4ood wolf4ood merged commit 47b07d0 into eclipse-edc:main May 17, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Will require manual intervention for version update bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

action in policy translated into type instead of @id
4 participants