the-human-colossus-foundation / oca-spec

Overlay Capture Architecture Specification
European Union Public License 1.2
8 stars 7 forks source link

Improvements for Categories #19

Open mitfik opened 1 year ago

mitfik commented 1 year ago

Currently we have category attributes which are part of label overlay:

  1. Classification of the attributes according to categories seems to be out of scope of the label overlay, what is the purpose of classification?
  2. Should we remove the classification (assignment of attribute to each category) and keep only category labels?
  3. Identifiers of categories are redundant with the hash of labels
  4. Should we allow to have nesting categories?
carlyh-micb commented 10 months ago

For reference in discussion, I had to look up category in labels. From the spec:

Label Overlay

[language-specific object]

A Label Overlay defines attribute and category labels. For example, for an attribute named dateOfBirth, you may wish to display the label as Date of birth, which is more meaningful and user-friendly when displayed to an end user in places such as form inputs and error messages.

In addition to the capture_base, type, and language attributes (see Common attributes), the Label Overlay MUST include the following attribute:

attribute_labels

The attribute_labels attribute maps key-value pairs where the key is the attribute name and the value is a human-meaningful attribute label in a specific language.

and MAY include the following attributes:

attribute_categories

The attribute_categories attribute contains category identifiers.

category_labels 

The attribute_categories attribute maps key-value pairs where the key is the attribute name and the value is a human-meaningful category label in a specific language.

{ "capture_base":"EVyoqPYxoPiZOneM84MN-7D0oOR03vCr5gg1hf3pxnis", "type":"spec/overlays/label/1.0", "language":"en", "attribute_labels":{ "dateOfBirth":"Date of birth", "documentNumber":"Passport Number", "documentType":"Document", "fullName":"Name", "height":"Height", "issuingState":"Issuing State or organization (in full)", "photoImage":"Portrait image", "sex":"Sex" }, "attribute_categories":[ "cat-1", "cat-2", "cat-3", "cat-4" ], "category_labels":{ "cat-1":"Mandatory header", "cat-2":"Mandatory personal data elements", "cat-3":"Mandatory identification feature", "cat-4":"Optional data elements" } }

mitfik commented 1 month ago

Related: #39