$schema: "https://json-schema.org/draft/2020-12/schema"
type: object
required:
  - frontmatter
  - body
  - headings
  - links
  - body_dates
properties:
  frontmatter:
    type: object
    required:
      - source
      - captured
      - capture
      - type
      - genre
    properties:
      source:
        type: string
        minLength: 1
      description:
        type: string
        minLength: 1
      captured:
        anyOf:
          - format: date
          - format: date-time
      capture:
        type: string
        minLength: 1
      type:
        const: kb/sources/types/snapshot.md
      genre:
        severity: warn
        enum:
          - scientific-paper
          - practitioner-report
          - conceptual-essay
          - design-proposal
          - tool-announcement
          - github-issue
          - conversation-thread
          - code-repository
          - court-opinion
          - news-article
          - official-statement
      tags:
        type: array
        uniqueItems: true
        items:
          type: string
          minLength: 1
      api_url:
        type: string
        minLength: 1
    additionalProperties: true
  body:
    type: string
  headings:
    type: array
    items:
      type: string
  links:
    type: array
    items:
      type: string
  body_dates:
    type: array
    items:
      type: string
      format: date
additionalProperties: false
