Record Class InvalidRequestCase

java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.apionly.transcriberj.spi.InvalidRequestCase
Record Components:
id - readable, unique within its operation and the same on every run
description - one sentence saying what is wrong with the request
in - where the fault is: path, query, header or body
name - the parameter's name, or null when the fault is in the body
pointer - the JSON pointer of the fault in the body, the empty string for the body as a whole, or null when the fault is in a parameter
keyword - the constraint violated, as the contract spells it
request - the complete violating request
expectedStatus - the status the contract declares for an invalid request
expectedContentTypes - every content type that response is declared with; empty when it has no content
responseBodyClass - the simple name of the core class for that response's body, or null when it has none
representative - whether this is the case whose documentation is published
operationId - the operationId of the case's operation, or null when the contract gives it none
declaredQuery - the name of every query parameter the operation declares, whether or not the request carries it, in declaration order
declaredHeaders - the name of every header parameter the operation declares, whether or not the request carries it, in declaration order; without Accept, Content-Type and Authorization, which OpenAPI ignores as parameters
index - its position in the operation's generated CASES

public record InvalidRequestCase(String id, String description, String in, String name, String pointer, String keyword, ContractRequest request, int expectedStatus, List<String> expectedContentTypes, String responseBodyClass, boolean representative, String operationId, List<String> declaredQuery, List<String> declaredHeaders, int index) extends Record
One invalid-request case, as the generated InvalidRequestCase of the same name holds it, and where it is: an emitter that renders cases shapes its code by them, and takes their values from the generated CASES at run time.
  • Constructor Details

    • InvalidRequestCase

      public InvalidRequestCase(String id, String description, String in, String name, String pointer, String keyword, ContractRequest request, int expectedStatus, List<String> expectedContentTypes, String responseBodyClass, boolean representative, String operationId, List<String> declaredQuery, List<String> declaredHeaders, int index)
      A case as given, with the lists copied so that they cannot change.
      Parameters:
      id - its id
      description - what is wrong with the request
      in - where the fault is
      name - the parameter's name, or null
      pointer - the JSON pointer of the fault, or null
      keyword - the constraint violated
      request - the violating request
      expectedStatus - the declared status
      expectedContentTypes - the declared content types
      responseBodyClass - the class of the declared body, or null
      representative - whether its documentation is published
      operationId - its operation's id, or null
      declaredQuery - the query parameters its operation declares
      declaredHeaders - the headers its operation declares
      index - its position in CASES
  • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • in

      public String in()
      Returns the value of the in record component.
      Returns:
      the value of the in record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • pointer

      public String pointer()
      Returns the value of the pointer record component.
      Returns:
      the value of the pointer record component
    • keyword

      public String keyword()
      Returns the value of the keyword record component.
      Returns:
      the value of the keyword record component
    • request

      public ContractRequest request()
      Returns the value of the request record component.
      Returns:
      the value of the request record component
    • expectedStatus

      public int expectedStatus()
      Returns the value of the expectedStatus record component.
      Returns:
      the value of the expectedStatus record component
    • expectedContentTypes

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

      public String responseBodyClass()
      Returns the value of the responseBodyClass record component.
      Returns:
      the value of the responseBodyClass record component
    • representative

      public boolean representative()
      Returns the value of the representative record component.
      Returns:
      the value of the representative record component
    • operationId

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

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

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

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component