Record Class MockServerClient.ContractResult

java.lang.Object
java.lang.Record
org.mockserver.client.MockServerClient.ContractResult
Record Components:
operationId - the OpenAPI operationId exercised (contract test), or null
method - the HTTP method
path - the request path
matchedOperation - the METHOD /path spec operation matched (traffic validation), or null
statusCode - the HTTP status code received (contract test), or 0 when not applicable
passed - whether the request and response conformed to the spec
requestErrors - request-side validation errors (empty when none)
responseErrors - response-side validation errors (empty when none)
Enclosing class:
MockServerClient

public static record MockServerClient.ContractResult(String operationId, String method, String path, String matchedOperation, int statusCode, boolean passed, List<String> requestErrors, List<String> responseErrors) extends Record
Result of validating a single operation/request against an OpenAPI specification.
  • Constructor Details

    • ContractResult

      public ContractResult(String operationId, String method, String path, String matchedOperation, int statusCode, boolean passed, List<String> requestErrors, List<String> responseErrors)
      Creates an instance of a ContractResult record class.
      Parameters:
      operationId - the value for the operationId record component
      method - the value for the method record component
      path - the value for the path record component
      matchedOperation - the value for the matchedOperation record component
      statusCode - the value for the statusCode record component
      passed - the value for the passed record component
      requestErrors - the value for the requestErrors record component
      responseErrors - the value for the responseErrors record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • operationId

      public String operationId()
      Returns the value of the operationId record component.
      Returns:
      the value of the operationId record component
    • method

      public String method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • matchedOperation

      public String matchedOperation()
      Returns the value of the matchedOperation record component.
      Returns:
      the value of the matchedOperation record component
    • statusCode

      public int statusCode()
      Returns the value of the statusCode record component.
      Returns:
      the value of the statusCode record component
    • passed

      public boolean passed()
      Returns the value of the passed record component.
      Returns:
      the value of the passed record component
    • requestErrors

      public List<String> requestErrors()
      Returns the value of the requestErrors record component.
      Returns:
      the value of the requestErrors record component
    • responseErrors

      public List<String> responseErrors()
      Returns the value of the responseErrors record component.
      Returns:
      the value of the responseErrors record component