Skip to content

Commit

Permalink
fix: allow validation
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
cre8 committed Apr 21, 2024
1 parent c47aba0 commit d16dcf1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ jobs:

- name: Install dependencies
run: cd viewer && npm ci

#TODO: we are not validating the schemas of the data files yet.
# - name: Validate
# run: cd viewer && npm run validate

- name: Validate
run: cd viewer && npm run validate

build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion viewer/scripts/validate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ajv = new Ajv({allowUnionTypes: true});
addFormats(ajv);
const profileSIGSchema = await axios.get('https://openwallet-foundation.github.io/credential-format-comparison-sig/assets/schemas/fields.json').then(res => res.data);
ajv.addSchema(profileSIGSchema, "https://openwallet-foundation.github.io/credential-format-comparison-sig/assets/schemas/fields.json");
const validate = ajv.compile(JSON.parse(readFileSync('../schema.json')));
const validate = ajv.compile(JSON.parse(readFileSync('src/assets/schema.json')));
const files = readdirSync('../wallets');
let success = true;
files.map(file => {
Expand Down
2 changes: 1 addition & 1 deletion viewer/src/app/wallets-add/wallets-add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class WalletsAddComponent implements OnInit {

getJSON() {
return JSON.stringify(
{ ...this.form.value, $schema: '../schema.json' },
{ ...this.form.value, $schema: '../viewer/src/assets/schema.json' },
null,
2
);
Expand Down
1 change: 1 addition & 0 deletions wallets/Altme.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"capability": ["holder"],
"company": "Talao",
"contact": "[email protected]",
"urlWebsite": "https://altme.io/",
"credentialProfiles": ["EBSI"],
"downloadSource": "https://github.com/TalaoDAO/AltMe",
"license": "Apache 2.0",
Expand Down
7 changes: 3 additions & 4 deletions wallets/hightrust.id.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"name": "hightrust.id",
"logo": "https://raw.githubusercontent.com/megical/hightrust.id-assets/main/AppIcons/hitid-app-icon-1024.png",
"company": "Megical Oy",
"CompanyUrl": "https://www.hightrust.id",
"urlWebsite": "https://www.hightrust.id",
"type": "edge",
"openSource": false,
"license": "Commercial software license",
"capability": [],
"portability": null,
"linkToApp": "",
"portability": false,
"credentialProfiles": [],
"credentialFormats": [],
"issuanceProtocols": [],
Expand All @@ -17,5 +16,5 @@
"signingAlgorithms": [],
"statusManagements": [],
"trustManagements": [],
"$schema": "../schema.json"
"$schema": "../viewer/src/assets/schema.json"
}

0 comments on commit d16dcf1

Please sign in to comment.