hyperledger-labs / business-partner-agent

The Business Partner Agent is a SSI wallet and controller based on aries cloud agent python.
https://labs.hyperledger.org/business-partner-agent/
Apache License 2.0
56 stars 48 forks source link

Improve json-ld schema import #791

Open etschelp opened 2 years ago

etschelp commented 2 years ago

The npm library that we use to lookup the ld schema names does not work in all cases e.g. https://w3id.org/vaccination/v1 is a valid schema name, but the lookup does not work because there is a redirect. The redirect url does not work either because it has a wrong media type. For such cases it would be better to have a fallback where the user can add the attribute names manually like we have it in the "Create Indy Schema" dialog. Also this would probably also be needed for cases where the attributes belong to a namespace like test:name.

Screenshot 2022-07-28 at 17 33 26
schlagtim commented 1 year ago

Wouldn't this rather be a create JSON-LD schema dialog and not an import? After all attributes could be added which are not present in that JSON-LD. Would it still be valid? I suggest that since the schema can be changed, we move the current dialog from Import to Create (including the tabs) and add your requested functionality on top. We could also try a different design than the data table - while it works we could list the available attributes e.g. in a dropdown menu when adding new attributes by hand to select one each at a time. It does add more steps for the user, but may also be more intuitive to use.