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 endpoint discovery traits #165

Merged
merged 15 commits into from
Sep 30, 2019

Conversation

JordonPhillips
Copy link
Contributor

@JordonPhillips JordonPhillips commented Sep 16, 2019

Description of changes:

This adds traits needed to support the endpoint discovery behavior built into AWS clients.

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

This makes it easier to get all of the info you need about a given
operation's endpoint discovery configuration.
This adds a transformer that removes the endpoint discovery trait
when either the referenced operation or referenced error are removed.
@JordonPhillips JordonPhillips changed the title *Issue #, if available:* Add endpoint discovery traits Sep 16, 2019
/**
* Removes the endpoint discovery trait from a service if the referenced operation or error are removed.
*/
public class CleanDiscoveryTraitTransformer implements ModelTransformerPlugin {
Copy link
Contributor

Choose a reason for hiding this comment

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

The other ModelTransformerPlugin implementations handle all relevant changes to make sure the resulting model is in a valid state. Could this do so via filterTraits on the other traits? Should it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they are related but separate concerns. By decorating an operation with discoveredEndpoint you're saying that it needs to have an endpoint discovered for it to work (or at least work optimally). I don't think that changes if you project away the operation used for discovery.

This updates the endpoint discovery transformer to remove the
discoveredEndpoint trait from an operation when all the services it
is bound to have their endpoint discovery traits removed.
- a ``map`` member named ``Identifiers`` whose key and value types are
``string`` types.

The operation output MUST contain a member ``Endpoints`` that is a list of
Copy link
Member

Choose a reason for hiding this comment

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

Is this case-sensitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@JordonPhillips JordonPhillips merged commit 5786ed2 into smithy-lang:master Sep 30, 2019
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