Class ResponseNormalizer
java.lang.Object
com.shaft.capture.generate.api.ResponseNormalizer
Classifies each scalar leaf of a recorded JSON response body as
LeafClassification.STABLE,
LeafClassification.VOLATILE, or LeafClassification.SENSITIVE, reusing the exact
same key/value volatility and sensitivity detection HttpContractRecorder uses for HTTP
contract normalization, so API codegen and contract capture agree on what counts as noise vs. a
stable, assertable value.
LeafClassification.CORRELATED is never assigned here -- TransactionCorrelator
upgrades a subset of VOLATILE leaves to CORRELATED after finding that a later
request in the same session actually reuses their value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<ResponseLeaf> Parses a JSON response body and classifies every scalar leaf, in encounter order.
-
Method Details
-
classify
Parses a JSON response body and classifies every scalar leaf, in encounter order.- Parameters:
json- raw JSON response body text- Returns:
- classified leaves, or an empty list if the body is blank or not valid JSON
-