Skip to content

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

Draft
mregulski-gravitee wants to merge 1 commit into
masterfrom
feat/AM-2753-unify-context
Draft

feat(poc): limited POC of a typesafe RequestContext alternative#4930
mregulski-gravitee wants to merge 1 commit into
masterfrom
feat/AM-2753-unify-context

Conversation

@mregulski-gravitee
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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