bcgov / aries-oca-bundles

aries-oca-bundles
Apache License 2.0
8 stars 20 forks source link

Export Schema ID in ocaundleslist.json #113

Closed amanji closed 8 months ago

amanji commented 8 months ago

In order for linking to work, URLs must resolve to a unique value. This will require the Schema ID. Unless we think its a better idea to use the shasum value

swcurran commented 8 months ago

Arrghh…sorry about that. Shouldn’t have been removed — the shasum is an extra value. Fixing...

swcurran commented 8 months ago

Hmmm…the ID has never been part of that file, because there can be multiple IDs (Schemas, Cred Defs) associated with a given bundle. That is accounted for in the ocabundle.json (one row per identifier), but not in the OCABundleList.json file.

I don’t think it is needed, but could be wrong. Why are you thinking it is needed?

If it is needed, it is easy to add one identifier (the last from the README.md file), or (a little more complicated), I can add the array of identifiers.

Are you sure you need it @amanji ?

amanji commented 8 months ago

I think the shasum is unique so I can use that and it's already included in the payload. The main thing is to be able to link directly to specific bundles. Can close this for now.

swcurran commented 8 months ago

Discussed and a solution defined and implemented here #114 .

swcurran commented 8 months ago

@amanji — the solution we have is not working I don’t think. The dropdown list has many duplicates of the same OCA Bundle. We should have each Bundle only once. Either the code you have should have filter to list each unique path only once, or there should be (as before) only one entry in the array per per path to a bundle.

What makes the most sense to you?

amanji commented 8 months ago

The duplication is because the same names map to multiple paths. I don't think we can get around that unless we have entirely unique names for each path. The question becomes what is easier for a user to understand? Should we just display the path then and show the name in brackets?

amanji commented 8 months ago

Let me first check to see this isn't a bug. I thought the list was already one entry/path per bundle

swcurran commented 8 months ago

No — you had asked for one ID (schemaId/credDefId being the IDs) per entry, and multiple IDs point to the same Bundle. I had thought you were going to filter the list to be one entry per path, but likely misunderstood. That multiple IDs point to the same bundle path is expected.

amanji commented 8 months ago

Sorry I get what's going on now. I will filter the list by path. It will filter out some ID's but that shouldn't matter if its pointing to the same bundle