public final class SchemaDocument extends java.lang.Object implements ToNode, ToSmithyBuilder<SchemaDocument>
| Modifier and Type | Class and Description |
|---|---|
static class |
SchemaDocument.Builder
Builds a JSON Schema document.
|
| Modifier and Type | Method and Description |
|---|---|
static SchemaDocument.Builder |
builder()
Returns a builder used to create a
SchemaDocument. |
boolean |
equals(java.lang.Object o) |
java.util.Optional<Schema> |
getDefinition(java.lang.String pointer)
Gets a schema definition from the "definitions" map using a JSON pointer.
|
java.util.Map<java.lang.String,Schema> |
getDefinitions()
Gets all of the schema definitions defined in the "definitions" map.
|
java.util.Optional<Node> |
getExtension(java.lang.String key)
Gets an extension value by name.
|
ObjectNode |
getExtensions()
Gets all extensions of the schema document.
|
java.util.Optional<java.lang.String> |
getIdKeyword()
Gets the "$id" keyword of the document.
|
Schema |
getRootSchema()
Gets the root schema definition.
|
java.util.Optional<java.lang.String> |
getSchemaKeyword()
Gets the "$schema" keyword of the document.
|
int |
hashCode() |
SchemaDocument.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
Node |
toNode()
Converts a value to a
Node. |
public static SchemaDocument.Builder builder()
SchemaDocument.public SchemaDocument.Builder toBuilder()
ToSmithyBuildertoBuilder in interface ToSmithyBuilder<SchemaDocument>public Schema getRootSchema()
public java.util.Optional<java.lang.String> getIdKeyword()
public java.util.Optional<java.lang.String> getSchemaKeyword()
public java.util.Optional<Schema> getDefinition(java.lang.String pointer)
The "root" schema is returned if pointer is an empty string.
pointer - JSON Schema pointer to retrieve.public java.util.Map<java.lang.String,Schema> getDefinitions()
public java.util.Optional<Node> getExtension(java.lang.String key)
key - Name of the extension to retrieve.public ObjectNode getExtensions()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object