---

#
# JSON Schema definition for `tmt` execute plugin
#
# https://tmt.readthedocs.io/en/stable/spec/plans.html#tmt
#

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

type: object
additionalProperties: false

properties:

  how:
    type: string
    enum:
      - tmt

  # https://tmt.readthedocs.io/en/stable/spec/plans.html#exit-first
  exit-first:
    type: boolean

  ignore-duration:
    type: boolean

  # name attribute can exist if more methods
  name:
    type: string

  restraint-compatible:
    type: boolean

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

  where:
    $ref: "/schemas/common#/definitions/where"

  duration:
    $ref: "/schemas/common#/definitions/duration"

required:
  - how
