Skip to content

Commit a94a458

Browse files
committed
Import the simulation json schema into readthedocs reference page
1 parent ac5bbd7 commit a94a458

File tree

1 file changed

+2
-302
lines changed

1 file changed

+2
-302
lines changed

docs/pages/reference/simulationschema.rst

Lines changed: 2 additions & 302 deletions
Original file line numberDiff line numberDiff line change
@@ -5,305 +5,5 @@ Simulation schema
55

66
This is the JSON schema for v5 Hoverfly simulations.
77

8-
.. code:: json
9-
10-
{
11-
"additionalProperties": false,
12-
"definitions": {
13-
"delay": {
14-
"properties": {
15-
"delay": {
16-
"type": "integer"
17-
},
18-
"httpMethod": {
19-
"type": "string"
20-
},
21-
"urlPattern": {
22-
"type": "string"
23-
}
24-
},
25-
"type": "object"
26-
},
27-
"delay-log-normal": {
28-
"properties": {
29-
"httpMethod": {
30-
"type": "string"
31-
},
32-
"max": {
33-
"type": "integer"
34-
},
35-
"mean": {
36-
"type": "integer"
37-
},
38-
"median": {
39-
"type": "integer"
40-
},
41-
"min": {
42-
"type": "integer"
43-
},
44-
"urlPattern": {
45-
"type": "string"
46-
}
47-
},
48-
"type": "object"
49-
},
50-
"field-matchers": {
51-
"properties": {
52-
"matcher": {
53-
"type": "string"
54-
},
55-
"value": {},
56-
"config": {
57-
"properties": {
58-
"ignoreUnknown": {
59-
"type": "boolean"
60-
},
61-
"ignoreOrder": {
62-
"type": "boolean"
63-
},
64-
"ignoreOccurrences": {
65-
"type": "boolean"
66-
}
67-
},
68-
"type": "object"
69-
},
70-
"doMatch": {
71-
"$ref": "#/definitions/field-matchers"
72-
}
73-
},
74-
"type": "object"
75-
},
76-
"headers": {
77-
"additionalProperties": {
78-
"items": {
79-
"type": "string"
80-
},
81-
"type": "array"
82-
},
83-
"type": "object"
84-
},
85-
"literals": {
86-
"properties": {
87-
"name": {
88-
"type": "string"
89-
},
90-
"value": {}
91-
},
92-
"required": ["name", "value"],
93-
"type": "object"
94-
},
95-
"meta": {
96-
"properties": {
97-
"hoverflyVersion": {
98-
"type": "string"
99-
},
100-
"schemaVersion": {
101-
"type": "string"
102-
},
103-
"timeExported": {
104-
"type": "string"
105-
}
106-
},
107-
"required": ["schemaVersion"],
108-
"type": "object"
109-
},
110-
"request": {
111-
"properties": {
112-
"body": {
113-
"items": {
114-
"$ref": "#/definitions/field-matchers"
115-
},
116-
"type": "array"
117-
},
118-
"destination": {
119-
"items": {
120-
"$ref": "#/definitions/field-matchers"
121-
},
122-
"type": "array"
123-
},
124-
"headers": {
125-
"$ref": "#/definitions/request-headers"
126-
},
127-
"path": {
128-
"items": {
129-
"$ref": "#/definitions/field-matchers"
130-
},
131-
"type": "array"
132-
},
133-
"query": {
134-
"$ref": "#/definitions/request-queries"
135-
},
136-
"requiresState": {
137-
"patternProperties": {
138-
".{1,}": {
139-
"type": "string"
140-
}
141-
},
142-
"type": "object"
143-
},
144-
"scheme": {
145-
"items": {
146-
"$ref": "#/definitions/field-matchers"
147-
},
148-
"type": "array"
149-
}
150-
},
151-
"type": "object"
152-
},
153-
"request-headers": {
154-
"additionalProperties": {
155-
"items": {
156-
"$ref": "#/definitions/field-matchers"
157-
},
158-
"type": "array"
159-
},
160-
"type": "object"
161-
},
162-
"request-queries": {
163-
"additionalProperties": {
164-
"items": {
165-
"$ref": "#/definitions/field-matchers"
166-
},
167-
"type": "array"
168-
},
169-
"type": "object"
170-
},
171-
"request-response-pair": {
172-
"properties": {
173-
"labels": {
174-
"items": {
175-
"type": "string"
176-
},
177-
"type": "array"
178-
},
179-
"request": {
180-
"$ref": "#/definitions/request"
181-
},
182-
"response": {
183-
"$ref": "#/definitions/response"
184-
}
185-
},
186-
"required": ["request", "response"],
187-
"type": "object"
188-
},
189-
"response": {
190-
"properties": {
191-
"body": {
192-
"type": "string"
193-
},
194-
"bodyFile": {
195-
"type": "string"
196-
},
197-
"encodedBody": {
198-
"type": "boolean"
199-
},
200-
"fixedDelay": {
201-
"type": "integer"
202-
},
203-
"headers": {
204-
"$ref": "#/definitions/headers"
205-
},
206-
"logNormalDelay": {
207-
"properties": {
208-
"max": {
209-
"type": "integer"
210-
},
211-
"mean": {
212-
"type": "integer"
213-
},
214-
"median": {
215-
"type": "integer"
216-
},
217-
"min": {
218-
"type": "integer"
219-
}
220-
}
221-
},
222-
"postServeAction": {
223-
"type": "string"
224-
},
225-
"removesState": {
226-
"type": "array"
227-
},
228-
"status": {
229-
"type": "integer"
230-
},
231-
"templated": {
232-
"type": "boolean"
233-
},
234-
"transitionsState": {
235-
"patternProperties": {
236-
".{1,}": {
237-
"type": "string"
238-
}
239-
},
240-
"type": "object"
241-
}
242-
},
243-
"type": "object"
244-
},
245-
"variables": {
246-
"properties": {
247-
"name": {
248-
"type": "string"
249-
},
250-
"function": {
251-
"type": "string"
252-
},
253-
"arguments": {
254-
"type": "array"
255-
}
256-
},
257-
"required": ["name", "function"],
258-
"type": "object"
259-
}
260-
},
261-
"description": "Hoverfly simulation schema",
262-
"properties": {
263-
"data": {
264-
"properties": {
265-
"globalActions": {
266-
"properties": {
267-
"delays": {
268-
"items": {
269-
"$ref": "#/definitions/delay"
270-
},
271-
"type": "array"
272-
},
273-
"delaysLogNormal": {
274-
"items": {
275-
"$ref": "#/definitions/delay-log-normal"
276-
},
277-
"type": "array"
278-
}
279-
},
280-
"type": "object"
281-
},
282-
"literals": {
283-
"items": {
284-
"$ref": "#/definitions/literals"
285-
},
286-
"type": "array"
287-
},
288-
"pairs": {
289-
"items": {
290-
"$ref": "#/definitions/request-response-pair"
291-
},
292-
"type": "array"
293-
},
294-
"variables": {
295-
"items": {
296-
"$ref": "#/definitions/variables"
297-
},
298-
"type": "array"
299-
}
300-
},
301-
"type": "object"
302-
},
303-
"meta": {
304-
"$ref": "#/definitions/meta"
305-
}
306-
},
307-
"required": ["data", "meta"],
308-
"type": "object"
309-
}
8+
.. literalinclude:: ../../../core/handlers/v2/schema.json
9+
:language: javascript

0 commit comments

Comments
 (0)