1EdTech/openbadges-specification

Schema update for identifier

Closed this issue · 6 comments

It appears that the schema references identifier as an array. Shouldn't it be an object?

"identifier" : {
"type" : "array",
"items" : {
"$ref" : "#/$defs/IdentityObject"
}
}

https://www.imsglobal.org/spec/ob/v3p0#org.1edtech.ob.v3p0.identityobject.class

Identifiers are an attribute of AchievementSubject (https://www.imsglobal.org/spec/ob/v3p0#achievementsubject), with 0 to N cardinality. Thus, it's defined as an array in the schema.

One option is allowing the JSON-LD compacted form (https://www.w3.org/TR/json-ld11-api/#compaction) for this attribute, so, even being an array, it can be expressed as a single object when only contains one element.

@xaviaracil Thanks for explaining! Makes sense.

(comment removed, I misread it as talking about IDs, not identifier object)

Thanks, @dmitrizagidulin - I was so focused on the particular task it didn't register when I was submitting this that we use "identifier" in VCs to refer to IDs (of course). :)

Thank you both,

To be clear, should we go on in supporting array compaction for this attribute or is it ok to continue as it is today and close this issue?

I think we can keep it as is and close.