Class JsonSchemaConverter.Builder
- java.lang.Object
- 
- software.amazon.smithy.jsonschema.JsonSchemaConverter.Builder
 
- 
- All Implemented Interfaces:
- SmithyBuilder<JsonSchemaConverter>
 - Enclosing class:
- JsonSchemaConverter
 
 public static final class JsonSchemaConverter.Builder extends java.lang.Object implements SmithyBuilder<JsonSchemaConverter> 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonSchemaConverter.BuilderaddMapper(JsonSchemaMapper jsonSchemaMapper)Adds a mapper used to update schema builders.JsonSchemaConverterbuild()Creates an immutable object that is created from the properties that have been set on the builder.JsonSchemaConverter.Builderconfig(JsonSchemaConfig config)Sets the configuration object.JsonSchemaConverter.Buildermappers(java.util.List<JsonSchemaMapper> jsonSchemaMappers)Replaces the mappers of the builder with the given mappers.JsonSchemaConverter.Buildermodel(Model model)Sets the shape index to convert.JsonSchemaConverter.BuilderpropertyNamingStrategy(PropertyNamingStrategy propertyNamingStrategy)Sets a custom property naming strategy.JsonSchemaConverter.BuilderrootShape(ToShapeId rootShape)Only generates shapes connected to the given shape and set the given shape as the root of the created schema document.JsonSchemaConverter.BuildershapePredicate(java.util.function.Predicate<Shape> shapePredicate)Sets a predicate used to filter Smithy shapes from being converted to JSON Schema.
 
- 
- 
- 
Method Detail- 
buildpublic JsonSchemaConverter 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<JsonSchemaConverter>
- Returns:
- an instance of T
 
 - 
modelpublic JsonSchemaConverter.Builder model(Model model) Sets the shape index to convert.- Parameters:
- model- Shape index to convert.
- Returns:
- Returns the builder.
 
 - 
rootShapepublic JsonSchemaConverter.Builder rootShape(ToShapeId rootShape) Only generates shapes connected to the given shape and set the given shape as the root of the created schema document.- Parameters:
- rootShape- ID of the shape that is used to limit the closure of the generated document.
- Returns:
- Returns the builder.
 
 - 
shapePredicatepublic JsonSchemaConverter.Builder shapePredicate(java.util.function.Predicate<Shape> shapePredicate) Sets a predicate used to filter Smithy shapes from being converted to JSON Schema.- Parameters:
- shapePredicate- Predicate that returns true if a shape is to be converted.
- Returns:
- Returns the converter.
 
 - 
configpublic JsonSchemaConverter.Builder config(JsonSchemaConfig config) Sets the configuration object.- Parameters:
- config- Config to use.
- Returns:
- Returns the converter.
 
 - 
propertyNamingStrategypublic JsonSchemaConverter.Builder propertyNamingStrategy(PropertyNamingStrategy propertyNamingStrategy) Sets a custom property naming strategy.This method overrides an configuration values specified by the configuration object. - Parameters:
- propertyNamingStrategy- Property name strategy to use.
- Returns:
- Returns the converter.
 
 - 
addMapperpublic JsonSchemaConverter.Builder addMapper(JsonSchemaMapper jsonSchemaMapper) Adds a mapper used to update schema builders.- Parameters:
- jsonSchemaMapper- Mapper to add.
- Returns:
- Returns the converter.
 
 - 
mapperspublic JsonSchemaConverter.Builder mappers(java.util.List<JsonSchemaMapper> jsonSchemaMappers) Replaces the mappers of the builder with the given mappers.- Parameters:
- jsonSchemaMappers- Mappers to replace with.
- Returns:
- Returns the converter.
 
 
- 
 
-