Class ReplaceSchemaDefinitionCommand
- java.lang.Object
-
- io.apicurio.datamodels.cmd.AbstractCommand
-
- io.apicurio.datamodels.cmd.commands.AbstractReplaceNodeCommand<OpenApiSchema>
-
- io.apicurio.datamodels.cmd.commands.ReplaceSchemaDefinitionCommand
-
- All Implemented Interfaces:
ICommand
public class ReplaceSchemaDefinitionCommand extends AbstractReplaceNodeCommand<OpenApiSchema>
A command used to replace a definition schema with a newer version.- Author:
- eric.wittmann@gmail.com
-
-
Field Summary
-
Fields inherited from class io.apicurio.datamodels.cmd.commands.AbstractReplaceNodeCommand
_new, _nodePath, _old
-
-
Constructor Summary
Constructors Constructor Description ReplaceSchemaDefinitionCommand()ReplaceSchemaDefinitionCommand(OpenApiSchema old, OpenApiSchema replacement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OpenApiSchemareadNode(Node parent, com.fasterxml.jackson.databind.node.ObjectNode node)Unmarshalls a node into the appropriate type.protected voidreplaceNode(Node parent, OpenApiSchema newNode)Replaces the old node entry with the new node in the data model, without changing the order of the nodes.-
Methods inherited from class io.apicurio.datamodels.cmd.commands.AbstractReplaceNodeCommand
execute, undo
-
Methods inherited from class io.apicurio.datamodels.cmd.AbstractCommand
indexOf, isNullOrUndefined, type
-
-
-
-
Constructor Detail
-
ReplaceSchemaDefinitionCommand
public ReplaceSchemaDefinitionCommand()
-
ReplaceSchemaDefinitionCommand
public ReplaceSchemaDefinitionCommand(OpenApiSchema old, OpenApiSchema replacement)
-
-
Method Detail
-
replaceNode
protected void replaceNode(Node parent, OpenApiSchema newNode)
Description copied from class:AbstractReplaceNodeCommandReplaces the old node entry with the new node in the data model, without changing the order of the nodes.- Specified by:
replaceNodein classAbstractReplaceNodeCommand<OpenApiSchema>
-
readNode
protected OpenApiSchema readNode(Node parent, com.fasterxml.jackson.databind.node.ObjectNode node)
Description copied from class:AbstractReplaceNodeCommandUnmarshalls a node into the appropriate type.- Specified by:
readNodein classAbstractReplaceNodeCommand<OpenApiSchema>
-
-