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

feat(poc): limited POC of a typesafe RequestContext alternative #4930

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mregulski-gravitee
Copy link
Contributor

@mregulski-gravitee mregulski-gravitee commented Oct 3, 2024

🆔 Reference related issue.

AM-2753

✏️ A description of the changes proposed in the pull request

writeup

@mregulski-gravitee mregulski-gravitee force-pushed the feat/AM-2753-unify-context branch from 16eae1d to 87a03c5 Compare October 3, 2024 12:46
@mregulski-gravitee mregulski-gravitee changed the title feat(poc): small POC of a typesafe RequestContext alternative feat(poc): limited POC of a typesafe RequestContext alternative Oct 3, 2024
Comment on lines +26 to +31
if (context.get("_am") instanceof AmContext amContext) {
handle(amContext);
} else {
AmContext.prepare(context);
handle(context);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: maybe we can always do handle(AmContext.from(context)) and delegate the build logic to AmContext itself to avoid recursive call ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm prepare(RoutingContext) re-uses the AmContext if it already exists so that would be a better way

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.

2 participants