public static final class JsonSchemaConverter.Builder extends java.lang.Object implements SmithyBuilder<JsonSchemaConverter>
Modifier and Type | Method and Description |
---|---|
JsonSchemaConverter.Builder |
addMapper(JsonSchemaMapper jsonSchemaMapper)
Adds a mapper used to update schema builders.
|
JsonSchemaConverter |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
JsonSchemaConverter.Builder |
config(JsonSchemaConfig config)
Sets the configuration object.
|
JsonSchemaConverter.Builder |
mappers(java.util.List<JsonSchemaMapper> jsonSchemaMappers)
Replaces the mappers of the builder with the given mappers.
|
JsonSchemaConverter.Builder |
model(Model model)
Sets the shape index to convert.
|
JsonSchemaConverter.Builder |
propertyNamingStrategy(PropertyNamingStrategy propertyNamingStrategy)
Sets a custom property naming strategy.
|
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.
|
JsonSchemaConverter.Builder |
shapePredicate(java.util.function.Predicate<Shape> shapePredicate)
Sets a predicate used to filter Smithy shapes from being converted
to JSON Schema.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public JsonSchemaConverter build()
SmithyBuilder
build
in interface SmithyBuilder<JsonSchemaConverter>
public JsonSchemaConverter.Builder model(Model model)
model
- Shape index to convert.public JsonSchemaConverter.Builder rootShape(ToShapeId rootShape)
rootShape
- ID of the shape that is used to limit
the closure of the generated document.public JsonSchemaConverter.Builder shapePredicate(java.util.function.Predicate<Shape> shapePredicate)
shapePredicate
- Predicate that returns true if a shape is to be converted.public JsonSchemaConverter.Builder config(JsonSchemaConfig config)
config
- Config to use.public JsonSchemaConverter.Builder propertyNamingStrategy(PropertyNamingStrategy propertyNamingStrategy)
This method overrides an configuration values specified by the configuration object.
propertyNamingStrategy
- Property name strategy to use.public JsonSchemaConverter.Builder addMapper(JsonSchemaMapper jsonSchemaMapper)
jsonSchemaMapper
- Mapper to add.public JsonSchemaConverter.Builder mappers(java.util.List<JsonSchemaMapper> jsonSchemaMappers)
jsonSchemaMappers
- Mappers to replace with.