---

#
# JSON Schema definition for tmt `Stories`
#
# https://tmt.readthedocs.io/en/stable/spec/stories.html
#

$id: /schemas/story
$schema: https://json-schema.org/draft-07/schema

type: object
additionalProperties: false

properties:

  # https://tmt.readthedocs.io/en/stable/spec/core.html#adjust
  adjust:
    $ref: "/schemas/core#/definitions/adjust"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#author
  author:
    $ref: "/schemas/core#/definitions/author"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#contact
  contact:
    $ref: "/schemas/core#/definitions/contact"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#description
  description:
    $ref: "/schemas/core#/definitions/description"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#enabled
  enabled:
    $ref: "/schemas/core#/definitions/enabled"

  # https://tmt.readthedocs.io/en/stable/spec/stories.html#example
  example:
    $ref: "/schemas/common#/definitions/one_or_more_strings"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#id
  id:
    $ref: "/schemas/core#/definitions/id"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#link
  link:
    $ref: "/schemas/core#/definitions/link"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#order
  order:
    $ref: "/schemas/core#/definitions/order"

  # https://tmt.readthedocs.io/en/stable/spec/stories.html#priority
  priority:
    type: string
    enum:
      - must have
      - could have
      - should have
      - will not have

  # https://tmt.readthedocs.io/en/stable/spec/stories.html#story
  story:
    type: string

  # https://tmt.readthedocs.io/en/stable/spec/core.html#summary
  summary:
    $ref: "/schemas/core#/definitions/summary"

  # https://tmt.readthedocs.io/en/stable/spec/core.html#tag
  tag:
    $ref: "/schemas/core#/definitions/tag"

  # https://tmt.readthedocs.io/en/stable/spec/stories.html#title
  title:
    type: string

  # https://tmt.readthedocs.io/en/stable/spec/core.html#tier
  tier:
    $ref: "/schemas/core#/definitions/tier"

# User-defined metadata
patternProperties:
  ^extra-: {}

required:
  - story
