Skip to content
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 method to get non-trait shapes #153

Merged
merged 1 commit into from
Sep 4, 2019
Merged

Conversation

mtdowling
Copy link
Member

This commit adds a method to ModelTransformer to get all shapes from a
model that are not only used as part of a trait or definition of a
trait. This makes it easier for code generators to get a shape index
that contains only shapes that they typically want to generate.

A convenience method was added to PluginContext to make this more
apparent when implementing SmithyBuild plugins. The result is also
cached since it can be an expensive thing to compute.

Issue #, if available:

Description of changes:

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

This commit adds a method to ModelTransformer to get all shapes from a
model that are not only used as part of a trait or definition of a
trait. This makes it easier for code generators to get a shape index
that contains only shapes that they typically want to generate.

A convenience method was added to PluginContext to make this more
apparent when implementing SmithyBuild plugins. The result is also
cached since it can be an expensive thing to compute.
@mtdowling mtdowling merged commit fc13869 into master Sep 4, 2019
@mtdowling mtdowling deleted the add-get-non-trait-shapes branch September 5, 2019 16:39
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.

2 participants