@Override
        public Builder flattenMixins() {
            if (getMixins().isEmpty()) {
                return this;
            }

            String flatVersion = version;
            Map<ShapeId, String> flatRename = new LinkedHashMap<>();
            Set<ShapeId> flatErrors = new LinkedHashSet<>();

            for (Shape shape : getMixins().values()) {
                if (shape instanceof ServiceShape) {
                    ServiceShape mixin = (ServiceShape) shape;
                    if (!mixin.version.isEmpty()) {
                        flatVersion = mixin.version;
                    }
                    flatRename.putAll(mixin.getRename());
                    flatErrors.addAll(mixin.getErrors());
                }
            }

            if (!version.isEmpty()) {
                flatVersion = version;
            }
            flatRename.putAll(rename.peek());
            flatErrors.addAll(errors.peek());

            version = flatVersion;
            rename(flatRename);
            errors(flatErrors);
            return super.flattenMixins();
        }
Removes all errors.
@return Returns the builder.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/ServiceShape.java