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 java.lang.Object implements SmithyBuilder<SchemaDocument> Builds a JSON Schema document.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaDocumentbuild()Creates an immutable object that is created from the properties that have been set on the builder.SchemaDocument.Builderextensions(ObjectNode extensions)Adds custom key-value pairs to the resulting JSON Schema document.SchemaDocument.BuilderidKeyword(java.lang.String idKeyword)Sets the "$id" keyword.SchemaDocument.BuilderputDefinition(java.lang.String name, Schema schema)Adds a scheme definition to the builder.SchemaDocument.BuilderremoveDefinition(java.lang.String name)Removes a schema definition by name.SchemaDocument.BuilderrootSchema(Schema rootSchema)Sets the root schema.SchemaDocument.BuilderschemaKeyword(java.lang.String schemaKeyword)Sets the "$schema" keyword.
 
- 
- 
- 
Method Detail- 
buildpublic SchemaDocument 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 interface- SmithyBuilder<SchemaDocument>
- Returns:
- an instance of T
 
 - 
idKeywordpublic SchemaDocument.Builder idKeyword(java.lang.String idKeyword) Sets the "$id" keyword.- Parameters:
- idKeyword- ID keyword URI to set.
- Returns:
- Returns the builder.
 
 - 
schemaKeywordpublic SchemaDocument.Builder schemaKeyword(java.lang.String schemaKeyword) Sets the "$schema" keyword.- Parameters:
- schemaKeyword- Schema keyword URI to set.
- Returns:
- Returns the builder.
 
 - 
rootSchemapublic SchemaDocument.Builder rootSchema(Schema rootSchema) Sets the root schema.- Parameters:
- rootSchema- Root schema of the document.
- Returns:
- Returns the builder.
 
 - 
putDefinitionpublic SchemaDocument.Builder putDefinition(java.lang.String name, Schema schema) Adds a scheme definition to the builder.- Parameters:
- name- Name of the schema.
- schema- Schema to associate to the name.
- Returns:
- Returns the builder.
 
 - 
removeDefinitionpublic SchemaDocument.Builder removeDefinition(java.lang.String name) Removes a schema definition by name.- Parameters:
- name- Name of the schema to remove.
- Returns:
- Returns the builder.
 
 - 
extensionspublic SchemaDocument.Builder extensions(ObjectNode extensions) Adds custom key-value pairs to the resulting JSON Schema document.- Parameters:
- extensions- Extensions to apply.
- Returns:
- Returns the builder.
 
 
- 
 
-