@@ -4,7 +4,7 @@ servers:
4 - url: 'https://localhost:1080/'
4 - url: 'https://localhost:1080/'
6 title: MockServer API
6 title: MockServer API
7− version: 5.13.x
7+ version: 5.15.x
8 description: >-
8 description: >-
9 MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below).
9 MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below).
@@ -18,7 +18,7 @@ info:
18 name: Apache 2.0
18 name: Apache 2.0
20 - name: expectation
20 - name: expectation
21− description: Create or update expectations - updates if the id matches an existing expecations (only supported by MockServer)
21+ description: Create or update expectations - updates if the id matches an existing expectations (only supported by MockServer)
22 - name: verify
22 - name: verify
23 description: Verify requests (both MockServer & MockServer Proxy)
23 description: Verify requests (both MockServer & MockServer Proxy)
24 - name: control
24 - name: control
@@ -36,7 +36,7 @@ paths:
37 application/json:
37 application/json:
39− description: "list of upserted expectations"
39+ title: list of upserted expectations
40 type: array
40 type: array
41 additionalProperties: false
41 additionalProperties: false
@@ -63,7 +63,7 @@ paths:
64 application/json:
64 application/json:
66− description: "list of upserted expectations"
66+ title: list of upserted expectations
67 type: array
67 type: array
68 additionalProperties: false
68 additionalProperties: false
@@ -89,15 +89,6 @@ paths:
89 description: expectations and recorded requests cleared
89 description: expectations and recorded requests cleared
91 description: incorrect request format
91 description: incorrect request format
97− enum: ["all", "log", "expectations"]
100− description: specifies the type of information to clear, default if not specified is "all", supported values are "all", "log", "expectations"
101 requestBody:
92 requestBody:
103 application/json:
94 application/json:
@@ -105,7 +96,7 @@ paths:
106 - $ref: "#/components/schemas/RequestDefinition"
97 - $ref: "#/components/schemas/RequestDefinition"
107 - $ref: "#/components/schemas/ExpectationId"
98 - $ref: "#/components/schemas/ExpectationId"
108− description: request used to match expectations and recored requests to clear
99+ description: request used to match expectations and record requests to clear
109 /mockserver/reset:
100 /mockserver/reset:
@@ -125,14 +116,12 @@ paths:
126 type: string
117 type: string
127 enum: [ "java", "json", "log_entries" ]
118 enum: [ "java", "json", "log_entries" ]
129− description: changes response format, default if not specificed is "json", supported values are "java", "json", "log_entries"
119+ description: changes response format, default if not specified is "json", supported values are "java", "json", "log_entries"
130 - in: query
120 - in: query
131 name: type
121 name: type
133 type: string
123 type: string
134 enum: [ "logs", "requests", "request_responses", "recorded_expectations", "active_expectations" ]
124 enum: [ "logs", "requests", "request_responses", "recorded_expectations", "active_expectations" ]
136 description: specifies the type of object that is retrieve, default if not specified is "requests", supported values are "logs", "requests", "recorded_expectations", "active_expectations"
125 description: specifies the type of object that is retrieve, default if not specified is "requests", supported values are "logs", "requests", "recorded_expectations", "active_expectations"
137 responses:
126 responses:
@@ -148,11 +137,7 @@ paths:
148 - type: array
137 - type: array
149 additionalProperties: false
138 additionalProperties: false
151− $ref: "#/components/schemas/HttpRequest"
140+ $ref: "#/components/schemas/HttpResponse"
153− additionalProperties: false
155− $ref: "#/components/schemas/HttpRequestAndHttpResponse"
156 application/java:
141 application/java:
158 type: string
143 type: string
@@ -272,7 +257,7 @@ paths:
272components:
257components:
274 Expectations:
259 Expectations:
275− description: "list of expectations"
260+ title: "list of expectations"
277 - $ref: "#/components/schemas/Expectation"
262 - $ref: "#/components/schemas/Expectation"
278 - type: array
263 - type: array
@@ -280,7 +265,7 @@ components:
281 $ref: "#/components/schemas/Expectation"
266 $ref: "#/components/schemas/Expectation"
282 Expectation:
267 Expectation:
283− description: "expectation"
268+ title: "expectation"
284 type: object
269 type: object
285 additionalProperties: false
270 additionalProperties: false
286 properties:
271 properties:
@@ -290,6 +275,8 @@ components:
290 type: integer
275 type: integer
291 httpRequest:
276 httpRequest:
292 $ref: "#/components/schemas/RequestDefinition"
277 $ref: "#/components/schemas/RequestDefinition"
279+ $ref: "#/components/schemas/OpenAPIDefinition"
293 httpResponse:
280 httpResponse:
294 $ref: "#/components/schemas/HttpResponse"
281 $ref: "#/components/schemas/HttpResponse"
295 httpResponseTemplate:
282 httpResponseTemplate:
@@ -314,29 +301,8 @@ components:
314 $ref: "#/components/schemas/Times"
301 $ref: "#/components/schemas/Times"
315 timeToLive:
302 timeToLive:
316 $ref: "#/components/schemas/TimeToLive"
303 $ref: "#/components/schemas/TimeToLive"
321− - httpResponseTemplate
323− - httpResponseClassCallback
325− - httpResponseObjectCallback
329− - httpForwardTemplate
331− - httpForwardClassCallback
333− - httpForwardObjectCallback
335− - httpOverrideForwardedRequest
338 ExpectationId:
304 ExpectationId:
339− description: "pointer to existing expectation"
305+ title: "pointer to existing expectation"
340 type: object
306 type: object
341 additionalProperties: false
307 additionalProperties: false
342 properties:
308 properties:
@@ -345,7 +311,7 @@ components:
345 required:
311 required:
347 OpenAPIExpectations:
313 OpenAPIExpectations:
348− description: "list of open api expectations"
314+ title: "list of open api expectations"
350 - $ref: "#/components/schemas/OpenAPIExpectation"
316 - $ref: "#/components/schemas/OpenAPIExpectation"
351 - type: array
317 - type: array
@@ -353,7 +319,7 @@ components:
354 $ref: "#/components/schemas/OpenAPIExpectation"
320 $ref: "#/components/schemas/OpenAPIExpectation"
355 OpenAPIExpectation:
321 OpenAPIExpectation:
356− description: "open api or swagger expectation"
322+ title: "open api or swagger expectation"
357 type: object
323 type: object
358 additionalProperties: false
324 additionalProperties: false
359 properties:
325 properties:
@@ -368,12 +334,12 @@ components:
368 required:
334 required:
369 - specUrlOrPayload
335 - specUrlOrPayload
370 RequestDefinition:
336 RequestDefinition:
371− description: "request definition"
337+ title: "request definition"
373 - $ref: "#/components/schemas/HttpRequest"
339 - $ref: "#/components/schemas/HttpRequest"
374 - $ref: "#/components/schemas/OpenAPIDefinition"
340 - $ref: "#/components/schemas/OpenAPIDefinition"
375 HttpRequest:
341 HttpRequest:
376− description: "request properties matcher"
342+ title: "request properties matcher"
377 type: object
343 type: object
378 additionalProperties: false
344 additionalProperties: false
379 properties:
345 properties:
@@ -397,8 +363,10 @@ components:
397 $ref: "#/components/schemas/KeyToValue"
363 $ref: "#/components/schemas/KeyToValue"
398 socketAddress:
364 socketAddress:
399 $ref: "#/components/schemas/SocketAddress"
365 $ref: "#/components/schemas/SocketAddress"
367+ $ref: "#/components/schemas/Protocol"
400 OpenAPIDefinition:
368 OpenAPIDefinition:
401− description: "open api or swagger request matcher"
369+ title: "open api or swagger request matcher"
402 type: object
370 type: object
403 additionalProperties: false
371 additionalProperties: false
404 properties:
372 properties:
@@ -407,7 +375,7 @@ components:
407 operationId:
375 operationId:
408 type: string
376 type: string
409 HttpResponse:
377 HttpResponse:
410− description: "response to return"
378+ title: "response to return"
411 type: object
379 type: object
412 additionalProperties: false
380 additionalProperties: false
413 properties:
381 properties:
@@ -426,7 +394,7 @@ components:
426 reasonPhrase:
394 reasonPhrase:
427 type: string
395 type: string
428 HttpTemplate:
396 HttpTemplate:
429− description: "template to generate response / request"
397+ title: "template to generate response / request"
430 type: object
398 type: object
431 additionalProperties: false
399 additionalProperties: false
432 properties:
400 properties:
@@ -440,7 +408,7 @@ components:
440 template:
408 template:
441 type: string
409 type: string
442 HttpForward:
410 HttpForward:
443− description: "host and port to forward to"
411+ title: host and port to forward to
444 type: object
412 type: object
445 additionalProperties: false
413 additionalProperties: false
446 properties:
414 properties:
@@ -455,7 +423,7 @@ components:
457 HttpClassCallback:
425 HttpClassCallback:
458− description: "class callback"
426+ title: class callback
459 type: object
427 type: object
460 additionalProperties: false
428 additionalProperties: false
461 properties:
429 properties:
@@ -464,7 +432,7 @@ components:
464 callbackClass:
432 callbackClass:
465 type: string
433 type: string
466 HttpObjectCallback:
434 HttpObjectCallback:
467− description: "object / method callback"
435+ title: object / method callback
468 type: object
436 type: object
469 additionalProperties: false
437 additionalProperties: false
470 properties:
438 properties:
@@ -475,7 +443,7 @@ components:
475 responseCallback:
443 responseCallback:
476 type: boolean
444 type: boolean
477 HttpOverrideForwardedRequest:
445 HttpOverrideForwardedRequest:
478− description: "override forwarded request"
446+ title: override forwarded request
480 - type: object
448 - type: object
481 additionalProperties: false
449 additionalProperties: false
@@ -577,7 +545,7 @@ components:
577 httpResponse:
545 httpResponse:
578 "$ref": "#/components/schemas/HttpResponse"
546 "$ref": "#/components/schemas/HttpResponse"
579 HttpError:
547 HttpError:
580− description: "error behaviour"
548+ title: error behaviour
581 type: object
549 type: object
582 additionalProperties: false
550 additionalProperties: false
583 properties:
551 properties:
@@ -588,7 +556,7 @@ components:
588 responseBytes:
556 responseBytes:
589 type: string
557 type: string
591− description: "number of responses"
559+ title: "number of responses"
592 type: object
560 type: object
593 additionalProperties: false
561 additionalProperties: false
594 properties:
562 properties:
@@ -597,7 +565,7 @@ components:
597 unlimited:
565 unlimited:
598 type: boolean
566 type: boolean
599 TimeToLive:
567 TimeToLive:
600− description: "time expectation is valid for"
568+ title: "time expectation is valid for"
601 type: object
569 type: object
602 additionalProperties: false
570 additionalProperties: false
603 properties:
571 properties:
@@ -687,7 +655,7 @@ components:
687 # "^\\S+$":
655 # "^\\S+$":
688 # $ref: "#/components/schemas/StringOrJsonSchema"
656 # $ref: "#/components/schemas/StringOrJsonSchema"
689 StringOrJsonSchema:
657 StringOrJsonSchema:
690− description: "string value that can be support nottable, optional or a json schema"
658+ title: string value that can be support nottable, optional or a json schema
692 - type: string
660 - type: string
693 - type: object
661 - type: object
@@ -718,7 +686,7 @@ components:
718 - PIPE_DELIMITED
686 - PIPE_DELIMITED
719 - DEEP_OBJECT
687 - DEEP_OBJECT
720 SocketAddress:
688 SocketAddress:
721− description: "remote address to send request to, only used for request overrides"
689+ title: remote address to send request to
722 type: object
690 type: object
723 additionalProperties: false
691 additionalProperties: false
724 properties:
692 properties:
@@ -730,198 +698,239 @@ components:
703+ description: "binary body matcher"
704+ additionalProperties: false
717+ description: "json body matcher"
718+ additionalProperties: false
732+ - ONLY_MATCHING_FIELDS
735+ description: "json matching fields body matcher"
736+ additionalProperties: true
737+ JsonSchemaBodyMatcher:
739+ description: "json schema body matcher"
740+ additionalProperties: false
748+ $ref: http://json-schema.org/draft-04/schema
749+ JsonPathBodyMatcher:
751+ description: "JSON path body matcher"
752+ additionalProperties: false
761+ ParameterBodyMatcher:
763+ description: "parameter body matcher"
764+ additionalProperties: false
772+ $ref: "#/components/schemas/KeyToMultiValue"
775+ description: "regex body matcher"
776+ additionalProperties: false
787+ description: "string body matcher"
788+ additionalProperties: false
801+ RawStringBodyMatcher:
803+ description: "substring body matcher"
806+ description: "xml body matcher"
807+ additionalProperties: false
818+ XmlSchemaBodyMatcher:
820+ description: "xml schema body matcher"
821+ additionalProperties: false
832+ description: "xpath body matcher"
833+ additionalProperties: false
843+ description: "protocol matcher"
734 description: "request body matcher"
848 description: "request body matcher"
850+ - $ref: "#/components/schemas/BinaryBodyMatcher"
851+ - $ref: "#/components/schemas/JsonBodyMatcher"
852+ - $ref: "#/components/schemas/RawJsonBodyMatcher"
853+ - $ref: "#/components/schemas/JsonSchemaBodyMatcher"
854+ - $ref: "#/components/schemas/JsonPathBodyMatcher"
855+ - $ref: "#/components/schemas/ParameterBodyMatcher"
856+ - $ref: "#/components/schemas/RegexBodyMatcher"
857+ - $ref: "#/components/schemas/StringBodyMatcher"
858+ - $ref: "#/components/schemas/RawStringBodyMatcher"
859+ - $ref: "#/components/schemas/XmlBodyMatcher"
860+ - $ref: "#/components/schemas/XmlSchemaBodyMatcher"
861+ - $ref: "#/components/schemas/XpathBodyMatcher"
736− - type: object
863+ type: object
737− description: "binary body matcher"
864+ description: "binary response body"
738− additionalProperties: false
865+ additionalProperties: false
739− properties:
866+ properties:
741− type: boolean
868+ type: boolean
744− - BINARY
871+ - BINARY
745− base64Bytes:
872+ base64Bytes:
746− type: string
873+ type: string
747− contentType:
874+ contentType:
748− type: string
875+ type: string
749− - type: object
877+ type: object
750− description: "json body matcher"
878+ description: "json response body"
751− additionalProperties: false
879+ additionalProperties: false
752− properties:
880+ properties:
754− type: boolean
882+ type: boolean
759− type: string
887+ type: string
760− contentType:
888+ contentType:
761− type: string
889+ type: string
762− matchType:
890+ RawJsonResponseBody:
765− - ONLY_MATCHING_FIELDS
766− - type: object
891+ type: object
767− description: "json matching fields body matcher"
892+ description: "json response body"
768− additionalProperties: true
893+ additionalProperties: true
769− - type: object
894+ StringResponseBody:
770− description: "json schema body matcher"
771− additionalProperties: false
779− $ref: http://json-schema.org/draft-04/schema
780− - type: object
895+ type: object
781− description: "JSON path body matcher"
896+ description: "string response body"
782− additionalProperties: false
897+ additionalProperties: false
783− properties:
898+ properties:
792− description: "parameter body matcher"
793− additionalProperties: false
796− type: boolean
900+ type: boolean
801− $ref: "#/components/schemas/KeyToMultiValue"
802− - type: object
901+ type:
803− description: "regex body matcher"
804− additionalProperties: false
814− description: "string body matcher"
815− additionalProperties: false
821− - STRING
903+ - STRING
823− type: string
905+ type: string
824− contentType:
906+ contentType:
825− type: string
907+ type: string
826− subString:
908+ RawStringResponseBody:
828− - type: string
909+ type: string
829− description: "substring body matcher"
910+ description: "string response body"
830− - type: object
912+ type: object
831− description: "xml body matcher"
913+ description: "xml response body"
832− additionalProperties: false
914+ additionalProperties: false
833− properties:
915+ properties:
835− type: boolean
917+ type: boolean
844− description: "xml schema body matcher"
845− additionalProperties: false
853− type: string
922+ type: string
854− - type: object
923+ contentType:
855− description: "xpath body matcher"
856− additionalProperties: false
864− type: string
924+ type: string
865 BodyWithContentType:
925 BodyWithContentType:
866 description: "response body"
926 description: "response body"
868− - type: object
928+ - $ref: "#/components/schemas/BinaryBodyResponse"
869− description: "binary response body"
929+ - $ref: "#/components/schemas/JsonResponseBody"
870− additionalProperties: false
930+ - $ref: "#/components/schemas/RawJsonResponseBody"
871− properties:
931+ - $ref: "#/components/schemas/StringResponseBody"
872− not:
932+ - $ref: "#/components/schemas/RawStringResponseBody"
873− type: boolean
933+ - $ref: "#/components/schemas/XmlResponseBody"
882− description: "json response body"
883− additionalProperties: false
895− description: "json response body"
896− additionalProperties: true
898− description: "string response body"
899− additionalProperties: false
911− description: "string response body"
913− description: "xml response body"
914− additionalProperties: false
926 description: "response delay"
935 description: "response delay"
927 type: object
936 type: object
@@ -963,11 +972,6 @@ components:
963 $ref: "#/components/schemas/VerificationTimes"
972 $ref: "#/components/schemas/VerificationTimes"
964 maximumNumberOfRequestToReturnInVerificationFailure:
973 maximumNumberOfRequestToReturnInVerificationFailure:
965 type: integer
974 type: integer
971 VerificationTimes:
975 VerificationTimes:
972 description: "number of request to verify"
976 description: "number of request to verify"
973 type: object
977 type: object
@@ -993,11 +997,6 @@ components:
993 $ref: "#/components/schemas/RequestDefinition"
997 $ref: "#/components/schemas/RequestDefinition"
994 maximumNumberOfRequestToReturnInVerificationFailure:
998 maximumNumberOfRequestToReturnInVerificationFailure:
995 type: integer
999 type: integer
1002 description: "list of ports"
1001 description: "list of ports"
1003 type: object
1002 type: object
@@ -1007,14 +1006,3 @@ components:
1008 type: number
1007 type: number
1009 type: array
1008 type: array
1010− HttpRequestAndHttpResponse:
1011− description: "request and response"
1013− additionalProperties: false
1016− $ref: "#/components/schemas/HttpRequest"
1018− $ref: "#/components/schemas/HttpResponse"