public class Library extends Object
| Constructor and Description |
|---|
Library() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
cloneDocument(Document source)
Clones the given document by serializing it to a JS object, and then re-parsing it.
|
static Document |
createDocument(DocumentType type)
Creates a new, empty document of the given type.
|
static NodePath |
createNodePath(Node node)
Called to create a node path for a given data model node.
|
static DocumentType |
discoverDocumentType(Object json)
Called to discover what type of document the given JSON data represents.
|
static Document |
readDocument(Object json)
Reads an entire document from JSON data.
|
static Document |
readDocumentFromJSONString(String jsonString)
Reads an entire document from a JSON formatted string.
|
static Node |
readNode(Object json,
Node node)
Call this to do a "partial read" on a given node.
|
static Oas30Document |
transformDocument(Oas20Document source)
Transforms from an OpenAPI 2.0 document into a 3.0 document.
|
static List<ValidationProblem> |
validate(Node node,
IValidationSeverityRegistry severityRegistry)
Called to validate a data model node.
|
static void |
visitNode(Node node,
IVisitor visitor)
Convenience method for visiting a single data model nodel.
|
static void |
visitTree(Node node,
IVisitor visitor,
TraverserDirection direction)
Convenience method for visiting a data model tree.
|
static String |
writeDocumentToJSONString(Document document)
Called to serialize a given data model to a JSON formatted string.
|
static Object |
writeNode(Node node)
Called to serialize a given data model node to a JSON object.
|
public static Document createDocument(DocumentType type)
type - public static NodePath createNodePath(Node node)
node - public static void visitNode(Node node, IVisitor visitor)
node - visitor - public static void visitTree(Node node, IVisitor visitor, TraverserDirection direction)
node - visitor - direction - public static List<ValidationProblem> validate(Node node, IValidationSeverityRegistry severityRegistry)
node - severityRegistry - public static Document readDocument(Object json)
Document and returned.json - public static Document readDocumentFromJSONString(String jsonString)
jsonString - public static Node readNode(Object json, Node node)
Oas30Operation and this will read the data and store it in the instance.json - node - public static Object writeNode(Node node)
node - public static String writeDocumentToJSONString(Document document)
document - public static DocumentType discoverDocumentType(Object json)
json - public static Document cloneDocument(Document source)
source - public static Oas30Document transformDocument(Oas20Document source)
source - Copyright © 2019 Red Hat. All rights reserved.