override fun preprocessModel()

in codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/customization/BoxServices.kt [66:76]


    override fun preprocessModel(model: Model, settings: SwiftSettings): Model {
        val serviceClosure = Walker(model).walkShapes(model.expectShape(settings.service))

        return ModelTransformer.create().mapShapes(model) {
            if (it in serviceClosure && !it.id.namespace.startsWith("smithy.api")) {
                boxPrimitives(model, it)
            } else {
                it
            }
        }
    }