Class JsonSchemaConverter.Builder

    • Method Detail

      • model

        public JsonSchemaConverter.Builder model​(Model model)
        Sets the shape index to convert.
        Parameters:
        model - Shape index to convert.
        Returns:
        Returns the builder.
      • rootShape

        public 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.
      • shapePredicate

        public 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.
      • propertyNamingStrategy

        public 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.
      • addMapper

        public JsonSchemaConverter.Builder addMapper​(JsonSchemaMapper jsonSchemaMapper)
        Adds a mapper used to update schema builders.
        Parameters:
        jsonSchemaMapper - Mapper to add.
        Returns:
        Returns the converter.
      • mappers

        public 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.