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

Custom Asset JSON-LD is a trap right now #679

Closed
2 tasks done
Tracked by #177
richardtreier opened this issue Dec 22, 2023 · 3 comments · Fixed by #820
Closed
2 tasks done
Tracked by #177

Custom Asset JSON-LD is a trap right now #679

richardtreier opened this issue Dec 22, 2023 · 3 comments · Fixed by #820
Assignees
Labels
kind/enhancement New feature or request scope/ce sovity's Open Source Community Edition scope/ee sovity's Closed Source Edition. All subscription tiers are impacted. status/blocked An issue is blocked by another issue or task

Comments

@richardtreier
Copy link
Collaborator

richardtreier commented Dec 22, 2023

Feature

Description

Our UiAsset has the properties additionalProperties, additionalJsonProperties, privateProperties and privateJsonProperties.

These properties are called "Json" but are JsonLd and affected by compaction and contraction, e.g. all propreties that aren't URLs disappear, strings become arrays, etc.

Any API consumer that wants to do anything "custom" such as a use case will stumble upon this

Acceptance Criteria

Proposed Solution

  • Property String customJson
    • Will be put in the JSON-LD as `sovity:customJson: "{{JSON STRINGIFIED}}"
    • So it won't be affected by compaction / extraction / JSON-LD validation, etc.
    • This would be used by technical users who want to largely diverge from our UI's way of defining assets, and also don't care about JSON-LD as they are owning the data space they use.
  • Property Map<String, String> customProperties
    • Simply easier access to all fields of "customJson" that are strings.
    • The above needs to be documented.
    • This is sort of easy access to custom data when you don't want to deal with JSON serialization / deserialization
    • Will be merged with customJson on persisting
    • Only string propreties get put in this map on reading sovity:customJson.
    • As above it is an easy entry for people to add custom fields and data to assets, e.g. realizing a use case within a data space.
  • Property String customJsonLd
    • Should contain the remainder of the unhandled JSON-LD of the Asset JSON-LD (as the customJson above is just one field that we control)
    • Will be rocked by compaction / expansion
    • Is documented as JSON-LD so everybody who uses it has JSON-LD semantic parsing utilities ready
    • Useful for people who want to adhere to some JSON-LD standard that forces them to adhere to some ontology. However, support for this would be experimental.
    • More than anything this is a place to find out if something weird was set into the asset

Possible Implementation and Work Breakdown

Tasks

  1. component/edc-ui
    kulgg
@richardtreier richardtreier added area/api-wrapper kind/enhancement New feature or request scope/ce sovity's Open Source Community Edition scope/ee sovity's Closed Source Edition. All subscription tiers are impacted. labels Dec 22, 2023
@richardtreier richardtreier changed the title Custom Asset JSON-LD is confusing right now. Custom Asset JSON-LD is a trap right now Dec 22, 2023
@richardtreier
Copy link
Collaborator Author

Maybe related: sovity/edc-ui#545

@AbdullahMuk
Copy link
Collaborator

@richardtreier please fill in the acceptance criteria section. Also, feel free to hand over this action to Christophe.

@ununhexium ununhexium self-assigned this Feb 13, 2024
@ununhexium ununhexium linked a pull request Feb 22, 2024 that will close this issue
3 tasks
@kulgg kulgg closed this as completed in #820 Mar 5, 2024
@AbdullahMuk AbdullahMuk reopened this Mar 19, 2024
@AbdullahMuk AbdullahMuk added the status/blocked An issue is blocked by another issue or task label Mar 20, 2024
@AbdullahMuk
Copy link
Collaborator

blocked by #852.

once #852 is resolved, we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request scope/ce sovity's Open Source Community Edition scope/ee sovity's Closed Source Edition. All subscription tiers are impacted. status/blocked An issue is blocked by another issue or task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants