@Override
    public Schema.Builder updateSchema(JsonSchemaMapperContext context, Schema.Builder builder) {
        Shape shape = context.getShape();
        OpenApiUtils.getSpecificationExtensionsMap(context.getModel(), shape)
                .entrySet()
                .forEach(entry -> builder.putExtension(entry.getKey(), entry.getValue()));

        JsonSchemaConfig config = context.getConfig();
        getResolvedExternalDocs(shape, config)
                .map(ExternalDocumentation::toNode)
                .ifPresent(docs -> builder.putExtension("externalDocs", docs));

        if (shape.hasTrait(DeprecatedTrait.ID)) {
            builder.putExtension("deprecated", Node.from(true));
        }

        boolean useOpenApiIntegerType = config instanceof OpenApiConfig
                && ((OpenApiConfig) config).getUseIntegerType()
                && !((OpenApiConfig) config).getDisableIntegerFormat();

        // Don't overwrite an existing format setting.
        if (!builder.getFormat().isPresent()) {
            // Only apply the int32/int64 formats if we map the type
            // to "integer" as those are not valid for "number" type.
            // See https://swagger.io/specification/#data-types
            if (useOpenApiIntegerType && shape.isIntegerShape()) {
                builder.format("int32");
            } else if (useOpenApiIntegerType && shape.isLongShape()) {
                builder.format("int64");
            } else if (shape.isFloatShape()) {
                updateFloatFormat(builder, config, "float");
            } else if (shape.isDoubleShape()) {
                updateFloatFormat(builder, config, "double");
            } else if (shape.isBlobShape() && config instanceof OpenApiConfig) {
                handleFormatKeyword(builder, (OpenApiConfig) config);
                return builder;
            } else if (shape.isTimestampShape()) {
                // Add the "double" format when epoch-seconds is used
                // to account for optional millisecond precision.
                config.detectJsonTimestampFormat(shape)
                        .filter(format -> format.equals(TimestampFormatTrait.EPOCH_SECONDS))
                        .ifPresent(format -> builder.format("double"));
            } else if (shape.hasTrait(SensitiveTrait.ID)) {
                builder.format("password");
            }
        }

        // Remove unsupported JSON Schema keywords.
        if (config instanceof OpenApiConfig) {
            OpenApiConfig openApiConfig = (OpenApiConfig) config;
            openApiConfig.getVersion().getUnsupportedKeywords().forEach(builder::disableProperty);
        }

        return builder;
    }
Applies OpenAPI extensions to a {@link Schema} using configuration settings
found in {@link OpenApiConfig}.

<p>Note: the properties and features added by this mapper can be removed using
{@link OpenApiConfig#setDisableFeatures}.
smithy-openapi/src/main/java/software/amazon/smithy/openapi/fromsmithy/OpenApiJsonSchemaMapper.java