3 - url: 'http://localhost:1080/'
4 - url: 'https://localhost:1080/'
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).
12 MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
15 Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
17 url: 'https://github.com/mock-server/mockserver/blob/master/LICENSE.md'
21 description: Create or update expectations - updates if the id matches an existing expectations (only supported by MockServer)
23 description: Verify requests (both MockServer & MockServer Proxy)
25 description: Manage state or process (both MockServer & MockServer Proxy)
28 /mockserver/expectation:
32 summary: create expectation
35 description: expectations created
39 title: list of upserted expectations
41 additionalProperties: false
43 $ref: "#/components/schemas/Expectation"
45 description: incorrect request format
47 description: invalid expectation
52 $ref: "#/components/schemas/Expectations"
53 description: expectation(s) to create
59 summary: create expectations from OpenAPI or Swagger
62 description: expectations created
66 title: list of upserted expectations
68 additionalProperties: false
70 $ref: "#/components/schemas/Expectation"
72 description: incorrect request format
74 description: invalid expectation
79 $ref: "#/components/schemas/OpenAPIExpectations"
80 description: expectation(s) to create
86 summary: clears expectations and recorded requests that match the request matcher
89 description: expectations and recorded requests cleared
91 description: incorrect request format
97 - $ref: "#/components/schemas/RequestDefinition"
98 - $ref: "#/components/schemas/ExpectationId"
99 description: request used to match expectations and record requests to clear
104 summary: clears all expectations and recorded requests
107 description: expectations and recorded requests cleared
108 /mockserver/retrieve:
112 summary: retrieve recorded requests, active expectations, recorded expectations or log messages
118 enum: [ "java", "json", "log_entries" ]
119 description: changes response format, default if not specified is "json", supported values are "java", "json", "log_entries"
124 enum: [ "logs", "requests", "request_responses", "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"
128 description: recorded requests or active expectations returned
134 additionalProperties: false
136 $ref: "#/components/schemas/Expectation"
138 additionalProperties: false
140 $ref: "#/components/schemas/HttpResponse"
144 description: Java code for the list of either Expectations or HttpResponses
148 description: List of recorded log messages
150 description: incorrect request format
155 $ref: "#/components/schemas/RequestDefinition"
157 request used to match which recorded requests, expectations or log messages to return, an empty body matches all requests, expectations or log messages
162 summary: verify a request has been received a specific number of times
165 description: matching request has been received specified number of times
167 description: incorrect request format
169 description: request has not been received specified numbers of times
174 description: 'JUnit expected:<...> but was:<...> format'
179 $ref: "#/components/schemas/Verification"
180 description: request matcher and the number of times to match
182 /mockserver/verifySequence:
186 summary: verify a sequence of request has been received in the specific order
189 description: request sequence has been received in specified order
191 description: incorrect request format
193 description: request sequence has not been received in specified order
198 description: 'JUnit expected:<...> but was:<...> format'
203 $ref: "#/components/schemas/VerificationSequence"
204 description: the sequence of requests matchers
210 summary: return listening ports
213 description: MockServer is running and listening on the listed ports
217 $ref: "#/components/schemas/Ports"
222 summary: bind additional listening ports
223 description: only supported on Netty version
227 listening on additional requested ports, note: the response ony
228 contains ports added for the request, to list all ports use /status
232 $ref: "#/components/schemas/Ports"
234 description: incorrect request format
237 unable to bind to ports (i.e. already bound or JVM process doesn't
243 $ref: "#/components/schemas/Ports"
245 list of ports to bind to, where 0 indicates dynamically bind to any
252 summary: stop running process
253 description: only supported on Netty version
256 description: MockServer process is stopping
260 title: "list of expectations"
262 - $ref: "#/components/schemas/Expectation"
264 additionalProperties: false
266 $ref: "#/components/schemas/Expectation"
270 additionalProperties: false
277 $ref: "#/components/schemas/RequestDefinition"
279 $ref: "#/components/schemas/OpenAPIDefinition"
281 $ref: "#/components/schemas/HttpResponse"
282 httpResponseTemplate:
283 $ref: "#/components/schemas/HttpTemplate"
284 httpResponseClassCallback:
285 $ref: "#/components/schemas/HttpClassCallback"
286 httpResponseObjectCallback:
287 $ref: "#/components/schemas/HttpObjectCallback"
289 $ref: "#/components/schemas/HttpForward"
291 $ref: "#/components/schemas/HttpTemplate"
292 httpForwardClassCallback:
293 $ref: "#/components/schemas/HttpClassCallback"
294 httpForwardObjectCallback:
295 $ref: "#/components/schemas/HttpObjectCallback"
296 httpOverrideForwardedRequest:
297 $ref: "#/components/schemas/HttpOverrideForwardedRequest"
299 $ref: "#/components/schemas/HttpError"
301 $ref: "#/components/schemas/Times"
303 $ref: "#/components/schemas/TimeToLive"
305 title: "pointer to existing expectation"
307 additionalProperties: false
314 title: "list of open api expectations"
316 - $ref: "#/components/schemas/OpenAPIExpectation"
318 additionalProperties: false
320 $ref: "#/components/schemas/OpenAPIExpectation"
322 title: "open api or swagger expectation"
324 additionalProperties: false
330 operationsAndResponses:
332 additionalProperties:
337 title: "request definition"
339 - $ref: "#/components/schemas/HttpRequest"
340 - $ref: "#/components/schemas/OpenAPIDefinition"
342 title: "request properties matcher"
344 additionalProperties: false
351 $ref: "#/components/schemas/StringOrJsonSchema"
353 $ref: "#/components/schemas/StringOrJsonSchema"
355 $ref: "#/components/schemas/KeyToMultiValue"
356 queryStringParameters:
357 $ref: "#/components/schemas/KeyToMultiValue"
359 $ref: "#/components/schemas/Body"
361 $ref: "#/components/schemas/KeyToMultiValue"
363 $ref: "#/components/schemas/KeyToValue"
365 $ref: "#/components/schemas/SocketAddress"
367 $ref: "#/components/schemas/Protocol"
369 title: "open api or swagger request matcher"
371 additionalProperties: false
378 title: "response to return"
380 additionalProperties: false
383 $ref: "#/components/schemas/Delay"
385 $ref: "#/components/schemas/BodyWithContentType"
387 $ref: "#/components/schemas/KeyToValue"
389 $ref: "#/components/schemas/ConnectionOptions"
391 $ref: "#/components/schemas/KeyToMultiValue"
397 title: "template to generate response / request"
399 additionalProperties: false
402 $ref: "#/components/schemas/Delay"
411 title: host and port to forward to
413 additionalProperties: false
416 $ref: "#/components/schemas/Delay"
426 title: class callback
428 additionalProperties: false
431 $ref: "#/components/schemas/Delay"
435 title: object / method callback
437 additionalProperties: false
440 $ref: "#/components/schemas/Delay"
445 HttpOverrideForwardedRequest:
446 title: override forwarded request
449 additionalProperties: false
452 "$ref": "#/components/schemas/Delay"
454 "$ref": "#/components/schemas/HttpRequest"
457 additionalProperties: false
461 additionalProperties: false
467 queryStringParameters:
469 additionalProperties: false
472 "$ref": "#/components/schemas/KeyToMultiValue"
474 "$ref": "#/components/schemas/KeyToMultiValue"
477 additionalProperties: false
482 additionalProperties: false
485 "$ref": "#/components/schemas/KeyToMultiValue"
487 "$ref": "#/components/schemas/KeyToMultiValue"
490 additionalProperties: false
495 additionalProperties: false
498 "$ref": "#/components/schemas/KeyToValue"
500 "$ref": "#/components/schemas/KeyToValue"
503 additionalProperties: false
507 "$ref": "#/components/schemas/HttpResponse"
510 additionalProperties: false
514 additionalProperties: false
517 "$ref": "#/components/schemas/KeyToMultiValue"
519 "$ref": "#/components/schemas/KeyToMultiValue"
522 additionalProperties: false
527 additionalProperties: false
530 "$ref": "#/components/schemas/KeyToValue"
532 "$ref": "#/components/schemas/KeyToValue"
535 additionalProperties: false
539 additionalProperties: false
542 "$ref": "#/components/schemas/Delay"
544 "$ref": "#/components/schemas/HttpRequest"
546 "$ref": "#/components/schemas/HttpResponse"
548 title: error behaviour
550 additionalProperties: false
553 $ref: "#/components/schemas/Delay"
559 title: "number of responses"
561 additionalProperties: false
568 title: "time expectation is valid for"
570 additionalProperties: false
588 additionalProperties: false
591 additionalProperties: false
597 additionalProperties: false
601 additionalProperties: true
610 # "^(?!keyMatchStyle)\\S+$":
613 # additionalProperties: false
615 # $ref: "#/components/schemas/StringOrJsonSchema"
617 # additionalProperties: false
630 # - SPACE_DELIMITED_EXPLODED
632 # - PIPE_DELIMITED_EXPLODED
638 # additionalProperties: false
640 # $ref: "#/components/schemas/StringOrJsonSchema"
644 additionalProperties: false
653 additionalProperties: true
656 # $ref: "#/components/schemas/StringOrJsonSchema"
658 title: string value that can be support nottable, optional or a json schema
662 additionalProperties: false
671 $ref: http://json-schema.org/draft-04/schema
683 - SPACE_DELIMITED_EXPLODED
685 - PIPE_DELIMITED_EXPLODED
689 title: remote address to send request to
691 additionalProperties: false
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
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"
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"
864 description: "binary response body"
865 additionalProperties: false
878 description: "json response body"
879 additionalProperties: false
892 description: "json response body"
893 additionalProperties: true
896 description: "string response body"
897 additionalProperties: false
908 RawStringResponseBody:
910 description: "string response body"
913 description: "xml response body"
914 additionalProperties: false
926 description: "response body"
928 - $ref: "#/components/schemas/BinaryBodyResponse"
929 - $ref: "#/components/schemas/JsonResponseBody"
930 - $ref: "#/components/schemas/RawJsonResponseBody"
931 - $ref: "#/components/schemas/StringResponseBody"
932 - $ref: "#/components/schemas/RawStringResponseBody"
933 - $ref: "#/components/schemas/XmlResponseBody"
935 description: "response delay"
937 additionalProperties: false
944 description: "connection options"
946 additionalProperties: false
948 suppressContentLengthHeader:
950 contentLengthHeaderOverride:
952 suppressConnectionHeader:
961 $ref: "#/components/schemas/Delay"
963 description: "verification"
965 additionalProperties: false
968 $ref: "#/components/schemas/ExpectationId"
970 $ref: "#/components/schemas/RequestDefinition"
972 $ref: "#/components/schemas/VerificationTimes"
973 maximumNumberOfRequestToReturnInVerificationFailure:
976 description: "number of request to verify"
978 additionalProperties: false
984 VerificationSequence:
985 description: "verification sequence"
987 additionalProperties: false
991 additionalProperties: false
993 $ref: "#/components/schemas/ExpectationId"
997 $ref: "#/components/schemas/RequestDefinition"
998 maximumNumberOfRequestToReturnInVerificationFailure:
1001 description: "list of ports"
1003 additionalProperties: false
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list