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

streaming samples #244

Open
AlveusC opened this issue Apr 25, 2024 · 5 comments
Open

streaming samples #244

AlveusC opened this issue Apr 25, 2024 · 5 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@AlveusC
Copy link

AlveusC commented Apr 25, 2024

Bug Report

Describe the Bug

Working through the samples like described in the ReadMe doenst work cause the negotiate-contract.json is faulty.
This is the error occuring

[
  {
    "message": "https://w3id.org/edc/v0.0.1/ns/policy/@type was expected to be http://www.w3.org/ns/odrl/2/Offer but it was not",
    "type": "ValidationFailure",
    "path": "https://w3id.org/edc/v0.0.1/ns/policy/@type",
    "invalidValue": [
      "https://w3id.org/edc/v0.0.1/ns/Offer"
    ]
  },
  {
    "message": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/assigner/@id cannot be null or blank",
    "type": "ValidationFailure",
    "path": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/assigner/@id",
    "invalidValue": null
  },
  {
    "message": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/target/@id cannot be null or blank",
    "type": "ValidationFailure",
    "path": "https://w3id.org/edc/v0.0.1/ns/policy/http://www.w3.org/ns/odrl/2/target/@id",
    "invalidValue": null
  }
]

Expected Behavior

Working through the sample, the negotiate-contract.json should negotiate the contract about the asset

Solution

The negotiate-contract.json doesnt have the right format. The right format should look like this:

{
  "@context": {
    "@vocab": "https://w3id.org/edc/v0.0.1/ns/",
    "odrl": "http://www.w3.org/ns/odrl/2/"
  },
  "@type": "ContractRequest",
  "counterPartyAddress": "http://localhost:18182/protocol",
  "protocol": "dataspace-protocol-http",
  "policy": {
    "@id": "Y29udHJhY3QtZGVmaW5pdGlvbg==:a2Fma2Etc3RyZWFtLWFzc2V0:ZjJmZWMyOWMtYTU4NC00ODdmLTljMWItMWZjNTc5MzNmZmVi",
    "@type": "http://www.w3.org/ns/odrl/2/Offer",
    "odrl:permission": [],
    "odrl:prohibition": [],
    "odrl:obligation": [],
    "odrl:assigner": {
      "@id": "provider"
    },
    "odrl:target": {
      "@id": "kafka-stream-asset"
    }
  }
}
Copy link

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

@ndr-brt
Copy link
Member

ndr-brt commented Apr 29, 2024

hey, thanks for reporting, could you provide a PR to fix this issue?

@ndr-brt ndr-brt added good first issue Good for newcomers and removed triage labels May 8, 2024
@ipa-big
Copy link

ipa-big commented May 22, 2024

I had the same issue. For me this worked:


{
  "@context":{
    "@vocab":"https://w3id.org/edc/v0.0.1/ns/"
  },
  "@type":"ContractRequest",
  "counterPartyAddress":"http://{{provider-host}}:{{provider-port-protocol}}/protocol",
  "providerId":"provider",
  "protocol":"dataspace-protocol-http",
  "policy":{
    "@context": "http://www.w3.org/ns/odrl.jsonld",
    "@id":"{{contract_offer_id}}",
    "@type":"Offer",
    "permission":[ ],
    "prohibition":[ ],
    "obligation":[ ],
    "assigner": "provider",
    "target":"stream-asset"
  }
}

Would be nice to know what is the "right" way (if this exists)

@ndr-brt
Copy link
Member

ndr-brt commented May 23, 2024

a json-ld document has different ways to be represented, an extended way, and multiple "compact" ways, all of them are potentially "right"

Copy link

github-actions bot commented Jun 7, 2024

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale Open for x days with no activity label Jun 7, 2024
@ndr-brt ndr-brt removed the stale Open for x days with no activity label Jun 7, 2024
@ndr-brt ndr-brt added this to the Backlog milestone Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants