private boolean targetsSyntheticError(StructureShape shape, Context context) {
        if (shape.hasTrait(HttpErrorTrait.ID)) {
            HttpErrorTrait trait = shape.expectTrait(HttpErrorTrait.class);
            String suffix = trait.getCode() + "Error";
            if (shape.getId().getName().endsWith(suffix)) {
                return hasSingleUnionMember(shape, context.getModel());
            }
        }
        return false;
    }
Converts the {@code aws.protocols#restJson1} protocol to OpenAPI.
smithy-openapi/src/main/java/software/amazon/smithy/openapi/fromsmithy/protocols/AwsRestJson1Protocol.java