private boolean hasSingleUnionMember(StructureShape shape, Model model) {
        long unionCount = shape.getAllMembers()
                .values()
                .stream()
                .map(member -> model.expectShape(member.getTarget()))
                .filter(Shape::isUnionShape)
                .count();
        return unionCount == 1;
    }
Converts the {@code aws.protocols#restJson1} protocol to OpenAPI.
smithy-openapi/src/main/java/software/amazon/smithy/openapi/fromsmithy/protocols/AwsRestJson1Protocol.java