Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
generate enum of the values in the asset folder (#103)
Browse files Browse the repository at this point in the history
* generate enum of the values in the asset folder

Signed-off-by: Mirko <mirkomollik@gmail.com>

* fix locale

Signed-off-by: Mirko <mirkomollik@gmail.com>

* fix: validation script

Signed-off-by: Mirko <mirkomollik@gmail.com>

* add schema job to validate job

Signed-off-by: Mirko <mirkomollik@gmail.com>

* set unique fields

Signed-off-by: Mirko <mirkomollik@gmail.com>

---------

Signed-off-by: Mirko <mirkomollik@gmail.com>
  • Loading branch information
cre8 authored Feb 12, 2024
1 parent d6cf410 commit 4bdc1f4
Show file tree
Hide file tree
Showing 22 changed files with 151 additions and 159 deletions.
10 changes: 9 additions & 1 deletion data/Credential-Format/JWT.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@
"Selective Disclosure": false,
"Predicates": false,
"Compatibility with Signing Algorithms": "ECDSA, EdDSA, RSA",
"Compatibility with Key Management Methods (Issuer)": "did:key, did:web. did:ebsi, did:iota, did:jwk, did:cheqd, did:velocity"
"Compatibility with Key Management Methods (Issuer)": [
"did:key",
"did:web",
"did:ebsi",
"did:iota",
"did:jwk",
"did:cheqd",
"did:velocity"
]
}
10 changes: 9 additions & 1 deletion data/Credential-Format/LDP-VC.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,13 @@
"Description": "depending on signature algorithm"
},
"Compatibility with Signing Algorithms": "ECDSA, EdDSA, RSA",
"Compatibility with Key Management Methods (Issuer)": "did:key, did:web. did:ebsi, did:iota, did:jwk, did:cheqd, did:velocity"
"Compatibility with Key Management Methods (Issuer)": [
"did:key",
"did:web",
"did:ebsi",
"did:iota",
"did:jwk",
"did:cheqd",
"did:velocity"
]
}
10 changes: 9 additions & 1 deletion data/Credential-Format/SD-JWT-VC.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,13 @@
"Selective Disclosure": true,
"Predicates": false,
"Compatibility with Signing Algorithms": "ECDSA, EdDSA, RSA",
"Compatibility with Key Management Methods (Issuer)": "did:key, did:web. did:ebsi, did:iota, did:jwk, did:cheqd, did:velocity"
"Compatibility with Key Management Methods (Issuer)": [
"did:key",
"did:web",
"did:ebsi",
"did:iota",
"did:jwk",
"did:cheqd",
"did:velocity"
]
}
2 changes: 1 addition & 1 deletion data/Credential-Format/VC-(1.1).json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"Selective Disclosure": true,
"Predicates": false,
"Compatibility with Signing Algorithms": "ECDSA, EdDSA, RSA",
"Compatibility with Key Management Methods (Issuer)": "x509, did methods"
"Compatibility with Key Management Methods (Issuer)": ["x509", "did methods"]
}
2 changes: 1 addition & 1 deletion schemas/Credential-Format.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Credential-Format.json",
"$id": "Credential-Format.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
171 changes: 59 additions & 112 deletions schemas/Credential-Profile.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Credential-Profile.json",
"$id": "Credential-Profile.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -16,136 +16,83 @@
"description": "A brief description of the credential profile"
},
"Credential Format": {
"type": "string",
"description": "The used credential format",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": [
"ACDC (KERI)",
"AnonCred",
"CESR/CESR Proof",
"CWT",
"Gordian Envelope",
"ICAO DTC",
"Idemix attribute-based credential",
"JWP",
"JWT-VC",
"JWT",
"LDP-VC",
"MDOC",
"SD-JWT-VC",
"SD-JWT",
"VC (1.1)",
"x509"
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Credential-Format"
},
{
"description": "The format of the credential."
}
]
},
"Signing Algorithm": {
"type": "string",
"description": "The format of the signing algorithm.",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": [
"BBS+ with public key binding",
"BoundBBS+",
"CL",
"ECDSA",
"EdDSA",
"RSA",
"Schnorr"
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Signing-Algorithm"
},
{
"description": "The format of the signing algorithm."
}
]
},
"Status Algorithm": {
"type": "string",
"description": "The format of the status algorithm.",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": [
"BBF18-cryptographic accumulator based on RSA",
"CRL - certificate revocation list",
"Indy Revocation",
"JWT/CWT status list",
"Non-Revocation Token",
"RSA-B - cryptographic accumulator based on RSA",
"SLTD database (travel and identity documents)",
"Status List 2021",
"VB20 - cryptographic accumulator based on pairings",
"Validity Credential",
"medium-term expiration",
"short-term expiration"
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Status-Algorithm"
},
{
"description": "The format of the status algorithm."
}
]
},
"Key Management (Issuer)": {
"type": "string",
"description": "The format of the key management.",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": [
".well-known/jwt-issuer",
"cose key",
"credential as secret",
"did:cheqd",
"did:ebsi",
"did:indy",
"did:ion (long form)",
"did:ion (short form)",
"did:jwk",
"did:keri",
"did:key",
"did:peer",
"did:web",
"jwks_uri",
"link secrets",
"pub key in X.509 cert",
"raw public keys (jwk)",
"raw public keys (none jwk)"
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Key-Management"
},
{
"description": "The format of the key management for the issuer."
}
]
},
"Key Management (Holder)": {
"type": "string",
"description": "The format of the key management.",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": [
".well-known/jwt-issuer",
"cose key",
"credential as secret",
"did:cheqd",
"did:ebsi",
"did:indy",
"did:ion (long form)",
"did:ion (short form)",
"did:jwk",
"did:keri",
"did:key",
"did:peer",
"did:web",
"jwks_uri",
"link secrets",
"pub key in X.509 cert",
"raw public keys (jwk)",
"raw public keys (none jwk)"
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Key-Management"
},
{
"description": "The format of the key management for the holder."
}
]
},
"Issuance Protocol": {
"type": "string",
"description": "The format of the issuance protocol.",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": ["ACDC", "ISO 23220-3", "Issue Credential v2", "OpenID4VCI"]
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Issuance-Protocol"
},
{
"description": "The format of issuance protocol."
}
]
},
"Presentation Protocol": {
"type": "string",
"description": "The format of the presentation protocol.",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": ["OpenID4VP"]
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Presentation-Protocol"
},
{
"description": "The format of the presentation protocol."
}
]
},
"Trust Management": {
"type": "string",
"description": "The format of the trust management.",
"$comment": "The value should be one of the enum list, that can be updated by running \"npm run schema\" inside the viewer folder",
"enum": [
"EBSI Trust Registries",
"IRMA (Yivi) Schemes",
"OpenID Connect Federation",
"TRAIN",
"Trusted Lists",
"Verified issuer certificate authority list (VICAL)",
"Verifier knows Issuers",
"X.509 certificates"
"allOf": [
{
"$ref": "../viewer/src/assets/schemas/fields.json#/definitions/Trust-Management"
},
{
"description": "The format of the trust management."
}
]
},
"Formal Specification": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/Issuance-Protocol.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Issuance-Protocol.json",
"$id": "Issuance-Protocol.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/Key-Management.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Key-Management.json",
"$id": "Key-Management.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions schemas/Presentation-Protocol.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Presentation-Protocol.json",
"$id": "Presentation-Protocol.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -15,6 +15,6 @@
"$ref": "defs.json#/definitions/Specification"
}
},
"required": ["$schema", "Presentation Protocol"],
"required": ["$schema", "Name"],
"title": "PresentationProtocol"
}
2 changes: 1 addition & 1 deletion schemas/Signing-Algorithm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Signing-Algorithm.json",
"$id": "Signing-Algorithm.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/Status-Algorithm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Status-Algorithm.json",
"$id": "Status-Algorithm.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/Trust-Management.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/Trust-Management.json",
"$id": "Trust-Management.json",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions schemas/defs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/openwallet-foundation/credential-format-comparison-sig/main/schemas/defs.json",
"type": ["object"],
"$id": "defs.json",
"type": "object",
"definitions": {
"Schema": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion viewer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/out-tsc
/bazel-out
structure.json

src/assets/schemas/*.json
# Node
/node_modules
npm-debug.log
Expand Down
4 changes: 2 additions & 2 deletions viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"prestart": "npm run merge",
"prestart": "npm run merge && npm run schema",
"start": "ng serve",
"prebuild": "npm run merge && npm run timestamp",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"merge": "node tools/merge.mjs",
"validate": "node tools/validate.mjs",
"validate": "npm run schema && node tools/validate.mjs",
"validate:watch": "nodemon --watch ../data tools/validate.mjs",
"schema": "node tools/schema.mjs",
"lint": "ng lint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class CredentialProfileListComponent implements OnInit, AfterViewInit {
}

isSticky(column: ColumnHeader) {
return column.key === 'Credential Profile is commonly called';
return column.key === 'Name';
}

hasLink(value: string, header: string) {
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion viewer/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const environment = {
buildTime: '2024-01-23T10:58:02.535Z',
buildTime: '2024-02-11T15:33:07.572Z',
};
Loading

0 comments on commit 4bdc1f4

Please sign in to comment.