
swagger.wiremock-admin-api.json Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wiremock Show documentation
Show all versions of wiremock Show documentation
A web service test double for all occasions
{
"basePath": "/__admin",
"consumes": [
"application/json"
],
"definitions": {
"contentPattern": {
"oneOf": [
{
"description": "String equality",
"properties": {
"caseInsensitive": {
"type": "boolean"
},
"equalTo": {
"type": "string"
}
},
"required": [
"equalTo"
]
},
{
"description": "String contains",
"properties": {
"contains": {
"type": "string"
}
},
"required": [
"contains"
]
},
{
"description": "Regular expression match",
"properties": {
"matches": {
"type": "string"
}
},
"required": [
"matches"
]
},
{
"description": "Negative regular expression match",
"properties": {
"doesNotMatch": {
"type": "string"
}
},
"required": [
"doesNotMatch"
]
},
{
"description": "JSON equality",
"properties": {
"equalToJson": {
"type": "string"
}
},
"required": [
"equalToJson"
]
},
{
"description": "JSONPath match",
"properties": {
"ignoreArrayOrder": {
"type": "boolean"
},
"ignoreExtraElements": {
"type": "boolean"
},
"matchesJsonPath": {
"type": "string"
}
},
"required": [
"matchesJsonPath"
]
},
{
"description": "XML equality",
"properties": {
"equalToXml": {
"type": "string"
}
},
"required": [
"equalToXml"
]
},
{
"description": "XPath match",
"properties": {
"matchesXPath": {
"type": "string"
},
"namespaces": {
"type": "object"
},
"valuePattern": {
"$ref": "#/definitions/#"
}
},
"required": [
"matchesXPath"
]
}
],
"type": "object"
},
"globalSettings": {
"properties": {
"delayDistribution": {
"oneOf": [
{
"description": "Log normal randomly distributed response delay.",
"properties": {
"median": {
"type": "integer"
},
"sigma": {
"type": "number"
},
"type": {
"enum": [
"lognormal"
],
"type": "string"
}
},
"required": [
"type",
"median",
"sigma"
]
},
{
"description": "Uniformly distributed random response delay.",
"properties": {
"lower": {
"type": "integer"
},
"type": {
"enum": [
"uniform"
],
"type": "string"
},
"upper": {
"type": "integer"
}
},
"required": [
"type",
"upper",
"lower"
]
}
],
"type": "object"
},
"fixedDelay": {
"type": "number"
}
},
"type": "object"
},
"loggedRequest": {
"example": {
"absoluteUrl": "http://localhost:56738/received-request/2",
"body": "Hello world",
"cookies": {},
"headers": {
"Connection": "keep-alive",
"Host": "localhost:56738",
"User-Agent": "Apache-HttpClient/4.5.1 (Java/1.7.0_51)"
},
"method": "GET",
"url": "/received-request/2"
},
"properties": {
"absoluteUrl": {
"description": "The full URL to match against",
"type": "string"
},
"body": {
"description": "Body string to match against",
"type": "string"
},
"cookies": {
"description": "Cookie patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"headers": {
"description": "Header patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"method": {
"description": "The HTTP request method e.g. GET",
"type": "string"
},
"url": {
"description": "The path and query to match exactly against",
"type": "string"
}
},
"type": "object"
},
"requestPattern": {
"example": {
"bodyPatterns": [
{
"equalToJson": "{ \"numbers\": [1, 2, 3] }"
}
],
"headers": {
"Content-Type": "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 : { \"\": \"\" } form",
"items": {
"type": "object"
},
"type": "array"
},
"cookies": {
"description": "Cookie patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"headers": {
"description": "Header patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"method": {
"description": "The HTTP request method e.g. GET",
"type": "string"
},
"queryParameters": {
"description": "Query parameter patterns to match against in the : { \"\": \"\" } 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"
},
"scenarios": {
"properties": {
"scenarios": {
"items": {
"properties": {
"id": {
"description": "The scenario ID",
"example": [
"c8d249ec-d86d-48b1-88a8-a660e6848042"
],
"type": "string"
},
"name": {
"description": "The scenario name",
"example": [
"my_scenario"
],
"type": "string"
},
"possibleStates": {
"items": {
"default": "Started",
"description": "All the states this scenario can be in",
"example": [
"Started",
"Step two",
"step_3"
],
"type": "string"
},
"type": "array"
},
"state": {
"default": "Started",
"description": "The current state of this scenario",
"example": [
"Started",
"Step two",
"step_3"
],
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"snapshot": {
"allOf": [
{
"properties": {
"captureHeaders": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"caseInsensitive": {
"type": "boolean"
}
},
"type": "object"
},
"description": "Headers from the request to include in the generated stub mappings, mapped to parameter objects. The only parameter available is \"caseInsensitive\", which defaults to false",
"example": [
{
"Accept": {}
},
{
"Accept": {},
"Content-Type": {
"caseInsensitive": true
}
}
],
"type": "object"
},
"extractBodyCriteria": {
"description": "Criteria for extracting response bodies to a separate file instead of including it in the stub mapping",
"example": [
{
"binarySizeThreshold": "1 Mb",
"textSizeThreshold": "2 kb"
}
],
"properties": {
"binarySizeThreshold": {
"default": "0",
"description": "Size threshold for extracting binary response bodies. Default unit is bytes",
"example": [
"56 kb",
"10 Mb",
"18.2 GB",
"255"
],
"type": "string"
},
"textSizeThreshold": {
"default": "0",
"description": "Size threshold for extracting text response bodies. Default unit is bytes",
"example": [
"56 kb",
"10 Mb",
"18.2 GB",
"255"
],
"type": "string"
}
},
"type": "object"
},
"filters": {
"properties": {
"allowNonProxied": {
"description": "If true, also record requests that were *not* proxied to another URL.",
"type": "boolean"
},
"filters": {
"$ref": "#/definitions/#/allOf/1/properties/filters/allOf/1",
"description": "If set, only record requests matching this pattern"
},
"ids": {
"description": "The UUIDs of the exact requests to be recorded (only of practical use when snapshot recording).",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"persist": {
"default": true,
"description": "Whether to save stub mappings to the file system or just return them",
"type": "boolean"
},
"repeatsAsScenarios": {
"default": true,
"description": "When true, duplicate requests will be added to a Scenario. When false, duplicates are discarded",
"type": "boolean"
},
"requestBodyPattern": {
"$ref": "#/definitions/#/allOf/0/properties/requestBodyPattern/oneOf/7/properties/valuePattern",
"description": "Control the request body matcher used in generated stub mappings"
},
"targetBaseUrl": {
"description": "The base URL of the target API to be recorded.",
"type": "string"
},
"transformerParameters": {
"description": "List of names of stub mappings transformers to apply to generated stubs",
"type": "object"
},
"transformers": {
"description": "Parameters to pass to stub mapping transformers",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
{
"properties": {
"filters": {
"allOf": [
{
"properties": {
"ids": {
"items": {
"type": "string"
},
"type": "array"
}
}
},
{
"example": {
"bodyPatterns": [
{
"equalToJson": "{ \"numbers\": [1, 2, 3] }"
}
],
"headers": {
"Content-Type": "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 : { \"\": \"\" } form",
"items": {
"type": "object"
},
"type": "array"
},
"cookies": {
"description": "Cookie patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"headers": {
"description": "Header patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"method": {
"description": "The HTTP request method e.g. GET",
"type": "string"
},
"queryParameters": {
"description": "Query parameter patterns to match against in the : { \"\": \"\" } 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"
}
],
"description": "Filter requests for which to create stub mapping",
"type": "object"
}
}
}
],
"type": "object"
},
"startRecording": {
"allOf": [
{
"properties": {
"captureHeaders": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"caseInsensitive": {
"type": "boolean"
}
},
"type": "object"
},
"description": "Headers from the request to include in the generated stub mappings, mapped to parameter objects. The only parameter available is \"caseInsensitive\", which defaults to false",
"example": [
{
"Accept": {}
},
{
"Accept": {},
"Content-Type": {
"caseInsensitive": true
}
}
],
"type": "object"
},
"extractBodyCriteria": {
"description": "Criteria for extracting response bodies to a separate file instead of including it in the stub mapping",
"example": [
{
"binarySizeThreshold": "1 Mb",
"textSizeThreshold": "2 kb"
}
],
"properties": {
"binarySizeThreshold": {
"default": "0",
"description": "Size threshold for extracting binary response bodies. Default unit is bytes",
"example": [
"56 kb",
"10 Mb",
"18.2 GB",
"255"
],
"type": "string"
},
"textSizeThreshold": {
"default": "0",
"description": "Size threshold for extracting text response bodies. Default unit is bytes",
"example": [
"56 kb",
"10 Mb",
"18.2 GB",
"255"
],
"type": "string"
}
},
"type": "object"
},
"filters": {
"properties": {
"allowNonProxied": {
"description": "If true, also record requests that were *not* proxied to another URL.",
"type": "boolean"
},
"filters": {
"$ref": "#/definitions/#/allOf/1/properties/filters",
"description": "If set, only record requests matching this pattern"
},
"ids": {
"description": "The UUIDs of the exact requests to be recorded (only of practical use when snapshot recording).",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"persist": {
"default": true,
"description": "Whether to save stub mappings to the file system or just return them",
"type": "boolean"
},
"repeatsAsScenarios": {
"default": true,
"description": "When true, duplicate requests will be added to a Scenario. When false, duplicates are discarded",
"type": "boolean"
},
"requestBodyPattern": {
"$ref": "#/definitions/#/allOf/0/properties/requestBodyPattern/oneOf/7/properties/valuePattern",
"description": "Control the request body matcher used in generated stub mappings"
},
"targetBaseUrl": {
"description": "The base URL of the target API to be recorded.",
"type": "string"
},
"transformerParameters": {
"description": "List of names of stub mappings transformers to apply to generated stubs",
"type": "object"
},
"transformers": {
"description": "Parameters to pass to stub mapping transformers",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
{
"properties": {
"filters": {
"description": "Filter requests for which to create stub mapping",
"example": {
"bodyPatterns": [
{
"equalToJson": "{ \"numbers\": [1, 2, 3] }"
}
],
"headers": {
"Content-Type": "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 : { \"\": \"\" } form",
"items": {
"type": "object"
},
"type": "array"
},
"cookies": {
"description": "Cookie patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"headers": {
"description": "Header patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"method": {
"description": "The HTTP request method e.g. GET",
"type": "string"
},
"queryParameters": {
"description": "Query parameter patterns to match against in the : { \"\": \"\" } 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"
},
"targetBaseUrl": {
"description": "Target URL when using the record and playback API",
"example": [
"http://example.mocklab.io"
],
"type": "string"
}
},
"type": "object"
}
],
"type": "object"
},
"stubMapping": {
"example": {
"id": "76ada7b0-49ae-4229-91c4-396a36f18e09",
"priority": 3,
"request": {
"headers": {
"Accept": "text/plain"
},
"method": "GET",
"url": "/some/thing"
},
"response": {
"body": "Hello world!",
"headers": {
"Content-Type": "text/plain"
},
"status": 200
}
},
"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"
},
"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": "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 : { \"\": \"\" } form",
"items": {
"type": "object"
},
"type": "array"
},
"cookies": {
"description": "Cookie patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"headers": {
"description": "Header patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"method": {
"description": "The HTTP request method e.g. GET",
"type": "string"
},
"queryParameters": {
"description": "Query parameter patterns to match against in the : { \"\": \"\" } 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": {
"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": "Random delay settings.",
"oneOf": [
{
"description": "Log normal randomly distributed response delay.",
"properties": {
"median": {
"type": "integer"
},
"sigma": {
"type": "number"
},
"type": {
"enum": [
"lognormal"
],
"type": "string"
}
},
"required": [
"type",
"median",
"sigma"
]
},
{
"description": "Uniformly distributed random response delay.",
"properties": {
"lower": {
"type": "integer"
},
"type": {
"enum": [
"uniform"
],
"type": "string"
},
"upper": {
"type": "integer"
}
},
"required": [
"type",
"upper",
"lower"
]
}
],
"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"
}
},
"type": "object"
},
"stubMappings": {
"properties": {
"mappings": {
"example": {
"id": "76ada7b0-49ae-4229-91c4-396a36f18e09",
"priority": 3,
"request": {
"headers": {
"Accept": "text/plain"
},
"method": "GET",
"url": "/some/thing"
},
"response": {
"body": "Hello world!",
"headers": {
"Content-Type": "text/plain"
},
"status": 200
}
},
"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"
},
"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": "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 : { \"\": \"\" } form",
"items": {
"type": "object"
},
"type": "array"
},
"cookies": {
"description": "Cookie patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"headers": {
"description": "Header patterns to match against in the : { \"\": \"\" } form",
"type": "object"
},
"method": {
"description": "The HTTP request method e.g. GET",
"type": "string"
},
"queryParameters": {
"description": "Query parameter patterns to match against in the : { \"\": \"\" } 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": {
"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": "Random delay settings.",
"oneOf": [
{
"description": "Log normal randomly distributed response delay.",
"properties": {
"median": {
"type": "integer"
},
"sigma": {
"type": "number"
},
"type": {
"enum": [
"lognormal"
],
"type": "string"
}
},
"required": [
"type",
"median",
"sigma"
]
},
{
"description": "Uniformly distributed random response delay.",
"properties": {
"lower": {
"type": "integer"
},
"type": {
"enum": [
"uniform"
],
"type": "string"
},
"upper": {
"type": "integer"
}
},
"required": [
"type",
"upper",
"lower"
]
}
],
"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"
}
},
"type": "object"
},
"meta": {
"properties": {
"total": {
"type": "integer"
}
},
"required": [
"total"
],
"type": "object"
}
},
"type": "object"
}
},
"host": "",
"info": {
"title": "WireMock",
"version": "2.20.0"
},
"paths": {
"/mappings": {
"delete": {
"description": "Delete all stub mappings",
"responses": {
"200": {
"description": "Successfully deleted"
}
}
},
"get": {
"description": "Get all stub mappings",
"parameters": [
{
"description": "The maximum number of results to return",
"in": "query",
"name": "limit",
"required": false,
"type": "number"
},
{
"description": "The start index of the results to return",
"in": "query",
"name": "offset",
"required": false,
"type": "number"
}
],
"responses": {
"200": {
"description": "All stub mappings",
"schema": {
"$ref": "#/definitions/stubMappings"
}
}
}
},
"post": {
"description": "Create a new stub mapping",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/stubMapping"
}
}
],
"responses": {
"201": {
"description": "Successfully created",
"schema": {
"$ref": "#/definitions/stubMapping"
}
}
}
}
},
"/mappings/find-by-metadata": {
"post": {
"description": "Find stubs by matching on their metadata",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/contentPattern"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/mappings/remove-by-metadata": {
"post": {
"description": "Remove stubs by matching on their metadata",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/contentPattern"
}
}
],
"responses": {
"200": {
"description": "The stub mappings were successfully removed"
}
}
}
},
"/mappings/reset": {
"post": {
"description": "Reset stub mappings (restore to defaults defined back the backing store)",
"responses": {
"200": {
"description": "Successfully reset"
}
}
}
},
"/mappings/save": {
"post": {
"description": "Save all persistent stub mappings to the backing store",
"responses": {
"200": {
"description": "Successfully removed"
}
}
}
},
"/mappings/{stubMappingId}": {
"delete": {
"description": "Delete a stub mapping",
"parameters": [
{
"description": "The UUID of stub mapping",
"in": "path",
"name": "stubMappingId",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
},
"get": {
"description": "Get a single stub mapping",
"parameters": [
{
"description": "The UUID of stub mapping",
"in": "path",
"name": "stubMappingId",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/stubMapping"
}
}
}
},
"put": {
"description": "Update an existing stub mapping",
"parameters": [
{
"description": "The UUID of stub mapping",
"in": "path",
"name": "stubMappingId",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/stubMapping"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/stubMapping"
}
}
}
}
},
"/near-misses/request": {
"post": {
"description": "Find at most 3 near misses for closest stub mappings to the specified request",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loggedRequest"
}
}
],
"responses": {
"200": {
"description": "Near misses matching criteria"
}
}
}
},
"/near-misses/request-pattern": {
"post": {
"description": "Find at most 3 near misses for closest logged requests to the specified request pattern",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requestPattern"
}
}
],
"responses": {
"200": {
"description": "Near misses matching criteria"
}
}
}
},
"/recordings/snapshot": {
"post": {
"description": "Take a snapshot recording",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/snapshot"
}
}
],
"responses": {
"200": {
"description": "Successfully took a snapshot recording",
"schema": {
"$ref": "#/definitions/stubMappings"
}
}
}
}
},
"/recordings/start": {
"post": {
"description": "Start recording stub mappings",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/startRecording"
}
}
],
"responses": {
"200": {
"description": "Successfully started recording"
}
}
}
},
"/recordings/status": {
"get": {
"description": "Get the recording status (started or stopped)",
"responses": {
"200": {
"description": "Successfully got the record status"
}
}
}
},
"/recordings/stop": {
"post": {
"description": "Stop recording stub mappings",
"responses": {
"200": {
"description": "Successfully started recording",
"schema": {
"$ref": "#/definitions/stubMappings"
}
}
}
}
},
"/requests": {
"delete": {
"description": "Delete all received requests",
"responses": {
"200": {
"description": "Successfully deleted"
}
}
},
"get": {
"description": "Get received requests",
"parameters": [
{
"description": "The maximum number of results to return",
"in": "query",
"name": "limit",
"type": "string"
},
{
"description": "Only return logged requests after this date",
"in": "query",
"name": "since",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/requests/count": {
"post": {
"description": "Count requests logged in the journal matching the specified criteria",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requestPattern"
}
}
],
"responses": {
"200": {
"description": "Number of matching requests"
}
}
}
},
"/requests/find": {
"post": {
"description": "Retrieve details of requests logged in the journal matching the specified criteria",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/requestPattern"
}
}
],
"responses": {
"200": {
"description": "Matching request details"
}
}
}
},
"/requests/reset": {
"post": {
"description": "Empty the request journal",
"responses": {
"200": {
"description": "Successfully reset"
}
}
}
},
"/requests/unmatched": {
"get": {
"description": "Get details of logged requests that weren't matched by any stub mapping",
"responses": {
"200": {
"description": "Unmatched request details"
}
}
}
},
"/requests/unmatched/near-misses": {
"get": {
"description": "Retrieve near-misses for all unmatched requests",
"responses": {
"200": {
"description": "Top 3 (at most) near misses for each unmatched request"
}
}
}
},
"/requests/{requestId}": {
"get": {
"parameters": [
{
"description": "The UUID of the logged request",
"in": "path",
"name": "requestId",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/reset": {
"post": {
"description": "Reset mappings to the default set and reset the request journal",
"responses": {
"200": {
"description": "Successfully reset"
}
}
}
},
"/scenarios": {
"get": {
"description": "Get all scenarios",
"responses": {
"200": {
"description": "All scenarios",
"schema": {
"$ref": "#/definitions/scenarios"
}
}
}
}
},
"/scenarios/reset": {
"post": {
"description": "Reset the state of all scenarios",
"responses": {
"200": {
"description": "Successfully reset"
}
}
}
},
"/settings": {
"post": {
"description": "Update global settings",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/globalSettings"
}
}
],
"responses": {
"200": {
"description": "Settings successfully updated"
}
}
}
},
"/shutdown": {
"post": {
"description": "Shutdown the WireMock server",
"responses": {
"200": {
"description": "Server will be shut down"
}
}
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https",
"http"
],
"securityDefinitions": {},
"swagger": "2.0"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy