Skip to content

Commit

Permalink
Update the ocabundleslist.json to have an entry per identifier and in…
Browse files Browse the repository at this point in the history
…clude the id in the entry

Signed-off-by: Stephen Curran <[email protected]>
  • Loading branch information
swcurran committed Dec 20, 2023
1 parent 8eb0af9 commit cfe82f9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
43 changes: 28 additions & 15 deletions ocabundleslist.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
[
{ "org": "Digital Trust, Government of British Columbia", "name": "BC Registries Digital Business Card", "desc": "A verifiable credential schema for a business registered within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/business-card/OCABundle.json", "shasum": "34804dbb328cd8741d048121963786f4be63c654abdf0757a10f477c8e8924d5" },
{ "org": "Digital Trust, Government of British Columbia", "name": "BC Registries Digital Business Card", "desc": "A verifiable credential schema for a business registered within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/business-card-showcase/OCABundle.json", "shasum": "aa4dc9de20639a77ab53c419e9e46f405008be170e68ddf4d22551cc0a6be230" },
{ "org": "LCRB", "name": "LCRB Selling It Right Credential", "desc": "A schema for the \"Selling It Right\" credential issued by LCRB.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/LCRB/selling-it-right-showcase/OCABundle.json", "shasum": "3bf9a4cef7422533ce2b3253d6f73f6a007bb014636ad29e858a7a211eff7080" },
{ "org": "LCRB", "name": "LCRB Serving It Right Credential", "desc": "A schema for the \"Serving It Right\" credential issued by LCRB.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/LCRB/serving-it-right-showcase/OCABundle.json", "shasum": "79e343ab4362d93974cdf78b00a916a5b3659178dfd170fcff90f1b5f10ceb72" },
{ "org": "LCRB", "name": "LCRB Special Event Server Credential", "desc": "A schema for the \"Special Event Server\" credential issued by LCRB.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/LCRB/special-event-server-showcase/OCABundle.json", "shasum": "1852d293007172d7cfe9c07303a66277f08e6c8b18493ab6d8b63ed61fb2471d" },
{ "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Lawyer Member Card", "desc": "A verifiable credential schema for a lawyer's membership card that used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/member-card/OCABundle.json", "shasum": "22b79eb5039ed54ec643206d98fb22e871058872824d221f61185da52232643d" },
{ "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Lawyer Member Card", "desc": "A verifiable credential schema for a lawyer's membership card that used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/member-card-showcase/OCABundle.json", "shasum": "c52515dd4ebd34d217c01252b5ae778554338e6a09547ca8e06db4e16256bfdf" },
{ "org": "Energy and Mines Digital Trust, Government of British Columbia", "name": "BC Mines Act Permit", "desc": "A verifiable credential schema for issuance of a Mines Act Permit within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/mines-act-permit-0_3/OCABundle.json", "shasum": "f6616e82b844c0c2d54b762674bba8062bc2db8b7db5917b246edc4ef44a924f" },
{ "org": "Energy and Mines Digital Trust, Government of British Columbia", "name": "BC Mines Act Permit", "desc": "A verifiable credential schema for issuance of a Mines Act Permit within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/mines-act-permit-1_1_1/OCABundle.json", "shasum": "781e5ed8336af9562b945337f2c65dc7767a12256e24c64e554eba6889bab09b" },
{ "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person/OCABundle.json", "shasum": "02c2ae4e0d6389330acc0ff88d3509c0993929647901aff81c9a824255e2c61f" },
{ "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person-showcase/OCABundle.json", "shasum": "9794cc970b1cd853b5f8675d2ceeb89db32b30a0777a650618ea98d6f57ee0eb" },
{ "org": "Digital Trust, Government of British Columbia", "name": "Digital Identity Trust Program Pilot Invitation", "desc": "A verifiable credential schema for a Pilot Invitation credential to gain access to the Person Credential.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/pilot/OCABundle.json", "shasum": "044d0e8e66ca5464d9ff712a50bb06ea74d07056c5442c2311dd1fb1a23dc6b3" },
{ "org": "Digital Trust, Government of British Columbia", "name": "BC Best College Demo Student Card", "desc": "A verifiable credential schema for a Student Card used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/student-card/OCABundle.json", "shasum": "e65625acad0f1baab8e05b6cd1a5619b22e1f20cb47768616680a0fb2e8dc21d" },
{ "org": "Digital Trust, Government of British Columbia", "name": "Unverified Person Credential", "desc": "A verifiable credential schema for an \"unverified\" person, used in various BC Wallet demos where an unofficial Person credential is useful.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/unverified-person/OCABundle.json", "shasum": "48b20b00cb38bed85b9615674d9af32b0d5e16f75e365c144218dad6ec2b7aa0" },
{ "org": "MCN, Government of Quebec", "name": "QC ANIG ID", "desc": "A verifiable credential schema used for demonstration and internal use purposes only.", "type": "schema", "ocabundle": "OCABundles/schema/qc_anig_demo/Attestation_numérique_didentité_gouvernemental/OCABundle.json", "shasum": "29bf8f8729f235450980d0b273f9ca49b7ab73b7358467bf52b311bf40464bb0" }
{ "id": "AcZpBDz3oxmKrpcuPcdKai:2:Digital~Business~Card:1.0.0", "org": "Digital Trust, Government of British Columbia", "name": "BC Registries Digital Business Card", "desc": "A verifiable credential schema for a business registered within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/business-card/OCABundle.json", "shasum": "34804dbb328cd8741d048121963786f4be63c654abdf0757a10f477c8e8924d5" },
{ "id": "K9igebFysBL6jcBwR8bKuN:2:Digital~Business~Card:1.0.0", "org": "Digital Trust, Government of British Columbia", "name": "BC Registries Digital Business Card", "desc": "A verifiable credential schema for a business registered within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/business-card-showcase/OCABundle.json", "shasum": "aa4dc9de20639a77ab53c419e9e46f405008be170e68ddf4d22551cc0a6be230" },
{ "id": "TeT8SJGHruVL9up3Erp4o:3:CL:224665:Selling~It~Right", "org": "LCRB", "name": "LCRB Selling It Right Credential", "desc": "A schema for the \"Selling It Right\" credential issued by LCRB.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/LCRB/selling-it-right-showcase/OCABundle.json", "shasum": "3bf9a4cef7422533ce2b3253d6f73f6a007bb014636ad29e858a7a211eff7080" },
{ "id": "TeT8SJGHruVL9up3Erp4o:3:CL:224665:Serving~It~Right", "org": "LCRB", "name": "LCRB Serving It Right Credential", "desc": "A schema for the \"Serving It Right\" credential issued by LCRB.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/LCRB/serving-it-right-showcase/OCABundle.json", "shasum": "79e343ab4362d93974cdf78b00a916a5b3659178dfd170fcff90f1b5f10ceb72" },
{ "id": "TeT8SJGHruVL9up3Erp4o:3:CL:224665:Special~Event~Server", "org": "LCRB", "name": "LCRB Special Event Server Credential", "desc": "A schema for the \"Special Event Server\" credential issued by LCRB.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/LCRB/special-event-server-showcase/OCABundle.json", "shasum": "1852d293007172d7cfe9c07303a66277f08e6c8b18493ab6d8b63ed61fb2471d" },
{ "id": "4xE68b6S5VRFrKMMG1U95M:3:CL:59232:default", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Lawyer Member Card", "desc": "A verifiable credential schema for a lawyer's membership card that used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/member-card/OCABundle.json", "shasum": "22b79eb5039ed54ec643206d98fb22e871058872824d221f61185da52232643d" },
{ "id": "L6ASjmDDbDH7yPL1t2yFj9:2:member_card:1.53", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Lawyer Member Card", "desc": "A verifiable credential schema for a lawyer's membership card that used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/member-card-showcase/OCABundle.json", "shasum": "c52515dd4ebd34d217c01252b5ae778554338e6a09547ca8e06db4e16256bfdf" },
{ "id": "M6dhuFj5UwbhWkSLmvYSPc:2:member_card:1.53", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Lawyer Member Card", "desc": "A verifiable credential schema for a lawyer's membership card that used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/member-card-showcase/OCABundle.json", "shasum": "c52515dd4ebd34d217c01252b5ae778554338e6a09547ca8e06db4e16256bfdf" },
{ "id": "QEquAHkM35w4XVT3Ku5yat:2:member_card:1.53", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Lawyer Member Card", "desc": "A verifiable credential schema for a lawyer's membership card that used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/member-card-showcase/OCABundle.json", "shasum": "c52515dd4ebd34d217c01252b5ae778554338e6a09547ca8e06db4e16256bfdf" },
{ "id": "AuJrigKQGRLJajKAebTgWu:3:CL:209526:default", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Lawyer Member Card", "desc": "A verifiable credential schema for a lawyer's membership card that used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/member-card-showcase/OCABundle.json", "shasum": "c52515dd4ebd34d217c01252b5ae778554338e6a09547ca8e06db4e16256bfdf" },
{ "id": "S7S2wzcF2giKuwxdeLBk69:2:mines-act-permit:0.3", "org": "Energy and Mines Digital Trust, Government of British Columbia", "name": "BC Mines Act Permit", "desc": "A verifiable credential schema for issuance of a Mines Act Permit within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/mines-act-permit-0_3/OCABundle.json", "shasum": "f6616e82b844c0c2d54b762674bba8062bc2db8b7db5917b246edc4ef44a924f" },
{ "id": "S7S2wzcF2giKuwxdeLBk69:2:bc-mines-act-permit:1.1.1", "org": "Energy and Mines Digital Trust, Government of British Columbia", "name": "BC Mines Act Permit", "desc": "A verifiable credential schema for issuance of a Mines Act Permit within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/mines-act-permit-1_1_1/OCABundle.json", "shasum": "781e5ed8336af9562b945337f2c65dc7767a12256e24c64e554eba6889bab09b" },
{ "id": "A2UZSmrL9N5FDZGPu68wy:2:bc-mines-act-permit:1.1.1", "org": "Energy and Mines Digital Trust, Government of British Columbia", "name": "BC Mines Act Permit", "desc": "A verifiable credential schema for issuance of a Mines Act Permit within the province of British Columbia", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/mines-act-permit-1_1_1/OCABundle.json", "shasum": "781e5ed8336af9562b945337f2c65dc7767a12256e24c64e554eba6889bab09b" },
{ "id": "KCxVC8GkKywjhWJnUfCmkW:3:CL:20:PersonQA", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person/OCABundle.json", "shasum": "02c2ae4e0d6389330acc0ff88d3509c0993929647901aff81c9a824255e2c61f" },
{ "id": "7xjfawcnyTUcduWVysLww5:3:CL:28075:PersonSIT", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person/OCABundle.json", "shasum": "02c2ae4e0d6389330acc0ff88d3509c0993929647901aff81c9a824255e2c61f" },
{ "id": "XpgeQa93eZvGSZBZef3PHn:3:CL:28075:PersonDEV", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person/OCABundle.json", "shasum": "02c2ae4e0d6389330acc0ff88d3509c0993929647901aff81c9a824255e2c61f" },
{ "id": "RGjWbW1eycP7FrMf4QJvX8:3:CL:13:Person", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person/OCABundle.json", "shasum": "02c2ae4e0d6389330acc0ff88d3509c0993929647901aff81c9a824255e2c61f" },
{ "id": "L6ASjmDDbDH7yPL1t2yFj9:2:Person:1.2", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person-showcase/OCABundle.json", "shasum": "9794cc970b1cd853b5f8675d2ceeb89db32b30a0777a650618ea98d6f57ee0eb" },
{ "id": "M6dhuFj5UwbhWkSLmvYSPc:2:Person:1.2", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person-showcase/OCABundle.json", "shasum": "9794cc970b1cd853b5f8675d2ceeb89db32b30a0777a650618ea98d6f57ee0eb" },
{ "id": "QEquAHkM35w4XVT3Ku5yat:2:Person:1.2", "org": "Digital Trust, Government of British Columbia", "name": "BC Lawyer Showcase Person Credential", "desc": "A schema for a \"person\" credential used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/person-showcase/OCABundle.json", "shasum": "9794cc970b1cd853b5f8675d2ceeb89db32b30a0777a650618ea98d6f57ee0eb" },
{ "id": "Mp2pDQqS2eSjNVA7kXc8ut:2:BC~VC~Pilot~Certificate:1.0.1", "org": "Digital Trust, Government of British Columbia", "name": "Digital Identity Trust Program Pilot Invitation", "desc": "A verifiable credential schema for a Pilot Invitation credential to gain access to the Person Credential.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/pilot/OCABundle.json", "shasum": "044d0e8e66ca5464d9ff712a50bb06ea74d07056c5442c2311dd1fb1a23dc6b3" },
{ "id": "4zBepKVWZcGTzug4X49vAN:2:BC~VC~Pilot~Certificate:1.0.1", "org": "Digital Trust, Government of British Columbia", "name": "Digital Identity Trust Program Pilot Invitation", "desc": "A verifiable credential schema for a Pilot Invitation credential to gain access to the Person Credential.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/pilot/OCABundle.json", "shasum": "044d0e8e66ca5464d9ff712a50bb06ea74d07056c5442c2311dd1fb1a23dc6b3" },
{ "id": "E2h4RUJxyh48PLJ1CtGJrq:2:BC~VC~Pilot~Certificate:1.0.1", "org": "Digital Trust, Government of British Columbia", "name": "Digital Identity Trust Program Pilot Invitation", "desc": "A verifiable credential schema for a Pilot Invitation credential to gain access to the Person Credential.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/pilot/OCABundle.json", "shasum": "044d0e8e66ca5464d9ff712a50bb06ea74d07056c5442c2311dd1fb1a23dc6b3" },
{ "id": "L6ASjmDDbDH7yPL1t2yFj9:2:student_card:1.2", "org": "Digital Trust, Government of British Columbia", "name": "BC Best College Demo Student Card", "desc": "A verifiable credential schema for a Student Card used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/student-card/OCABundle.json", "shasum": "e65625acad0f1baab8e05b6cd1a5619b22e1f20cb47768616680a0fb2e8dc21d" },
{ "id": "M6dhuFj5UwbhWkSLmvYSPc:2:student_card:1.2", "org": "Digital Trust, Government of British Columbia", "name": "BC Best College Demo Student Card", "desc": "A verifiable credential schema for a Student Card used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/student-card/OCABundle.json", "shasum": "e65625acad0f1baab8e05b6cd1a5619b22e1f20cb47768616680a0fb2e8dc21d" },
{ "id": "QEquAHkM35w4XVT3Ku5yat:2:student_card:1.2", "org": "Digital Trust, Government of British Columbia", "name": "BC Best College Demo Student Card", "desc": "A verifiable credential schema for a Student Card used in a demo that is part of the BC Gov Digital Trust Showcase.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/student-card/OCABundle.json", "shasum": "e65625acad0f1baab8e05b6cd1a5619b22e1f20cb47768616680a0fb2e8dc21d" },
{ "id": "YXCtXE4YhVjULgj5hrk4ML:2:unverified_person:0.1.0", "org": "Digital Trust, Government of British Columbia", "name": "Unverified Person Credential", "desc": "A verifiable credential schema for an \"unverified\" person, used in various BC Wallet demos where an unofficial Person credential is useful.", "type": "schema", "ocabundle": "OCABundles/schema/bcgov-digital-trust/unverified-person/OCABundle.json", "shasum": "48b20b00cb38bed85b9615674d9af32b0d5e16f75e365c144218dad6ec2b7aa0" },
{ "id": "Ep31SvFAetugFPe5CGzJxt:2:Attestation~numérique~d'identité~gouvernemental~(EXP):1.0", "org": "MCN, Government of Quebec", "name": "QC ANIG ID", "desc": "A verifiable credential schema used for demonstration and internal use purposes only.", "type": "schema", "ocabundle": "OCABundles/schema/qc_anig_demo/Attestation_numérique_didentité_gouvernemental/OCABundle.json", "shasum": "29bf8f8729f235450980d0b273f9ca49b7ab73b7358467bf52b311bf40464bb0" }
]
8 changes: 4 additions & 4 deletions scripts/gen_ocabundlesjson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ processBundle() {
BUNDLE_PATH=OCABundle.json
SHASUM=$(shasum -a256 -U $BUNDLE_PATH | sed "s/ .*//")
ID=$(grep '^| ' README.md | sed -e "/OCA Bundle/,100d" -e "/Identifier/d" -e "/----/d" -e 's/^| \([^|]*\) |.*/\1/' -e 's/\s*$//' -e 's/ /~/g')
for id in ${ID}; do
echo " \"${id}\": { \"path\": \"${RELPATH}/${BUNDLE_PATH}\", \"sha256\": \"${SHASUM}\" }," | sed "s/~/ /g" >>${OCAIDSJSON}
done
ORG=$(grep "Publishing\|Issuing" README.md | sed -e "s/.*: //")
NAME=$(sed -e "2,1000d" -e "s/# //" README.md)
DESC=$(sed -e "1,2d" -e "/## Identifiers/,1000d" -e "/^\s*$/d" -e "/^- /d" -e 's/[][]//g' -e 's/(.*)//g' -e 's/"/\\"/g' README.md)
TYPE="schema"
if [ "$(echo ${PWD} | grep "schema")" == "" ]; then
TYPE="credential"
fi
echo "{ \"org\": \"${ORG}\", \"name\": \"${NAME}\", \"desc\": \"${DESC}\", \"type\": \"${TYPE}\", \"ocabundle\": \"${RELPATH}/${BUNDLE_PATH}\", \"shasum\": \"${SHASUM}\" }," >>${OCALISTJSON}
for id in ${ID}; do
echo " \"${id}\": { \"path\": \"${RELPATH}/${BUNDLE_PATH}\", \"sha256\": \"${SHASUM}\" }," | sed "s/~/ /g" >>${OCAIDSJSON}
echo "{ \"id\": \"${id}\", \"org\": \"${ORG}\", \"name\": \"${NAME}\", \"desc\": \"${DESC}\", \"type\": \"${TYPE}\", \"ocabundle\": \"${RELPATH}/${BUNDLE_PATH}\", \"shasum\": \"${SHASUM}\" }," >>${OCALISTJSON}
done
}

# Recursively process the folders
Expand Down

0 comments on commit cfe82f9

Please sign in to comment.