-
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 endpoint discovery traits #165
Add endpoint discovery traits #165
Conversation
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.
...rc/main/java/software/amazon/smithy/aws/traits/endpointdiscovery/EndpointDiscoveryTrait.java
Outdated
Show resolved
Hide resolved
...ain/java/software/amazon/smithy/aws/traits/endpointdiscovery/EndpointDiscoveryValidator.java
Outdated
Show resolved
Hide resolved
...ain/java/software/amazon/smithy/aws/traits/endpointdiscovery/EndpointDiscoveryValidator.java
Outdated
Show resolved
Hide resolved
aws/smithy-aws-traits/src/main/resources/META-INF/smithy/aws.api.json
Outdated
Show resolved
Hide resolved
4e3ecfc
to
1aeca21
Compare
/** | ||
* Removes the endpoint discovery trait from a service if the referenced operation or error are removed. | ||
*/ | ||
public class CleanDiscoveryTraitTransformer implements ModelTransformerPlugin { |
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.
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?
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.
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 |
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.
Is this case-sensitive?
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.
yes
This makes it clear that the traits are for client side discovery.
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.