Skip to content

Support service renames when flattening namespaces#760

Merged
srchase merged 2 commits intomainfrom
flatten-namespaces-rename
Apr 6, 2021
Merged

Support service renames when flattening namespaces#760
srchase merged 2 commits intomainfrom
flatten-namespaces-rename

Conversation

@srchase
Copy link
Copy Markdown
Contributor

@srchase srchase commented Apr 5, 2021

Adds support for service renames (#734) when using the flattenNamespaces transformer.

Any shapes that have been configured on the service to be renamed will also be flattened into the target namespace.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@srchase srchase requested a review from kstich April 5, 2021 23:22
Copy link
Copy Markdown
Contributor

@JordonPhillips JordonPhillips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use a doc update. I don't think it's necessarily obvious behavior.

@srchase srchase requested a review from JordonPhillips April 6, 2021 14:13
@srchase srchase merged commit 58d5b41 into main Apr 6, 2021
@srchase srchase deleted the flatten-namespaces-rename branch April 6, 2021 16:08
return shapeWalker.walkShapes(service).stream()
.filter(FunctionalUtils.not(Prelude::isPreludeShape))
.map(shape -> Pair.of(shape.getId(), updateNamespace(shape.getId(), config.getNamespace())))
.map(pair -> applyServiceRenames(pair, service))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: ideally we can destructure pairs before calling methods with them. That would give the left and right shape ID a name so it's easier to understand the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants