Class SchemaDocument.Builder
java.lang.Object
software.amazon.smithy.jsonschema.SchemaDocument.Builder
- All Implemented Interfaces:
 SmithyBuilder<SchemaDocument>
- Enclosing class:
 - SchemaDocument
 
public static final class SchemaDocument.Builder
extends Object
implements SmithyBuilder<SchemaDocument>
Builds a JSON Schema document.
- 
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutable object that is created from the properties that have been set on the builder.extensions(ObjectNode extensions) Adds custom key-value pairs to the resulting JSON Schema document.Sets the "$id" keyword.putDefinition(String name, Schema schema) Adds a scheme definition to the builder.removeDefinition(String name) Removes a schema definition by name.rootSchema(Schema rootSchema) Sets the root schema.schemaKeyword(String schemaKeyword) Sets the "$schema" keyword. 
- 
Method Details
- 
build
Description copied from interface:SmithyBuilderCreates an immutable object that is created from the properties that have been set on the builder.- Specified by:
 buildin interfaceSmithyBuilder<SchemaDocument>- Returns:
 - an instance of T
 
 - 
idKeyword
Sets the "$id" keyword.- Parameters:
 idKeyword- ID keyword URI to set.- Returns:
 - Returns the builder.
 
 - 
schemaKeyword
Sets the "$schema" keyword.- Parameters:
 schemaKeyword- Schema keyword URI to set.- Returns:
 - Returns the builder.
 
 - 
rootSchema
Sets the root schema.- Parameters:
 rootSchema- Root schema of the document.- Returns:
 - Returns the builder.
 
 - 
putDefinition
Adds a scheme definition to the builder.- Parameters:
 name- Name of the schema.schema- Schema to associate to the name.- Returns:
 - Returns the builder.
 
 - 
removeDefinition
Removes a schema definition by name.- Parameters:
 name- Name of the schema to remove.- Returns:
 - Returns the builder.
 
 - 
extensions
Adds custom key-value pairs to the resulting JSON Schema document.- Parameters:
 extensions- Extensions to apply.- Returns:
 - Returns the builder.
 
 
 -