-
Notifications
You must be signed in to change notification settings - Fork 594
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 directives for extracting attributes #3355
Conversation
Test PASSed. |
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.
Nice. LGTM.
|
||
## Description | ||
|
||
Extracts the value of the request attribute with the given key. |
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.
Link to the Attribute docs for more context. Possibly explain how the attribute would get there before hitting the routing DSL.
Test PASSed. |
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.
LGTM functionality wise
attribute
is concise, I wonder, though, if it's clear what is meant if you read it in a route? Also since there are both request and response attributes.
On the other hand, we aren't quite consistent about that even now. Some extractions are called extractXYZ
(extractMethod
, extractUri
, etc.) while other are not (cookie
, headerByType
, etc.).
So overall, I think I'm good with this suggestion. I guess it's fine to not mark it as @ApiMayChange
for now? It shouldn't be a too common piece, so maybe let's not fret about it.
Later we should also add a directive to add a response attribute.
Refs #3315