{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 2
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "headline": {
                "type": "string"
              },
              "impactRating": {
                "type": "integer",
                "minimum": 1,
                "maximum": 5
              },
              "dummies": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string"
                  },
                  "impact": {
                    "type": "string"
                  },
                  "whyItMatters": {
                    "type": "string"
                  }
                },
                "required": [
                  "summary",
                  "impact",
                  "whyItMatters"
                ],
                "additionalProperties": false
              },
              "wonks": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string"
                  },
                  "impact": {
                    "type": "string"
                  },
                  "whyItMatters": {
                    "type": "string"
                  }
                },
                "required": [
                  "summary",
                  "impact",
                  "whyItMatters"
                ],
                "additionalProperties": false
              },
              "detail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "analysis": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "editorialStatus": {
                "type": "string"
              },
              "originalDate": {
                "type": "string"
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "icon": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "url"
                  ],
                  "additionalProperties": false
                }
              },
              "thumbnail": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "credit": {
                        "type": "string"
                      },
                      "sourceUrl": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "url",
                      "alt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dummiesThumbnail": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "credit": {
                        "type": "string"
                      },
                      "sourceUrl": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "url",
                      "alt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "diagram": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "credit": {
                        "type": "string"
                      },
                      "sourceUrl": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "url",
                      "alt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "notices": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "const": "copyright"
                        },
                        "subjectId": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "owner": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "provenance": {
                          "type": "string",
                          "enum": [
                            "supplied",
                            "editor",
                            "fallback"
                          ]
                        },
                        "verification": {
                          "type": "string",
                          "enum": [
                            "verified",
                            "unverified"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "subjectId",
                        "text",
                        "owner",
                        "provenance",
                        "verification"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "const": "trademark"
                        },
                        "subjectId": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "owner": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "provenance": {
                          "type": "string",
                          "enum": [
                            "supplied",
                            "editor",
                            "fallback"
                          ]
                        },
                        "verification": {
                          "type": "string",
                          "enum": [
                            "verified",
                            "unverified"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "subjectId",
                        "text",
                        "owner",
                        "provenance",
                        "verification"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "publicationState": {
                "type": "string",
                "enum": [
                  "draft",
                  "published"
                ]
              },
              "publishedAt": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "headline",
              "dummies",
              "wonks",
              "detail",
              "analysis",
              "editorialStatus",
              "originalDate",
              "categories",
              "sources",
              "thumbnail",
              "diagram",
              "notices",
              "publicationState",
              "publishedAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "schemaVersion",
        "items"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 2
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,119}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "parentId": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,119}$"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "schemaVersion",
        "categories"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "number",
          "const": 2
        },
        "item": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "headline": {
              "type": "string"
            },
            "impactRating": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "dummies": {
              "type": "object",
              "properties": {
                "summary": {
                  "type": "string"
                },
                "impact": {
                  "type": "string"
                },
                "whyItMatters": {
                  "type": "string"
                }
              },
              "required": [
                "summary",
                "impact",
                "whyItMatters"
              ],
              "additionalProperties": false
            },
            "wonks": {
              "type": "object",
              "properties": {
                "summary": {
                  "type": "string"
                },
                "impact": {
                  "type": "string"
                },
                "whyItMatters": {
                  "type": "string"
                }
              },
              "required": [
                "summary",
                "impact",
                "whyItMatters"
              ],
              "additionalProperties": false
            },
            "detail": {
              "type": [
                "string",
                "null"
              ]
            },
            "analysis": {
              "type": [
                "string",
                "null"
              ]
            },
            "editorialStatus": {
              "type": "string"
            },
            "originalDate": {
              "type": "string"
            },
            "categories": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "icon": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "thumbnail": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "alt": {
                      "type": "string"
                    },
                    "credit": {
                      "type": "string"
                    },
                    "sourceUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "alt"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "dummiesThumbnail": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "alt": {
                      "type": "string"
                    },
                    "credit": {
                      "type": "string"
                    },
                    "sourceUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "alt"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "diagram": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "alt": {
                      "type": "string"
                    },
                    "credit": {
                      "type": "string"
                    },
                    "sourceUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "alt"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "notices": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "const": "copyright"
                      },
                      "subjectId": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "owner": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "provenance": {
                        "type": "string",
                        "enum": [
                          "supplied",
                          "editor",
                          "fallback"
                        ]
                      },
                      "verification": {
                        "type": "string",
                        "enum": [
                          "verified",
                          "unverified"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "subjectId",
                      "text",
                      "owner",
                      "provenance",
                      "verification"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "const": "trademark"
                      },
                      "subjectId": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      },
                      "owner": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "provenance": {
                        "type": "string",
                        "enum": [
                          "supplied",
                          "editor",
                          "fallback"
                        ]
                      },
                      "verification": {
                        "type": "string",
                        "enum": [
                          "verified",
                          "unverified"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "subjectId",
                      "text",
                      "owner",
                      "provenance",
                      "verification"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "publicationState": {
              "type": "string",
              "enum": [
                "draft",
                "published"
              ]
            },
            "publishedAt": {
              "type": [
                "string",
                "null"
              ]
            },
            "updatedAt": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "headline",
            "dummies",
            "wonks",
            "detail",
            "analysis",
            "editorialStatus",
            "originalDate",
            "categories",
            "sources",
            "thumbnail",
            "diagram",
            "notices",
            "publicationState",
            "publishedAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "schemaVersion",
        "item"
      ],
      "additionalProperties": false
    }
  ]
}
