Skip to content

Agent

Dereferenced schema · Source · Referenced version

An organization or person that publishes documents or contributes to records.

Fields

Field Type Required Description
id string matching ^agent:(org|user):[a-z0-9]+$ yes
type always Agent yes
agentType one of organization, contributor yes
name string yes
description string yes
extensions array of extensions (see Extensions)

Extensions

Each extension is an object with a name, a value, and an optional description (see Extension).

Name Value Required
last_updated string
url string

JSON Schema

Full JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://moalmanac.org/schemas/dereferenced/agents.schema.json",
  "title": "Agent",
  "description": "An organization or person that publishes documents or contributes to records.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^agent:(org|user):[a-z0-9]+$"
    },
    "type": {
      "const": "Agent"
    },
    "agentType": {
      "enum": [
        "organization",
        "contributor"
      ]
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "extensions": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "extension.schema.json",
            "properties": {
              "name": {
                "const": "last_updated"
              },
              "value": {
                "type": "string"
              }
            }
          },
          {
            "$ref": "extension.schema.json",
            "properties": {
              "name": {
                "const": "url"
              },
              "value": {
                "type": "string"
              }
            }
          }
        ]
      }
    }
  },
  "required": [
    "id",
    "type",
    "agentType",
    "name",
    "description"
  ],
  "additionalProperties": false
}