10000 Asset with array property containing one value interpreted as literal string · Issue #5001 · eclipse-edc/Connector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Asset with array property containing one value interpreted as literal string #5001
Closed
@PLHPLH

Description

@PLHPLH

Bug Report

Describe the Bug

This issue is a follow-up to the issue 4998

We are creating assets that sometimes belong to multiple groups. We use these groups in the asset selector of the contract definitions.

  • Contract definition for asset group A: Asset selector -> assetGroups contains "A"
  • Contract definition for asset group B: Asset selector -> assetGroups contains "B"

When we create an asset with "assetGroups":["A","B"] we are able to visualize the offers in the consumer connectors.

However when we create assets that are part of only one group: "assetGroups":["A"]

The assets are created as a literal string in the provider catalogue-> "assetGroups":"A"

This directly impacts the asset selector, as we are not able to generate offers for this asset because it no longer matches the asset selector.

The logic works perfectly for assets that are part of multiple groups, "assetGroups":["A","B"].

We are aware of issue 4525 ; however, we think this is a slightly different issue.

Expected Behavior

The property should be interpreted as an array when creating the asset.

Observed Behavior

A literal string is created in the provider catalog, and therefore, an offer is not generated for the asset in the consumer catalog.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a contract definition using an asset selector:
   "assetsSelector": [

      {
        "@type": "Criterion",
        "operandLeft": "https://w3id.org/edc/v0.0.1/ns/assetGroups",
        "operator": "contains",
        "operandRight": "A"
      }
    ]
  1. Create an asset with the property assetGroups = A
"properties": {
    "assetGroups":["A"]
   }
  1. Check the asset properties from your newly created asset:
"properties": {
    "assetGroups":"A"
   }

Context Information

Used version : EDC 0.13.0-SNAPSHOT

Possible Implementation

You already know the root cause of the erroneous state and how to fix it? Feel free to share your thoughts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageall new issues awaiting classification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0