diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java index b2c3494..37c917b 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java @@ -93,6 +93,11 @@ public class CredentialSubjectProbe extends Probe { } } } + // criteria must have id or narrative + JsonNode criteria = achievement.get("criteria"); + if (!criteria.has("id") && !criteria.has("narrative")) { + return error("criteria in achievement of credentialSubject must have id or narrative", ctx); + } } else if (achivementRequired) { return error("missing required achievement in credentialSubject", ctx); }