@@ -36,7 +36,7 @@ paths:
3636 content:
3737 application/json:
3838 schema:
39− description: "list of upserted expectations"
39+ title: list of upserted expectations
4040 type: array
4141 additionalProperties: false
4242 items:
@@ -63,7 +63,7 @@ paths:
6363 content:
6464 application/json:
6565 schema:
66− description: "list of upserted expectations"
66+ title: list of upserted expectations
6767 type: array
6868 additionalProperties: false
6969 items:
@@ -89,15 +89,6 @@ paths:
8989 description: expectations and recorded requests cleared
9090 '400':
9191 description: incorrect request format
92− parameters:
93− - in: query
94− name: type
95− schema:
96− type: string
97− enum: ["all", "log", "expectations"]
98− default: "all"
99− required: false
100− description: specifies the type of information to clear, default if not specified is "all", supported values are "all", "log", "expectations"
10192 requestBody:
10293 content:
10394 application/json:
@@ -125,14 +116,12 @@ paths:
125116 schema:
126117 type: string
127118 enum: [ "java", "json", "log_entries" ]
128− required: false
129119 description: changes response format, default if not specificed is "json", supported values are "java", "json", "log_entries"
130120 - in: query
131121 name: type
132122 schema:
133123 type: string
134124 enum: [ "logs", "requests", "request_responses", "recorded_expectations", "active_expectations" ]
135− required: false
136125 description: specifies the type of object that is retrieve, default if not specified is "requests", supported values are "logs", "requests", "recorded_expectations", "active_expectations"
137126 responses:
138127 '200':
@@ -148,11 +137,7 @@ paths:
148137 - type: array
149138 additionalProperties: false
150139 items:
151− $ref: "#/components/schemas/HttpRequest"
152− - type: array
153− additionalProperties: false
154− items:
155− $ref: "#/components/schemas/HttpRequestAndHttpResponse"
140+ $ref: "#/components/schemas/HttpResponse"
156141 application/java:
157142 schema:
158143 type: string
@@ -272,7 +257,7 @@ paths:
272257components:
273258 schemas:
274259 Expectations:
275− description: "list of expectations"
260+ title: "list of expectations"
276261 oneOf:
277262 - $ref: "#/components/schemas/Expectation"
278263 - type: array
@@ -280,7 +265,7 @@ components:
280265 items:
281266 $ref: "#/components/schemas/Expectation"
282267 Expectation:
283− description: "expectation"
268+ title: "expectation"
284269 type: object
285270 additionalProperties: false
286271 properties:
@@ -290,6 +275,8 @@ components:
290275 type: integer
291276 httpRequest:
292277 $ref: "#/components/schemas/RequestDefinition"
278+ openAPIDefinition:
279+ $ref: "#/components/schemas/OpenAPIDefinition"
293280 httpResponse:
294281 $ref: "#/components/schemas/HttpResponse"
295282 httpResponseTemplate:
@@ -314,29 +301,8 @@ components:
314301 $ref: "#/components/schemas/Times"
315302 timeToLive:
316303 $ref: "#/components/schemas/TimeToLive"
317− oneOf:
318− - required:
319− - httpResponse
320− - required:
321− - httpResponseTemplate
322− - required:
323− - httpResponseClassCallback
324− - required:
325− - httpResponseObjectCallback
326− - required:
327− - httpForward
328− - required:
329− - httpForwardTemplate
330− - required:
331− - httpForwardClassCallback
332− - required:
333− - httpForwardObjectCallback
334− - required:
335− - httpOverrideForwardedRequest
336− - required:
337− - httpError
338304 ExpectationId:
339− description: "pointer to existing expectation"
305+ title: "pointer to existing expectation"
340306 type: object
341307 additionalProperties: false
342308 properties:
@@ -345,7 +311,7 @@ components:
345311 required:
346312 - id
347313 OpenAPIExpectations:
348− description: "list of open api expectations"
314+ title: "list of open api expectations"
349315 oneOf:
350316 - $ref: "#/components/schemas/OpenAPIExpectation"
351317 - type: array
@@ -353,7 +319,7 @@ components:
353319 items:
354320 $ref: "#/components/schemas/OpenAPIExpectation"
355321 OpenAPIExpectation:
356− description: "open api or swagger expectation"
322+ title: "open api or swagger expectation"
357323 type: object
358324 additionalProperties: false
359325 properties:
@@ -368,12 +334,12 @@ components:
368334 required:
369335 - specUrlOrPayload
370336 RequestDefinition:
371− description: "request definition"
337+ title: "request definition"
372338 oneOf:
373339 - $ref: "#/components/schemas/HttpRequest"
374340 - $ref: "#/components/schemas/OpenAPIDefinition"
375341 HttpRequest:
376− description: "request properties matcher"
342+ title: "request properties matcher"
377343 type: object
378344 additionalProperties: false
379345 properties:
@@ -398,7 +364,7 @@ components:
398364 socketAddress:
399365 $ref: "#/components/schemas/SocketAddress"
400366 OpenAPIDefinition:
401− description: "open api or swagger request matcher"
367+ title: "open api or swagger request matcher"
402368 type: object
403369 additionalProperties: false
404370 properties:
@@ -407,7 +373,7 @@ components:
407373 operationId:
408374 type: string
409375 HttpResponse:
410− description: "response to return"
376+ title: "response to return"
411377 type: object
412378 additionalProperties: false
413379 properties:
@@ -426,7 +392,7 @@ components:
426392 reasonPhrase:
427393 type: string
428394 HttpTemplate:
429− description: "template to generate response / request"
395+ title: "template to generate response / request"
430396 type: object
431397 additionalProperties: false
432398 properties:
@@ -440,7 +406,7 @@ components:
440406 template:
441407 type: string
442408 HttpForward:
443− description: "host and port to forward to"
409+ title: host and port to forward to
444410 type: object
445411 additionalProperties: false
446412 properties:
@@ -455,7 +421,7 @@ components:
455421 - HTTP
456422 - HTTPS
457423 HttpClassCallback:
458− description: "class callback"
424+ title: class callback
459425 type: object
460426 additionalProperties: false
461427 properties:
@@ -464,7 +430,7 @@ components:
464430 callbackClass:
465431 type: string
466432 HttpObjectCallback:
467− description: "object / method callback"
433+ title: object / method callback
468434 type: object
469435 additionalProperties: false
470436 properties:
@@ -475,7 +441,7 @@ components:
475441 responseCallback:
476442 type: boolean
477443 HttpOverrideForwardedRequest:
478− description: "override forwarded request"
444+ title: override forwarded request
479445 oneOf:
480446 - type: object
481447 additionalProperties: false
@@ -577,7 +543,7 @@ components:
577543 httpResponse:
578544 "$ref": "#/components/schemas/HttpResponse"
579545 HttpError:
580− description: "error behaviour"
546+ title: error behaviour
581547 type: object
582548 additionalProperties: false
583549 properties:
@@ -588,7 +554,7 @@ components:
588554 responseBytes:
589555 type: string
590556 Times:
591− description: "number of responses"
557+ title: "number of responses"
592558 type: object
593559 additionalProperties: false
594560 properties:
@@ -597,7 +563,7 @@ components:
597563 unlimited:
598564 type: boolean
599565 TimeToLive:
600− description: "time expectation is valid for"
566+ title: "time expectation is valid for"
601567 type: object
602568 additionalProperties: false
603569 properties:
@@ -687,7 +653,7 @@ components:
687653 # "^\\S+$":
688654 # $ref: "#/components/schemas/StringOrJsonSchema"
689655 StringOrJsonSchema:
690− description: "string value that can be support nottable, optional or a json schema"
656+ title: string value that can be support nottable, optional or a json schema
691657 oneOf:
692658 - type: string
693659 - type: object
@@ -718,7 +684,7 @@ components:
718684 - PIPE_DELIMITED
719685 - DEEP_OBJECT
720686 SocketAddress:
721− description: "remote address to send request to, only used for request overrides"
687+ title: remote address to send request to
722688 type: object
723689 additionalProperties: false
724690 properties:
@@ -730,198 +696,234 @@ components:
730696 enum:
731697 - HTTP
732698 - HTTPS
699+ BinaryBodyMatcher:
700+ type: object
701+ description: "binary body matcher"
702+ additionalProperties: false
703+ properties:
704+ not:
705+ type: boolean
706+ type:
707+ enum:
708+ - BINARY
709+ base64Bytes:
710+ type: string
711+ contentType:
712+ type: string
713+ JsonBodyMatcher:
714+ type: object
715+ description: "json body matcher"
716+ additionalProperties: false
717+ properties:
718+ not:
719+ type: boolean
720+ type:
721+ enum:
722+ - JSON
723+ json:
724+ type: string
725+ contentType:
726+ type: string
727+ matchType:
728+ enum:
729+ - STRICT
730+ - ONLY_MATCHING_FIELDS
731+ RawJsonBodyMatcher:
732+ type: object
733+ description: "json matching fields body matcher"
734+ additionalProperties: true
735+ JsonSchemaBodyMatcher:
736+ type: object
737+ description: "json schema body matcher"
738+ additionalProperties: false
739+ properties:
740+ not:
741+ type: boolean
742+ type:
743+ enum:
744+ - JSON_SCHEMA
745+ jsonSchema:
746+ $ref: http://json-schema.org/draft-04/schema
747+ JsonPathBodyMatcher:
748+ type: object
749+ description: "JSON path body matcher"
750+ additionalProperties: false
751+ properties:
752+ not:
753+ type: boolean
754+ type:
755+ enum:
756+ - JSON_PATH
757+ jsonPath:
758+ type: string
759+ ParameterBodyMatcher:
760+ type: object
761+ description: "parameter body matcher"
762+ additionalProperties: false
763+ properties:
764+ not:
765+ type: boolean
766+ type:
767+ enum:
768+ - PARAMETERS
769+ parameters:
770+ $ref: "#/components/schemas/KeyToMultiValue"
771+ RegexBodyMatcher:
772+ type: object
773+ description: "regex body matcher"
774+ additionalProperties: false
775+ properties:
776+ not:
777+ type: boolean
778+ type:
779+ enum:
780+ - REGEX
781+ regex:
782+ type: string
783+ StringBodyMatcher:
784+ type: object
785+ description: "string body matcher"
786+ additionalProperties: false
787+ properties:
788+ not:
789+ type: boolean
790+ type:
791+ enum:
792+ - STRING
793+ string:
794+ type: string
795+ contentType:
796+ type: string
797+ subString:
798+ type: boolean
799+ RawStringBodyMatcher:
800+ type: string
801+ description: "substring body matcher"
802+ XmlBodyMatcher:
803+ type: object
804+ description: "xml body matcher"
805+ additionalProperties: false
806+ properties:
807+ not:
808+ type: boolean
809+ type:
810+ enum:
811+ - XML
812+ xml:
813+ type: string
814+ contentType:
815+ type: string
816+ XmlSchemaBodyMatcher:
817+ type: object
818+ description: "xml schema body matcher"
819+ additionalProperties: false
820+ properties:
821+ not:
822+ type: boolean
823+ type:
824+ enum:
825+ - XML_SCHEMA
826+ xmlSchema:
827+ type: string
828+ XpathBodyMatcher:
829+ type: object
830+ description: "xpath body matcher"
831+ additionalProperties: false
832+ properties:
833+ not:
834+ type: boolean
835+ type:
836+ enum:
837+ - XPATH
838+ xpath:
839+ type: string
733840 Body:
734841 description: "request body matcher"
735842 anyOf:
736− - type: object
737− description: "binary body matcher"
738− additionalProperties: false
739− properties:
740− not:
741− type: boolean
742− type:
743− enum:
744− - BINARY
745− base64Bytes:
746− type: string
747− contentType:
748− type: string
749− - type: object
750− description: "json body matcher"
751− additionalProperties: false
752− properties:
753− not:
754− type: boolean
755− type:
756− enum:
757− - JSON
758− json:
759− type: string
760− contentType:
761− type: string
762− matchType:
763− enum:
764− - STRICT
765− - ONLY_MATCHING_FIELDS
766− - type: object
767− description: "json matching fields body matcher"
768− additionalProperties: true
769− - type: object
770− description: "json schema body matcher"
771− additionalProperties: false
772− properties:
773− not:
774− type: boolean
775− type:
776− enum:
777− - JSON_SCHEMA
778− jsonSchema:
779− $ref: http://json-schema.org/draft-04/schema
780− - type: object
781− description: "JSON path body matcher"
782− additionalProperties: false
783− properties:
784− not:
785− type: boolean
786− type:
787− enum:
788− - JSON_PATH
789− jsonPath:
790− type: string
791− - type: object
792− description: "parameter body matcher"
793− additionalProperties: false
794− properties:
795− not:
796− type: boolean
797− type:
798− enum:
799− - PARAMETERS
800− parameters:
801− $ref: "#/components/schemas/KeyToMultiValue"
802− - type: object
803− description: "regex body matcher"
804− additionalProperties: false
805− properties:
806− not:
807− type: boolean
808− type:
809− enum:
810− - REGEX
811− regex:
812− type: string
813− - type: object
814− description: "string body matcher"
815− additionalProperties: false
816− properties:
817− not:
818− type: boolean
819− type:
820− enum:
821− - STRING
822− string:
823− type: string
824− contentType:
825− type: string
826− subString:
827− type: boolean
828− - type: string
829− description: "substring body matcher"
830− - type: object
831− description: "xml body matcher"
832− additionalProperties: false
833− properties:
834− not:
835− type: boolean
836− type:
837− enum:
838− - XML
839− xml:
840− type: string
841− contentType:
842− type: string
843− - type: object
844− description: "xml schema body matcher"
845− additionalProperties: false
846− properties:
847− not:
848− type: boolean
849− type:
850− enum:
851− - XML_SCHEMA
852− xmlSchema:
853− type: string
854− - type: object
855− description: "xpath body matcher"
856− additionalProperties: false
857− properties:
858− not:
859− type: boolean
860− type:
861− enum:
862− - XPATH
863− xpath:
864− type: string
843+ - $ref: "#/components/schemas/BinaryBodyMatcher"
844+ - $ref: "#/components/schemas/JsonBodyMatcher"
845+ - $ref: "#/components/schemas/RawJsonBodyMatcher"
846+ - $ref: "#/components/schemas/JsonSchemaBodyMatcher"
847+ - $ref: "#/components/schemas/JsonPathBodyMatcher"
848+ - $ref: "#/components/schemas/ParameterBodyMatcher"
849+ - $ref: "#/components/schemas/RegexBodyMatcher"
850+ - $ref: "#/components/schemas/StringBodyMatcher"
851+ - $ref: "#/components/schemas/RawStringBodyMatcher"
852+ - $ref: "#/components/schemas/XmlBodyMatcher"
853+ - $ref: "#/components/schemas/XmlSchemaBodyMatcher"
854+ - $ref: "#/components/schemas/XpathBodyMatcher"
855+ BinaryBodyResponse:
856+ type: object
857+ description: "binary response body"
858+ additionalProperties: false
859+ properties:
860+ not:
861+ type: boolean
862+ type:
863+ enum:
864+ - BINARY
865+ base64Bytes:
866+ type: string
867+ contentType:
868+ type: string
869+ JsonResponseBody:
870+ type: object
871+ description: "json response body"
872+ additionalProperties: false
873+ properties:
874+ not:
875+ type: boolean
876+ type:
877+ enum:
878+ - JSON
879+ json:
880+ type: string
881+ contentType:
882+ type: string
883+ RawJsonResponseBody:
884+ type: object
885+ description: "json response body"
886+ additionalProperties: true
887+ StringResponseBody:
888+ type: object
889+ description: "string response body"
890+ additionalProperties: false
891+ properties:
892+ not:
893+ type: boolean
894+ type:
895+ enum:
896+ - STRING
897+ string:
898+ type: string
899+ contentType:
900+ type: string
901+ RawStringResponseBody:
902+ type: string
903+ description: "string response body"
904+ XmlResponseBody:
905+ type: object
906+ description: "xml response body"
907+ additionalProperties: false
908+ properties:
909+ not:
910+ type: boolean
911+ type:
912+ enum:
913+ - XML
914+ xml:
915+ type: string
916+ contentType:
917+ type: string
865918 BodyWithContentType:
866919 description: "response body"
867920 anyOf:
868− - type: object
869− description: "binary response body"
870− additionalProperties: false
871− properties:
872− not:
873− type: boolean
874− type:
875− enum:
876− - BINARY
877− base64Bytes:
878− type: string
879− contentType:
880− type: string
881− - type: object
882− description: "json response body"
883− additionalProperties: false
884− properties:
885− not:
886− type: boolean
887− type:
888− enum:
889− - JSON
890− json:
891− type: string
892− contentType:
893− type: string
894− - type: object
895− description: "json response body"
896− additionalProperties: true
897− - type: object
898− description: "string response body"
899− additionalProperties: false
900− properties:
901− not:
902− type: boolean
903− type:
904− enum:
905− - STRING
906− string:
907− type: string
908− contentType:
909− type: string
910− - type: string
911− description: "string response body"
912− - type: object
913− description: "xml response body"
914− additionalProperties: false
915− properties:
916− not:
917− type: boolean
918− type:
919− enum:
920− - XML
921− xml:
922− type: string
923− contentType:
924− type: string
921+ - $ref: "#/components/schemas/BinaryBodyResponse"
922+ - $ref: "#/components/schemas/JsonResponseBody"
923+ - $ref: "#/components/schemas/RawJsonResponseBody"
924+ - $ref: "#/components/schemas/StringResponseBody"
925+ - $ref: "#/components/schemas/RawStringResponseBody"
926+ - $ref: "#/components/schemas/XmlResponseBody"
925927 Delay:
926928 description: "response delay"
927929 type: object
@@ -963,11 +965,6 @@ components:
963965 $ref: "#/components/schemas/VerificationTimes"
964966 maximumNumberOfRequestToReturnInVerificationFailure:
965967 type: integer
966− oneOf:
967− - required:
968− - expectationId
969− - required:
970− - httpRequest
971968 VerificationTimes:
972969 description: "number of request to verify"
973970 type: object
@@ -993,11 +990,6 @@ components:
993990 $ref: "#/components/schemas/RequestDefinition"
994991 maximumNumberOfRequestToReturnInVerificationFailure:
995992 type: integer
996− oneOf:
997− - required:
998− - expectationIds
999− - required:
1000− - httpRequests
1001993 Ports:
1002994 description: "list of ports"
1003995 type: object
@@ -1007,14 +999,3 @@ components:
1007999 items:
10081000 type: number
10091001 type: array
1010− HttpRequestAndHttpResponse:
1011− description: "request and response"
1012− type: object
1013− additionalProperties: false
1014− properties:
1015− httpRequest:
1016− $ref: "#/components/schemas/HttpRequest"
1017− httpResponse:
1018− $ref: "#/components/schemas/HttpResponse"
1019− timestamp:
1020− type: string