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 rundescription- one sentence saying what is wrong with the requestin- where the fault is:path,query,headerorbodyname- the parameter's name, or null when the fault is in the bodypointer- 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 parameterkeyword- the constraint violated, as the contract spells itrequest- the complete violating requestexpectedStatus- the status the contract declares for an invalid requestexpectedContentTypes- every content type that response is declared with; empty when it has no contentresponseBodyClass- the simple name of the core class for that response's body, or null when it has nonerepresentative- whether this is the case whose documentation is publishedoperationId- theoperationIdof the case's operation, or null when the contract gives it nonedeclaredQuery- the name of every query parameter the operation declares, whether or not the request carries it, in declaration orderdeclaredHeaders- the name of every header parameter the operation declares, whether or not the request carries it, in declaration order; withoutAccept,Content-TypeandAuthorization, which OpenAPI ignores as parametersindex- its position in the operation's generatedCASES
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 Summary
ConstructorsConstructorDescriptionInvalidRequestCase(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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeclaredHeadersrecord component.Returns the value of thedeclaredQueryrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpectedContentTypesrecord component.intReturns the value of theexpectedStatusrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.in()Returns the value of theinrecord component.intindex()Returns the value of theindexrecord component.keyword()Returns the value of thekeywordrecord component.name()Returns the value of thenamerecord component.Returns the value of theoperationIdrecord component.pointer()Returns the value of thepointerrecord component.booleanReturns the value of therepresentativerecord component.request()Returns the value of therequestrecord component.Returns the value of theresponseBodyClassrecord component.final StringtoString()Returns a string representation of this record class.
-
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 iddescription- what is wrong with the requestin- where the fault isname- the parameter's name, or nullpointer- the JSON pointer of the fault, or nullkeyword- the constraint violatedrequest- the violating requestexpectedStatus- the declared statusexpectedContentTypes- the declared content typesresponseBodyClass- the class of the declared body, or nullrepresentative- whether its documentation is publishedoperationId- its operation's id, or nulldeclaredQuery- the query parameters its operation declaresdeclaredHeaders- the headers its operation declaresindex- its position inCASES
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
in
Returns the value of theinrecord component.- Returns:
- the value of the
inrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
pointer
Returns the value of thepointerrecord component.- Returns:
- the value of the
pointerrecord component
-
keyword
Returns the value of thekeywordrecord component.- Returns:
- the value of the
keywordrecord component
-
request
Returns the value of therequestrecord component.- Returns:
- the value of the
requestrecord component
-
expectedStatus
public int expectedStatus()Returns the value of theexpectedStatusrecord component.- Returns:
- the value of the
expectedStatusrecord component
-
expectedContentTypes
Returns the value of theexpectedContentTypesrecord component.- Returns:
- the value of the
expectedContentTypesrecord component
-
responseBodyClass
Returns the value of theresponseBodyClassrecord component.- Returns:
- the value of the
responseBodyClassrecord component
-
representative
public boolean representative()Returns the value of therepresentativerecord component.- Returns:
- the value of the
representativerecord component
-
operationId
Returns the value of theoperationIdrecord component.- Returns:
- the value of the
operationIdrecord component
-
declaredQuery
Returns the value of thedeclaredQueryrecord component.- Returns:
- the value of the
declaredQueryrecord component
-
declaredHeaders
Returns the value of thedeclaredHeadersrecord component.- Returns:
- the value of the
declaredHeadersrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-