private Node addAdditionalProperties(Node node) {
        if (!node.isObjectNode()) {
            return node;
        }
        ObjectNode valueNode = node.expectObjectNode();

        // Unions may be expressed as a "oneOf" which won't have a type.
        Optional<String> type = valueNode.getStringMember("type").map(StringNode::getValue);
        if (!type.isPresent() && valueNode.getArrayMember("oneOf").isPresent()) {
            List<Node> elements = valueNode.expectArrayMember("oneOf").getElements();
            List<Node> updatedElements = new ArrayList<>(elements.size());
            for (Node element : elements) {
                updatedElements.add(addAdditionalProperties(element));
            }
            valueNode = valueNode.withMember("oneOf", ArrayNode.fromNodes(updatedElements));
        } else if (type.isPresent() && type.get().equals("object")) {
            valueNode = valueNode.withMember("additionalProperties", false);
        }
        return valueNode;
    }
CloudFormation issues a warning in its build tooling every time it detects
an "object" type in the converted JSON Schema's definitions that doesn't set
"additionalProperties" to "false". This mapper sets that to reduce the
warnings customers receive when developing resources from automatically
generated resource schemas.

@see <a href="https://github.com/aws-cloudformation/cloudformation-cli/blob/8491ac54d12028a7e00295b39f102e3786e52ccf/src/rpdk/core/data_loaders.py#L286-L295">Warning in CFN CLI</a>
smithy-aws-cloudformation/src/main/java/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/mappers/AdditionalPropertiesMapper.java