contract

run an OpenAPI spec as a contract test against a live service

Runs each operation of an OpenAPI specification against a live service and validates that the actual responses conform to the spec. Supply the spec as a URL, file path or inline JSON/YAML ("spec", or its alias "specUrlOrPayload"), the base URL of the service under test ("baseUrl"), and optionally a single "operationId" to restrict the run. The target host is subject to the SSRF policy (forwardProxyBlockPrivateNetworks). Returns a per-operation pass/fail report.

put/mockserver/contractTest

Request

  • Base URL: http://localhost:1080
  • URL: http://localhost:1080/mockserver/contractTest
  • Auth: none declared

Request body

specstring required

the OpenAPI spec as a URL, file path, or inline JSON/YAML (alias: specUrlOrPayload)

specUrlOrPayloadstring

alias for spec

baseUrlstring required

base URL of the live service under test; any path prefix is prepended to each operation path

operationIdstring

optional — restrict the run to a single operation; when absent all operations are tested

Response

contract test completed (inspect allPassed and per-operation results)

baseUrlstring
totalOperationsinteger
passedinteger
failedinteger
allPassedboolean

Changes

No recorded changes to this operation across all 1 revision of this API.