-
Notifications
You must be signed in to change notification settings - Fork 11
/
schema.yaml
67 lines (67 loc) · 1.26 KB
/
schema.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
$schema: http://json-schema.org/draft-04/schema#
title: pat - Prometheus Alert Testing utility
type: object
properties:
name:
type: string
rules:
$ref: "#/definitions/Rules"
fixtures:
type: array
items:
$ref: "#/definitions/Fixture"
assertions:
type: array
items:
$ref: "#/definitions/Assertion"
required:
- name
- rules
- assertions
additionalProperties: false
definitions:
Rules:
type: object
oneOf:
- properties:
fromFile:
type: string
required:
- fromFile
- properties:
fromLiteral:
type: string
required:
- fromLiteral
Fixture:
type: object
properties:
duration:
$ref: "#/definitions/Duration"
metrics:
type: array
items:
type: string
required:
- duration
- metrics
Assertion:
type: object
properties:
at:
$ref: "#/definitions/Duration"
expected:
type: array
items:
$ref: "#/definitions/Expectation"
comment:
type: string
required:
- at
- expected
additionalProperties: false
Duration:
type: string
pattern: "^\\d+(ns|us|ms|s|m|h)$"
Expectation:
type: object