Class JsonValueNodeTransformer
java.lang.Object
software.amazon.smithy.openapi.fromsmithy.protocols.JsonValueNodeTransformer
- All Implemented Interfaces:
NodeVisitor<Node>
Applies the jsonName trait to example node values if applicable, recursing through list elements,
map values, and structure/union members. Document-typed shapes pass through without transformation,
since documents accept any node value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.smithy.model.node.NodeVisitor
NodeVisitor.Default<R> -
Constructor Summary
ConstructorsConstructorDescriptionJsonValueNodeTransformer(Context<?> context, Shape shape) Construct a JsonValueNodeTransformer. -
Method Summary
Modifier and TypeMethodDescriptionVisits an array node.booleanNode(BooleanNode node) Visits a boolean node.Visits a null node.numberNode(NumberNode node) Visits a number node.objectNode(ObjectNode node) Visits an object node.stringNode(StringNode node) Visits a string node.
-
Constructor Details
-
JsonValueNodeTransformer
Construct a JsonValueNodeTransformer.- Parameters:
context- Conversion context. Used to determine if jsonName should be used.shape- The shape of the node being converted.
-
-
Method Details
-
booleanNode
Description copied from interface:NodeVisitorVisits a boolean node.- Specified by:
booleanNodein interfaceNodeVisitor<Node>- Parameters:
node- Node to visit.- Returns:
- Return value of the visitor.
-
nullNode
Description copied from interface:NodeVisitorVisits a null node.- Specified by:
nullNodein interfaceNodeVisitor<Node>- Parameters:
node- Node to visit.- Returns:
- Return value of the visitor.
-
numberNode
Description copied from interface:NodeVisitorVisits a number node.- Specified by:
numberNodein interfaceNodeVisitor<Node>- Parameters:
node- Node to visit.- Returns:
- Return value of the visitor.
-
stringNode
Description copied from interface:NodeVisitorVisits a string node.- Specified by:
stringNodein interfaceNodeVisitor<Node>- Parameters:
node- Node to visit.- Returns:
- Return value of the visitor.
-
arrayNode
Description copied from interface:NodeVisitorVisits an array node.- Specified by:
arrayNodein interfaceNodeVisitor<Node>- Parameters:
node- Node to visit.- Returns:
- Return value of the visitor.
-
objectNode
Description copied from interface:NodeVisitorVisits an object node.- Specified by:
objectNodein interfaceNodeVisitor<Node>- Parameters:
node- Node to visit.- Returns:
- Return value of the visitor.
-