Skip to content

Commit 6e73b42

Browse files
committed
fixed OpenAPI specification for Delay
1 parent 58aedbd commit 6e73b42

File tree

7 files changed

+43
-23
lines changed

7 files changed

+43
-23
lines changed

mockserver-core/src/main/resources/org/mockserver/model/schema/httpClassCallback.json

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"type": "object",
44
"additionalProperties": false,
55
"properties": {
6+
"delay": {
7+
"$ref": "#/definitions/delay"
8+
},
69
"callbackClass": {
710
"type": "string"
811
}

mockserver-core/src/main/resources/org/mockserver/model/schema/httpForward.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"type": "object",
44
"additionalProperties": false,
55
"properties": {
6+
"delay": {
7+
"$ref": "#/definitions/delay"
8+
},
69
"host": {
710
"type": "string"
811
},
@@ -14,9 +17,6 @@
1417
"HTTP",
1518
"HTTPS"
1619
]
17-
},
18-
"delay": {
19-
"$ref": "#/definitions/delay"
2020
}
2121
},
2222
"definitions": {

mockserver-core/src/main/resources/org/mockserver/model/schema/httpObjectCallback.json

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"type": "object",
44
"additionalProperties": false,
55
"properties": {
6+
"delay": {
7+
"$ref": "#/definitions/delay"
8+
},
69
"clientId": {
710
"type": "string"
811
}

mockserver-core/src/main/resources/org/mockserver/model/schema/httpOverrideForwardedRequest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"type": "object",
44
"additionalProperties": false,
55
"properties": {
6-
"httpRequest": {
7-
"$ref": "#/definitions/httpRequest"
8-
},
96
"delay": {
107
"$ref": "#/definitions/delay"
8+
},
9+
"httpRequest": {
10+
"$ref": "#/definitions/httpRequest"
1111
}
1212
},
1313
"definitions": {

mockserver-core/src/main/resources/org/mockserver/model/schema/httpResponse.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"type": "object",
44
"additionalProperties": false,
55
"properties": {
6-
"body": {
7-
"$ref": "#/definitions/bodyWithContentType"
8-
},
96
"delay": {
107
"$ref": "#/definitions/delay"
118
},
9+
"body": {
10+
"$ref": "#/definitions/bodyWithContentType"
11+
},
1212
"cookies": {
1313
"$ref": "#/definitions/keyToValue"
1414
},

mockserver-core/src/main/resources/org/mockserver/model/schema/httpTemplate.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"type": "object",
44
"additionalProperties": false,
55
"properties": {
6+
"delay": {
7+
"$ref": "#/definitions/delay"
8+
},
69
"templateType": {
710
"enum": [
811
"JAVASCRIPT",
@@ -11,9 +14,6 @@
1114
},
1215
"template": {
1316
"type": "string"
14-
},
15-
"delay": {
16-
"$ref": "#/definitions/delay"
1717
}
1818
},
1919
"definitions": {

mockserver-core/src/main/resources/org/mockserver/openapi/mock-server-openapi-embedded-model.yaml

+25-11
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,24 @@ components:
265265
oneOf:
266266
- required:
267267
- httpResponse
268+
- required:
269+
- httpResponseTemplate
270+
- required:
271+
- httpResponseClassCallback
272+
- required:
273+
- httpResponseObjectCallback
268274
- required:
269275
- httpForward
270276
- required:
271-
- httpClassCallback
277+
- httpForwardTemplate
272278
- required:
273-
- httpError
279+
- httpForwardClassCallback
274280
- required:
275-
- httpObjectCallback
281+
- httpForwardObjectCallback
282+
- required:
283+
- httpOverrideForwardedRequest
284+
- required:
285+
- httpError
276286
HttpRequest:
277287
title: "request matcher"
278288
type: object
@@ -299,10 +309,10 @@ components:
299309
type: object
300310
additionalProperties: false
301311
properties:
302-
body:
303-
$ref: "#/components/schemas/BodyWithContentType"
304312
delay:
305313
$ref: "#/components/schemas/Delay"
314+
body:
315+
$ref: "#/components/schemas/BodyWithContentType"
306316
cookies:
307317
$ref: "#/components/schemas/KeyToValue"
308318
connectionOptions:
@@ -318,19 +328,21 @@ components:
318328
type: object
319329
additionalProperties: false
320330
properties:
331+
delay:
332+
$ref: "#/components/schemas/Delay"
321333
templateType:
322334
enum:
323335
- JAVASCRIPT
324336
- VELOCITY
325337
template:
326338
type: string
327-
delay:
328-
$ref: "#/components/schemas/Delay"
329339
HttpForward:
330340
title: host and port to forward to
331341
type: object
332342
additionalProperties: false
333343
properties:
344+
delay:
345+
$ref: "#/components/schemas/Delay"
334346
host:
335347
type: string
336348
port:
@@ -339,31 +351,33 @@ components:
339351
enum:
340352
- HTTP
341353
- HTTPS
342-
delay:
343-
$ref: "#/components/schemas/Delay"
344354
HttpClassCallback:
345355
title: class callback
346356
type: object
347357
additionalProperties: false
348358
properties:
359+
delay:
360+
$ref: "#/components/schemas/Delay"
349361
callbackClass:
350362
type: string
351363
HttpObjectCallback:
352364
title: object / method callback
353365
type: object
354366
additionalProperties: false
355367
properties:
368+
delay:
369+
$ref: "#/components/schemas/Delay"
356370
clientId:
357371
type: string
358372
HttpOverrideForwardedRequest:
359373
title: override forwarded request
360374
type: object
361375
additionalProperties: false
362376
properties:
363-
httpRequest:
364-
$ref: "#/components/schemas/HttpRequest"
365377
delay:
366378
$ref: "#/components/schemas/Delay"
379+
httpRequest:
380+
$ref: "#/components/schemas/HttpRequest"
367381
HttpError:
368382
title: error behaviour
369383
type: object

0 commit comments

Comments
 (0)