private static Model createUpdatedModel(
            Model model,
            Shape rootShape,
            Predicate<Shape> predicate
    ) {
        ModelTransformer transformer = ModelTransformer.create();

        if (rootShape != null) {
            LOGGER.fine(() -> "Filtering out shapes that are not connected to " + rootShape);
            Set<Shape> connected = new Walker(model).walkShapes(rootShape);
            LOGGER.fine(() -> "Only generating the following JSON schema shapes: " + connected.stream()
                    .map(Shape::getId)
                    .map(ShapeId::toString)
                    .collect(Collectors.joining(", ")));
            model = transformer.filterShapes(model, connected::contains);
        }

        model = transformer.filterShapes(model, predicate);

        // Traits and their shapes are not generated into the OpenAPI schema.
        model = transformer.scrubTraitDefinitions(model);

        return model;
    }
A workaround for including definitions for Unit; it's only included in the schema if a union targets it.
smithy-jsonschema/src/main/java/software/amazon/smithy/jsonschema/JsonSchemaConverter.java