Debian Codegraph @

etc/json/behave.json-schema

raw
1 {
2 "$schema": "http://json-schema.org/draft-04/schema#",
3 "title": "behave JSON schema",
4 "description": "behave schema for JSON formatter output",
5 "type": "array",
6 "items": {
7 "$ref": "#/definitions/Feature"
8 },
9 "definitions": {
10 "Feature": {
11 "type": "object",
12 "description": "Represents a Feature object.",
13 "properties": {
14 "name": { "type": "string" },
15 "keyword": { "type": "string" },
16 "location": { "type": "string" },
17 "status": { "type": "string" },
18 "tags": { "$ref": "#/definitions/Tags" },
19 "description": { "$ref": "#/definitions/MultiLineText" },
20 "elements": {
21 "type": "array",
22 "items": { "$ref": "#/definitions/FeatureElement" }
23 }
24 },
25 "required": [ "name", "keyword", "location" ]
26 },
27 "FeatureElement": {
28 "type": "object",
29 "anyOf": [
30 { "$ref": "#/definitions/Background" },
31 { "$ref": "#/definitions/Scenario" },
32 { "$ref": "#/definitions/ScenarioOutline" }
33 ]
34 },
35 "Background": {
36 "type": "object",
37 "properties": {
38 "type": { "enum": [ "background" ] },
39 "name": { "type": "string" },
40 "keyword": { "type": "string" },
41 "location": { "type": "string" },
42 "steps": {
43 "type": "array",
44 "items": { "$ref": "#/definitions/Step" }
45 }
46 },
47 "required": [ "name", "keyword", "location", "steps" ]
48 },
49 "Scenario": {
50 "type": "object",
51 "properties": {
52 "type": { "enum": [ "scenario" ] },
53 "name": { "type": "string" },
54 "keyword": { "type": "string" },
55 "location": { "type": "string" },
56 "tags": { "$ref": "#/definitions/Tags" },
57 "description": { "$ref": "#/definitions/MultiLineText" },
58 "status": { "type": "string" },
59 "steps": {
60 "type": "array",
61 "items": { "$ref": "#/definitions/Step" }
62 }
63 },
64 "required": [ "name", "keyword", "location", "steps" ]
65 },
66 "ScenarioOutline": {
67 "type": "object",
68 "properties": {
69 "type": { "enum": [ "scenario_outline" ] },
70 "name": { "type": "string" },
71 "keyword": { "type": "string" },
72 "location": { "type": "string" },
73 "tags": { "$ref": "#/definitions/Tags" },
74 "description": { "$ref": "#/definitions/MultiLineText" },
75 "status": { "type": "string" },
76 "steps": {
77 "type": "array",
78 "items": { "$ref": "#/definitions/Step" }
79 },
80 "examples": {
81 "type": "array",
82 "items": { "$ref": "#/definitions/Examples" }
83 }
84 },
85 "required": [ "name", "keyword", "location", "steps", "examples" ]
86 },
87 "Examples": {
88 "type": "object",
89 "description": "@wip: Must be defined."
90 },
91 "Step": {
92 "properties": {
93 "name": { "type": "string" },
94 "keyword": { "type": "string" },
95 "step_type":{ "type": "string" },
96 "location": { "type": "string" },
97 "text": { "$ref": "#/definitions/MultiLineText" },
98 "table": { "$ref": "#/definitions/Table" },
99 "match": { "$ref": "#/definitions/Match" },
100 "result": { "$ref": "#/definitions/TestResult" }
101 },
102 "required": [ "name", "keyword", "step_type", "location" ]
103 },
104 "MultiLineText": {
105 "anyOf": [
106 { "type": "string" },
107 { "type": "array", "items": { "type": "string" }}
108 ],
109 "description": "Type used for multi-line text in steps."
110 },
111 "Text": {
112 "type": "string",
113 "description": "Type used for multi-line text in steps."
114 },
115 "Table": {
116 "type": "object",
117 "description": "@wip: Must be defined."
118 },
119 "TestResult": {
120 "type": "object",
121 "properties": {
122 "status": {
123 "type": "string",
124 "description": "Enum: untested, undefined, skipped, passed, failed"
125 },
126 "duration": {
127 "type": "number",
128 "description": "Duration in seconds (as float)"
129 },
130 "error_message": { "$ref": "#/definitions/MultiLineText" }
131 },
132 "required": [ "status", "duration" ]
133 },
134 "MatchArgument": {
135 "type": "object",
136 "properties": {
137 "name": { "type": "string" },
138 "original": { "type": "string" },
139 "value": {
140 "anyOf": [
141 { "type": "string" },
142 { "type": "integer" },
143 { "type": "number" },
144 { "type": "boolean" },
145 { "type": "object" },
146 { "type": "array" },
147 { "type": "null" }
148 ]
149 }
150 },
151 "required": [ "value" ]
152 },
153 "Match": {
154 "type": "object",
155 "description": "Step definition (implementation), associated to a step.",
156 "properties": {
157 "location": { "type": "string" },
158 "arguments": {
159 "type": "array",
160 "items": { "$ref": "#/definitions/MatchArgument" }
161 }
162 }
163 },
164 "Tags": {
165 "type": "array",
166 "items": { "type": "string" }
167 },
168 "SimpleTypes": {
169 "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
170 }
171 }
172 }