Class GraphQLBodyDTO
-
Constructor Summary
ConstructorsConstructorDescriptionGraphQLBodyDTO(Body.Type type, Boolean not, Boolean optional, String query, String operationName, String variablesSchema, SelectionSetMatchType selectionSetMatchType, List<String> fields, String schema) Jackson entry point for the one place aGraphQLBodyDTOis deserialised by field type rather than throughBodyDTODeserializer:HttpWebSocketResponseDTO.getGraphqlSubscriptionFilter().GraphQLBodyDTO(GraphQLBody graphQLBody) GraphQLBodyDTO(GraphQLBody graphQLBody, Boolean not) -
Method Summary
Methods inherited from class org.mockserver.serialization.model.BodyDTO
createDTO, getOptional, getType, toString, withOptionalMethods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode
-
Constructor Details
-
GraphQLBodyDTO
-
GraphQLBodyDTO
-
GraphQLBodyDTO
public GraphQLBodyDTO(Body.Type type, Boolean not, Boolean optional, String query, String operationName, String variablesSchema, SelectionSetMatchType selectionSetMatchType, List<String> fields, String schema) Jackson entry point for the one place aGraphQLBodyDTOis deserialised by field type rather than throughBodyDTODeserializer:HttpWebSocketResponseDTO.getGraphqlSubscriptionFilter(). That field is declared as the concrete subtype, so the polymorphic body deserialiser — which is registered againstBodyDTOand matched by exact class — never runs for it, and without a creator Jackson cannot instantiate this all-final type at all.typeis accepted so the"type":"GRAPHQL"discriminator emitted byGraphQLBodyDTOSerializerround-trips, but it is deliberately ignored: the body type is fixed by the class itself. Accepting it explicitly keeps this working regardless of the mapper'sFAIL_ON_UNKNOWN_PROPERTIESsetting.The
@JsonCreatorannotation is intent, not mechanism, and no test guards it. Jackson already treats a constructor whose parameters carry@JsonPropertyas an implicit property-based creator, so deleting the annotation alone leaves every test green — this was confirmed by mutation. What is load-bearing is the CONSTRUCTOR: remove it and control-plane expectations carrying agraphqlSubscriptionFilterare rejected outright. The annotation is kept so the intent survives a future reader, not because anything currently fails without it.
-
-
Method Details
-
getQuery
-
getOperationName
-
getVariablesSchema
-
getSelectionSetMatchType
-
getFields
-
getSchema
-
buildObject
- Specified by:
buildObjectin interfaceDTO<Body<?>>- Specified by:
buildObjectin classBodyDTO
-