{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/open-education-api/json-schema/open-education-api-news-feed-schema.json",
  "title": "NewsFeed",
  "description": "A placeholder or collection of news items",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/open-education-api-news-api-openapi.yml#/components/schemas/NewsFeed",
  "type": "object",
  "required": [
    "newsFeedId",
    "newsFeedType",
    "name",
    "description"
  ],
  "properties": {
    "newsFeedId": {
      "type": "string",
      "description": "Unique id for this news feed",
      "format": "uuid"
    },
    "newsFeedType": {
      "type": "string",
      "description": "The type of the object this news feed relates to",
      "enum": [
        "organization",
        "program",
        "course",
        "component",
        "person",
        "building",
        "room"
      ]
    },
    "name": {
      "type": "array",
      "description": "The name for this news feed",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/LanguageTypedString"
      }
    },
    "description": {
      "type": "array",
      "description": "The description of this news feed.",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/LanguageTypedString"
      }
    },
    "consumers": {
      "description": "The additional consumer elements that can be provided, see the [documentation on support for specific consumers](https://openonderwijsapi.nl/v5/#/technical/consumers-and-profiles/) for more information about this mechanism.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Consumer"
      }
    },
    "ext": {
      "$ref": "#/$defs/Ext"
    }
  },
  "$defs": {
    "Consumer": {
      "type": "object",
      "description": "Object for communicating data to a specific consumer (destination). This object has no relationship with the `consumer` query parameter.",
      "required": [
        "consumerKey"
      ],
      "properties": {
        "consumerKey": {
          "description": "The key of the consumer (destination) for which this information is intended. See the [consumer registry](https://openonderwijsapi.nl/v5/#/technical/consumers-and-profiles/) for more information.",
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "Ext": {
      "type": "object",
      "description": "Object for additional non-standard attributes"
    },
    "LanguageTypedString": {
      "type": "object",
      "description": "A String with an associated language code.",
      "properties": {
        "language": {
          "description": "The language used in the described entity. A string formatted according to RFC3066.",
          "type": "string",
          "pattern": "^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$"
        },
        "value": {
          "description": "String to describe the entity.",
          "type": "string"
        }
      }
    }
  }
}