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

Endpoint params #1683

Merged
merged 2 commits into from
Aug 31, 2022
Merged

Endpoint params #1683

merged 2 commits into from
Aug 31, 2022

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Aug 30, 2022

Motivation and Context

This adds generation of the EndpointParams struct from endpoint rules. This is the first of a series of PRs to the feature/endpoints branch. This uses a source dependency to avoid the need to manually publishToMavenLocal. Prior to merging to mainline, we will need to finalize the Ruleset changes in a smithy release and remove the source override.

Description

  • add endpoint params generator
  • add tests that uses the test cases provided by endpoints 2.0

Testing

  • standard compile-and-test unit tests

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link
Collaborator

@jdisanti jdisanti left a comment

Choose a reason for hiding this comment

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

LGTM! Just one minor comment.

rustTemplate(
"""
/// Sets the value for $name #{extraDocs:W}
pub fn $name(mut self, value: #{type}) -> Self {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this setter also use impl Into<#{nonOptionalType}>?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah—I didn't do that because it makes editors get super confused and not show good hints.

@rcoh rcoh merged commit d8a2087 into feature/endpoints Aug 31, 2022
@rcoh rcoh deleted the endpoint-params branch August 31, 2022 16:12
rcoh added a commit that referenced this pull request Sep 6, 2022
* Add endpoint parameter generator

* Switch to git dependency
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