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 directives for extracting attributes #3355

Merged
merged 5 commits into from
Jul 8, 2020
Merged

Add directives for extracting attributes #3355

merged 5 commits into from
Jul 8, 2020

Conversation

raboof
Copy link
Member

@raboof raboof commented Jul 7, 2020

Refs #3315

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR that is currently being validated by Jenkins labels Jul 7, 2020
@akka-ci
Copy link

akka-ci commented Jul 7, 2020

Test PASSed.

Copy link
Member

@ennru ennru left a 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.
Copy link
Member

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.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Jul 7, 2020
@akka-ci
Copy link

akka-ci commented Jul 7, 2020

Test PASSed.

Copy link
Member

@jrudolph jrudolph left a 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.

@raboof raboof merged commit c9a302a into master Jul 8, 2020
@jrudolph jrudolph deleted the attributes branch November 22, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants