-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RenameShapes model transformer #318
Conversation
smithy-model/src/main/java/software/amazon/smithy/model/transform/RenameShapes.java
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/RenameShapes.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/RenameShapes.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/RenameShapes.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/ModelTransformer.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/RenameShapes.java
Outdated
Show resolved
Hide resolved
smithy-model/src/test/java/software/amazon/smithy/model/transform/RenameShapesTest.java
Outdated
Show resolved
Hide resolved
smithy-model/src/test/java/software/amazon/smithy/model/transform/RenameShapesTest.java
Outdated
Show resolved
Hide resolved
smithy-model/src/test/java/software/amazon/smithy/model/transform/RenameShapesTest.java
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,25 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this integration test, I'd like to see metadata getting renamed (e.g., a suppression) and tests for virtually every kind of shape and reference -- structures, lists, maps, sets, unions, services, operations, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is missing validation for updating some relationships:
- service -> operation
- service -> resource
- resource -> identifier
- resource -> operation
smithy-model/src/main/java/software/amazon/smithy/model/transform/RenameShapes.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/RenameShapes.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/ModelTransformer.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/ModelTransformer.java
Outdated
Show resolved
Hide resolved
smithy-model/src/test/java/software/amazon/smithy/model/transform/RenameShapesTest.java
Outdated
Show resolved
Hide resolved
smithy-model/src/test/java/software/amazon/smithy/model/transform/RenameShapesTest.java
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,25 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is missing validation for updating some relationships:
- service -> operation
- service -> resource
- resource -> identifier
- resource -> operation
This PR adds a RenameShapes model transformer that takes a map of ShapeId to ShapeId pairs.
Shape members are updated for consistency when any member-containing aggregate shape has been renamed.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.