-
Notifications
You must be signed in to change notification settings - Fork 196
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 initial RFC document (endpoints 2.0) #1637
Conversation
ShapeType.STRING -> StringShape.builder().id("smithy.api#String").build() | ||
ShapeType.BOOLEAN -> BooleanShape.builder().id("smithy.api#Boolean").build() | ||
else -> TODO("unsupported type") |
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.
It'd be nice to have a comment here linking to the spec for allowed types once that's published
A new generated diff is ready to view.
A new doc preview is ready to view. |
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.
Looks great! I have mostly minor questions and corrections.
### Overriding Endpoints | ||
|
||
In the general case, users will not be impacted by Endpoints 2.0 with one exception: today, users can provide a | ||
global endpoint provider that can override different services. There is a single `ResolveAwsEndpoint` trait that |
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.
Where does this trait live?
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.
currently it's in aws_smithy_http
but it's possible it should end up in aws_smithy_types
// update the URI on the returned endpoint to localhost while preserving the other properties | ||
base_endpoint.builder().uri("http://localhost:8888").build() |
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.
What other properties?
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 properties
which contain auth info e.g.
// module: `aws_smithy_types::endpoint` | ||
// potential optimization to reduce / remove allocations for keys which are almost always static | ||
// this can also just be `String` | ||
type MaybeStatic<T> = Cow<'static, T>; |
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.
If this is always used for str
, why make it generic?
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.
no reason, can remove
// - builder, designed to be invoked / used by generated code | ||
``` | ||
|
||
> **What's an Endpoint property?** |
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 this needs to be higher up since endpoint properties are mentioned in code samples above.
- [ ] Endpoint rules code generator | ||
- [ ] Endpoint params code generator | ||
- [ ] Endpoint tests code generator | ||
- [ ] Implement ruleset standard library functions as inlineables. Note: pending future refactoring work, the `aws.` |
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.
Are the standard rule functions going into inlineables to keep them hidden?
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.
yep
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
c13d63a
to
06b4f19
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
@@ -0,0 +1,599 @@ | |||
<!-- Give your RFC a descriptive name saying what it would accomplish or what feature it defines --> | |||
RFC: Endpoints 2.0 |
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 this file needs to be deleted?
A new generated diff is ready to view.
A new doc preview is ready to view. |
Co-authored-by: John DiSanti <[email protected]>
Co-authored-by: Zelda Hessler <[email protected]>
66d711f
to
a9010e7
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
Design for upcoming implementation of endpoints 2.0
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Rendered