openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 123 kB
JSON
{"openapi":"3.0.0","servers":[{"url":"/"}],"info":{"title":"WireMock","version":"2.35.0","x-apisguru-categories":["developer_tools"],"x-origin":[{"format":"openapi","url":"http://wiremock.org/assets/js/wiremock-admin-api.json","version":"3.0"}],"x-providerName":"wiremock.org","x-serviceName":"admin"},"externalDocs":{"description":"WireMock user documentation","url":"http://wiremock.org/docs/"},"tags":[{"description":"Operations on stub mappings","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/stubbing/"},"name":"Stub Mappings"},{"description":"Logged requests and responses received by the mock service","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/verifying/"},"name":"Requests"},{"description":"Near misses allow querying of received requests or request patterns according to similarity","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/verifying/#near-misses"},"name":"Near Misses"},{"description":"Stub mapping record and snapshot functions","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/record-playback/"},"name":"Recordings"},{"description":"Scenarios support modelling of stateful behaviour","externalDocs":{"description":"User documentation","url":"http://wiremock.org/docs/stateful-behaviour/"},"name":"Scenarios"},{"description":"Global operations","name":"System"}],"paths":{"/__admin/mappings":{"delete":{"responses":{"200":{"description":"Successfully deleted"}},"summary":"Delete all stub mappings","tags":["Stub Mappings"]},"get":{"parameters":[{"description":"The maximum number of results to return","example":10,"in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"The start index of the results to return","example":0,"in":"query","name":"offset","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"mappings":[{"id":"76ada7b0-49ae-4229-91c4-396a36f18e09","request":{"headers":{"Accept":{"equalTo":"application/json"}},"method":"GET","url":"/search?q=things"},"response":{"headers":{"Content-Type":"application/json"},"jsonBody":["thing1","thing2"],"status":200},"uuid":"76ada7b0-49ae-4229-91c4-396a36f18e09"},{"request":{"bodyPatterns":[{"equalToXml":"<stuff />"}],"method":"POST","urlPath":"/some/things"},"response":{"status":201}}],"meta":{"total":2}},"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"},"type":"array"},"meta":{"properties":{"total":{"example":4,"type":"integer"}},"required":["total"],"type":"object"}},"type":"object"}}},"description":"All stub mappings"}},"summary":"Get all stub mappings","tags":["Stub Mappings"]},"post":{"requestBody":{"content":{"application/json":{"example":{"request":{"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"example":{"id":"76ada7b0-49ae-4229-91c4-396a36f18e09","priority":3,"request":{"headers":{"Accept":{"equalTo":"text/plain"}},"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}},"description":"The stub mapping"}},"summary":"Create a new stub mapping","tags":["Stub Mappings"]}},"/__admin/mappings/find-by-metadata":{"post":{"description":"Find stubs by matching on their metadata","requestBody":{"content":{"application/json":{"example":{"matchesJsonPath":{"equalToJson":"{ \"inner\": 42 }","expression":"$.outer"}},"schema":{"oneOf":[{"properties":{"caseInsensitive":{"type":"boolean"},"equalTo":{"type":"boolean"}},"required":["equalTo"],"title":"String equals","type":"object"},{"properties":{"contains":{"type":"string"}},"required":["contains"],"title":"String contains","type":"object"},{"properties":{"matches":{"type":"string"}},"required":["matches"],"title":"Regular expression match","type":"object"},{"properties":{"doesNotMatch":{"type":"string"}},"required":["doesNotMatch"],"title":"Negative regular expression match","type":"object"},{"properties":{"equalToJson":{"type":"string"}},"required":["equalToJson"],"title":"JSON equals","type":"object"},{"properties":{"ignoreArrayOrder":{"type":"boolean"},"ignoreExtraElements":{"type":"boolean"},"matchesJsonPath":{"type":"string"}},"required":["matchesJsonPath"],"title":"JSONPath match","type":"object"},{"properties":{"equalToXml":{"type":"string"}},"required":["equalToXml"],"title":"XML equality","type":"object"},{"properties":{"matchesXpath":{"type":"string"},"namespaces":{"type":"object"},"valuePattern":{"type":"object"}},"required":["matchesXpath"],"title":"XPath match","type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"mappings":[{"id":"76ada7b0-49ae-4229-91c4-396a36f18e09","request":{"headers":{"Accept":{"equalTo":"application/json"}},"method":"GET","url":"/search?q=things"},"response":{"headers":{"Content-Type":"application/json"},"jsonBody":["thing1","thing2"],"status":200},"uuid":"76ada7b0-49ae-4229-91c4-396a36f18e09"},{"request":{"bodyPatterns":[{"equalToXml":"<stuff />"}],"method":"POST","urlPath":"/some/things"},"response":{"status":201}}],"meta":{"total":2}},"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"},"type":"array"},"meta":{"properties":{"total":{"example":4,"type":"integer"}},"required":["total"],"type":"object"}},"type":"object"}}},"description":"Matched stub mappings"}},"tags":["Stub Mappings"]}},"/__admin/mappings/import":{"post":{"description":"Import given stub mappings to the backing store","responses":{"200":{"description":"Successfully imported"}},"summary":"Import stub mappings","tags":["Stub Mappings"]}},"/__admin/mappings/remove-by-metadata":{"post":{"requestBody":{"content":{"application/json":{"example":{"matchesJsonPath":{"equalToJson":"{ \"inner\": 42 }","expression":"$.outer"}},"schema":{"oneOf":[{"properties":{"caseInsensitive":{"type":"boolean"},"equalTo":{"type":"boolean"}},"required":["equalTo"],"title":"String equals","type":"object"},{"properties":{"contains":{"type":"string"}},"required":["contains"],"title":"String contains","type":"object"},{"properties":{"matches":{"type":"string"}},"required":["matches"],"title":"Regular expression match","type":"object"},{"properties":{"doesNotMatch":{"type":"string"}},"required":["doesNotMatch"],"title":"Negative regular expression match","type":"object"},{"properties":{"equalToJson":{"type":"string"}},"required":["equalToJson"],"title":"JSON equals","type":"object"},{"properties":{"ignoreArrayOrder":{"type":"boolean"},"ignoreExtraElements":{"type":"boolean"},"matchesJsonPath":{"type":"string"}},"required":["matchesJsonPath"],"title":"JSONPath match","type":"object"},{"properties":{"equalToXml":{"type":"string"}},"required":["equalToXml"],"title":"XML equality","type":"object"},{"properties":{"matchesXpath":{"type":"string"},"namespaces":{"type":"object"},"valuePattern":{"type":"object"}},"required":["matchesXpath"],"title":"XPath match","type":"object"}]}}}},"responses":{"200":{"description":"The stub mappings were successfully removed"}},"summary":"Delete stub mappings matching metadata","tags":["Stub Mappings"]}},"/__admin/mappings/reset":{"post":{"description":"Restores stub mappings to the defaults defined back in the backing store","responses":{"200":{"description":"Successfully reset"}},"summary":"Reset stub mappings","tags":["Stub Mappings"]}},"/__admin/mappings/save":{"post":{"description":"Save all persistent stub mappings to the backing store","responses":{"200":{"description":"Successfully saved"}},"summary":"Persist stub mappings","tags":["Stub Mappings"]}},"/__admin/mappings/{stubMappingId}":{"delete":{"responses":{"200":{"description":"OK"},"404":{"description":"Stub mapping not found"}},"summary":"Delete a stub mapping","tags":["Stub Mappings"]},"get":{"responses":{"200":{"content":{"application/json":{"example":{"id":"76ada7b0-49ae-4229-91c4-396a36f18e09","priority":3,"request":{"headers":{"Accept":{"equalTo":"text/plain"}},"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}},"description":"The stub mapping"},"404":{"description":"Stub mapping not found"}},"summary":"Get stub mapping by ID","tags":["Stub Mappings"]},"parameters":[{"description":"The UUID of stub mapping","example":"730d3e32-d098-4169-a20c-554c3bedce58","in":"path","name":"stubMappingId","required":true,"schema":{"type":"string"}}],"put":{"requestBody":{"content":{"application/json":{"example":{"request":{"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"id":"76ada7b0-49ae-4229-91c4-396a36f18e09","priority":3,"request":{"headers":{"Accept":{"equalTo":"text/plain"}},"method":"GET","url":"/some/thing"},"response":{"body":"Hello world!","headers":{"Content-Type":"text/plain"},"status":200}},"schema":{"additionalProperties":false,"properties":{"id":{"description":"This stub mapping's unique identifier","type":"string"},"metadata":{"description":"Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.","type":"object"},"name":{"description":"The stub mapping's name","type":"string"},"newScenarioState":{"description":"The new state for the scenario to be updated to after this stub is served.","type":"string"},"persistent":{"description":"Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.","type":"boolean"},"postServeActions":{"description":"A map of the names of post serve action extensions to trigger and their parameters.","type":"object"},"priority":{"description":"This stub mapping's priority relative to others. 1 is highest.","minimum":1,"type":"integer"},"request":{"example":{"bodyPatterns":[{"equalToJson":"{ \"numbers\": [1, 2, 3] }"}],"headers":{"Content-Type":{"equalTo":"application/json"}},"method":"POST","url":"/some/thing"},"properties":{"basicAuthCredentials":{"description":"Pre-emptive basic auth credentials to match against","properties":{"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"},"bodyPatterns":{"description":"Request body patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","items":{"type":"object"},"type":"array"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"method":{"description":"The HTTP request method e.g. GET","type":"string"},"queryParameters":{"description":"Query parameter patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","type":"object"},"url":{"description":"The path and query to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPath":{"description":"The path to match exactly against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPathPattern":{"description":"The path regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"},"urlPattern":{"description":"The path and query regex to match against. Only one of url, urlPattern, urlPath or urlPathPattern may be specified.","type":"string"}},"type":"object"},"requiredScenarioState":{"description":"The required state of the scenario in order for this stub to be matched.","type":"string"},"response":{"allOf":[{"properties":{"additionalProxyRequestHeaders":{"description":"Extra request headers to send when proxying to another host.","type":"object"},"base64Body":{"description":"The response body as a base64 encoded string (useful for binary content). Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"body":{"description":"The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"bodyFileName":{"description":"The path to the file containing the response body, relative to the configured file root. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"string"},"delayDistribution":{"description":"The delay distribution. Valid property configuration is either median/sigma/type or lower/type/upper.","oneOf":[{"description":"Log normal randomly distributed response delay.","properties":{"median":{"type":"integer"},"sigma":{"type":"number"},"type":{"enum":["lognormal"],"type":"string"}},"title":"Log normal","type":"object"},{"description":"Uniformly distributed random response delay.","properties":{"lower":{"type":"integer"},"type":{"enum":["uniform"],"type":"string"},"upper":{"type":"integer"}},"title":"Uniform","type":"object"}]},"fault":{"description":"The fault to apply (instead of a full, valid response).","enum":["CONNECTION_RESET_BY_PEER","EMPTY_RESPONSE","MALFORMED_RESPONSE_CHUNK","RANDOM_DATA_THEN_CLOSE"],"type":"string"},"fixedDelayMilliseconds":{"description":"Number of milliseconds to delay be before sending the response.","type":"integer"},"fromConfiguredStub":{"description":"Read-only flag indicating false if this was the default, unmatched response. Not present otherwise.","type":"boolean"},"headers":{"description":"Map of response headers to send","type":"object"},"jsonBody":{"description":"The response body as a JSON object. Only one of body, base64Body, jsonBody or bodyFileName may be specified.","type":"object"},"proxyBaseUrl":{"description":"The base URL of the target to proxy matching requests to.","type":"string"},"status":{"description":"The HTTP status code to be returned","type":"integer"},"statusMessage":{"description":"The HTTP status message to be returned","type":"string"},"transformerParameters":{"description":"Parameters to apply to response transformers.","type":"object"},"transformers":{"description":"List of names of transformers to apply to this response.","items":{"type":"string"},"type":"array"}},"type":"object"}]},"scenarioName":{"description":"The name of the scenario that this stub mapping is part of","type":"string"},"uuid":{"description":"Alias for the id","type":"string"}},"type":"object"}}},"description":"The stub mapping"},"404":{"description":"Stub mapping not found"}},"summary":"Update a stub mapping","tags":["Stub Mappings"]}},"/__admin/near-misses/request":{"post":{"description":"Find at most 3 near misses for closest stub mappings to the specified request","requestBody":{"content":{"application/json":{"example":{"absoluteUrl":"http://localhost:8080/actual","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"0:0:0:0:0:0:0:1","cookies":{},"headers":{"Accept":"*/*","Host":"localhost:8080","User-Agent":"curl/7.30.0"},"loggedDate":1467402464520,"loggedDateString":"2025-06-15T13:48:49.549Z","method":"GET","url":"/actual"},"schema":{"properties":{"absoluteUrl":{"description":"The full URL to match against","example":"http://localhost:56738/received-request/2","type":"string"},"body":{"description":"Body string to match against","example":"Hello world","type":"string"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{},"type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"type":"object"},"method":{"description":"The HTTP request method","example":"GET","type":"string"},"url":{"description":"The path and query to match exactly against","example":"/received-request/2","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"nearMisses":[{"matchResult":{"distance":0.06944444444444445},"request":{"absoluteUrl":"http://localhost:8080/nomatch","body":"","bodyAsBase64":"","browserProxyRequest":false,"clientIp":"0:0:0:0:0:0:0:1","cookies":{},"headers":{"Accept":"*/*","Host":"localhost:8080","User-Agent":"curl/7.30.0"},"loggedDate":1467402464520,"loggedDateString":"2025-06-15T13:48:49.549Z","method":"GET","url":"/nomatch"},"requestPattern":{"method":"GET","url":"/almostmatch"}}]},"schema":{"properties":{"nearMisses":{"items":{"properties":{"absoluteUrl":{"description":"The full URL to match against","example":"http://localhost:56738/received-request/2","type":"string"},"body":{"description":"Body string to match against","example":"Hello world","type":"string"},"cookies":{"description":"Cookie patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{},"type":"object"},"headers":{"description":"Header patterns to match against in the <key>: { \"<predicate>\": \"<value>\" } form","example":{"Connection":"keep-alive","Host":"localhost:56738","User-Agent":"Apache-HttpClient/4.5.1 (Java/1.7.0_51)"},"type":"object"},"method":{"description":"The HTTP request method","example":"GET","type":"str