{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openconsultant.io/schemas/v0.1/manifest.schema.json",
  "title": "OpenConsultant entry file",
  "description": "The entry file a consulting company serves at /openconsultant.json on its own domain. It identifies the publisher and lists the published consultant profiles. Draft specification 0.1.",
  "type": "object",
  "required": [
    "standard",
    "schemaVersion",
    "publisher",
    "updatedAt",
    "consultants"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri",
      "description": "URL of the schema this document follows."
    },
    "standard": {
      "const": "OpenConsultant",
      "description": "Name of the standard."
    },
    "schemaVersion": {
      "type": "string",
      "pattern": "^0\\.1\\.(0|[1-9][0-9]*)$",
      "description": "Version of OpenConsultant the entry file follows, for example \"0.1.0\"."
    },
    "publisher": {
      "type": "object",
      "description": "The consulting company that publishes the profiles on this domain.",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Name of the organisation."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The organisation's website."
        }
      }
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the entry file or any listed profile last changed."
    },
    "consultants": {
      "type": "array",
      "description": "One entry per published profile. An empty list is valid.",
      "items": {
        "type": "object",
        "required": [
          "id",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The profile's stable identifier, identical to `openconsultant.id` in the profile."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The profile's source address, identical to `openconsultant.canonicalUrl` in the profile."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the profile last changed. Lets clients skip profiles they already have."
          },
          "htmlUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL of the human readable profile page."
          }
        }
      }
    }
  }
}
