JSON Schema

Purpose

Purpose declaration object with free-form identifier and readable label.

Properties

idstringrequired
minLength: 1
namestringrequired
minLength: 1
legalBasisstring
consent | legitimate_interest
descriptionstring
additionalIDsRecord<string, string>
key minLength: 1

Raw Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://navigator-consent.spec/schemas/purpose.schema.json",
  "title": "Purpose",
  "description": "Purpose declaration object with free-form identifier and readable label.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "legalBasis": {
      "type": "string",
      "enum": [
        "consent",
        "legitimate_interest"
      ]
    },
    "description": {
      "type": "string"
    },
    "additionalIDs": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1
      },
      "additionalProperties": {
        "type": "string",
        "minLength": 1
      }
    }
  }
}