Skip to content

Make internal a trait and not just a tag#531

Merged
mtdowling merged 2 commits intomasterfrom
internal-trait
Aug 18, 2020
Merged

Make internal a trait and not just a tag#531
mtdowling merged 2 commits intomasterfrom
internal-trait

Conversation

@mtdowling
Copy link
Copy Markdown
Member

We've been using the "internal" tag to indicate that something is
internal only and should not be exposed to external consumers of a model
(i.e., people that don't work at the same company as the service team).
The original motivation for using tags and not traits was that there are
more dimensions to filtering shapes out of models than just internal vs
external. However, the internal/external split is so common that it
makes sense to make it a trait, which is more configurable and less
based on convention. Tags can still be used for filtering things out of
models (for example, an operation could be tagged so that it is only
exposed to a particular customer).

There are other cases where we migrated away from tags and moved to
traits like the aws.api#controlPlane and aws.api#dataPlane traits.

To support this change, a SmithyBuild transform was added that removes
shapes marked as internal. Note that this does not perform tree shaking
since like other transforms, tree shaking is performed by a dedicated
transform.

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.

We've been using the "internal" tag to indicate that something is
internal only and should not be exposed to external consumers of a model
(i.e., people that don't work at the same company as the service team).
The original motivation for using tags and not traits was that there are
more dimensions to filtering shapes out of models than just internal vs
external. However, the internal/external split is so common that it
makes sense to make it a trait, which is more configurable and less
based on convention. Tags can still be used for filtering things out of
models (for example, an operation could be tagged so that it is only
exposed to a particular customer).

There are other cases where we migrated away from tags and moved to
traits like the `aws.api#controlPlane` and `aws.api#dataPlane` traits.

To support this change, a SmithyBuild transform was added that removes
shapes marked as internal. Note that this does not perform tree shaking
since like other transforms, tree shaking is performed by a dedicated
transform.
@mtdowling mtdowling requested a review from kstich August 18, 2020 16:58
@mtdowling mtdowling requested a review from kstich August 18, 2020 18:29
@mtdowling mtdowling merged commit 60af099 into master Aug 18, 2020
@mtdowling mtdowling deleted the internal-trait branch September 14, 2020 22:49
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