Skip to main content

Certificates

A certificate is an entity that extends an existing template by specifying the values for or hiding certain individual fields.

It comprises on the following properties:

  • The template it extends.
  • A title for the certificate.
  • Values for all mandatory and chosen optional fields.
  • Whether or not some field(s) should be hidden.

A certificate is exactly what is supposed to be served to the end-user by Rema.

Certificate Schema​

Just like templates, certificates exist as a JSON-compliant documents in the database. Assuming them to be JavaScript objects, below is a detailed description of the valid properties available in any certificate.

Properties:

  • uid
  • title
  • template
  • values
  • date

uid​

TypeString (UUID v4)
RequiredCannot be set, always generated
DescriptionThe unique identifier for each certificate.
DefaultA unique generated identifier.

title​

TypeString
RequiredNo
DescriptionThe title of the certificate.
DefaultCertificate

template​

TypeString
RequiredYes
DescriptionThe name of the corresponding template.

values​

TypeAn array of values
RequiredYes, at least an empty array
DescriptionA list of all values. See value schema for details.

date​

TypeDate
RequiredCannot be set, always generated
DescriptionThe date the certificate was created.
DefaultThe date the certificate was created as an ISO string.

Value Schema​

Values are individual entries corresponding to the respective fields in the parent template.

  • Required (required: true) fields without a value or a default value (defaultValue) defined within the template must be provided in the certificate values.
  • Fields whose values are provided with visible: false are not rendered in the final certificate.

Properties:

  • name
  • value
  • visible

name​

TypeString
RequiredYes
DescriptionThe unique identifier for the corresponding field in the certificate's parent template.

value​

TypeDepends on the type or the corresponding field
RequiredDepends, see value schema
DescriptionA value for the corresponding field.
DefaultDepends on the default value or value of the corresponding field, could be empty

visible​

TypeBoolean
RequiredNo
DescriptionIf false, the corresponding field won't be rendered.
Defaulttrue