{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://schema.mydesignsystem.com/event-latest.schema.json",
  "title": "Event Latest",
  "description": "Display a list of latest events, ordered chronologically",
  "type": "object",
  "properties": {
    "events": {
      "title": "Events",
      "description": "List of events to display",
      "type": "array",
      "items": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "$id": "http://schema.mydesignsystem.com/event-latest-teaser.schema.json",
        "title": "Event Latest Teaser",
        "description": "Display an event teaser with date, title and location",
        "type": "object",
        "properties": {
          "date": {
            "title": "Date",
            "description": "The date of the event",
            "type": "string",
            "format": "date",
            "examples": [
              "12.30.2022"
            ]
          },
          "calendar": {
            "type": "object",
            "title": "Calendar",
            "description": "Calendar icon to display the date",
            "properties": {
              "month": {
                "title": "Month",
                "description": "The month of the event",
                "type": "string",
                "examples": [
                  "Dec"
                ]
              },
              "day": {
                "title": "Day",
                "description": "The day of the event",
                "type": "string",
                "examples": [
                  "30"
                ]
              }
            },
            "additionalProperties": false
          },
          "title": {
            "title": "Headline",
            "description": "Title of the event",
            "type": "string",
            "format": "markdown",
            "examples": [
              "This is a event teaser title"
            ]
          },
          "location": {
            "title": "Location",
            "description": "Location of the event",
            "type": "string",
            "format": "markdown",
            "examples": [
              "This is a location"
            ]
          },
          "url": {
            "title": "URL",
            "description": "The event entry URL to link",
            "type": "string",
            "format": "uri",
            "examples": [
              "https://example.com"
            ]
          },
          "cta": {
            "title": "Call to Action",
            "description": "Text for the call to action",
            "type": "string",
            "examples": [
              "Show event"
            ]
          },
          "ariaLabel": {
            "title": "ARIA Label",
            "description": "ARIA label for accessibility",
            "type": "string",
            "examples": [
              "Event teaser for "
            ]
          },
          "className": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "title",
          "date",
          "location"
        ]
      },
      "minItems": 1,
      "examples": [
        [
          {
            "date": "12/30/2022",
            "headline": "Event 1",
            "location": "Location 1",
            "link": {
              "url": "https://example.com/event1",
              "text": "Show event 1"
            }
          },
          {
            "date": "01/15/2023",
            "headline": "Event 2",
            "location": "Location 2",
            "link": {
              "url": "https://example.com/event2",
              "text": "Show event 2"
            }
          }
        ]
      ]
    },
    "className": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "required": []
}