-
Notifications
You must be signed in to change notification settings - Fork 795
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
Codegen refactoring for operation context params and jmesPath #5219
base: master
Are you sure you want to change the base?
Conversation
… interceptor code
Quality Gate passedIssues Measures |
/** | ||
* Knowledge index to get access to operation context parameters. | ||
*/ | ||
public final class OperationContextParamsKnowledgeIndex { |
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.
Nit: KnowledgeIndex
sounds fancy, but I don't know what it means😅. Maybe just OperationContextParamsHelper
?
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's not my favorite either, but there is prior art from the SRA implementation and I'd rather not introduce a new term right now. We could rename all the KnowledgeIndex instances in a separate PR.
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.
Ah I see, we have more Helper
classes than KnowledgeIndex
classes though ;) Anyway, it's codegen class, so it doesn't really matter
Motivation and Context
Refactors codegen for operation context parameters and jmesPath code generator, and fixes the condition for when to generate the jmesPath runtime.
Modifications
EndpointResolverInterceptorSpec
is getting too big. By extracting logic and codegen for Operation Context Params and putting into a separate class, it's easier to read and understand the codeJmesPathAcceptorGenerator
toJmesPathExpressionConverter
sinceAcceptor
is a Waiter term. Another name could beJmesPathCodeGenerator
JmesPathRuntime.java.resource
was set to true. Now that all endpoint parameter logic is finished, it's updated to checking for the presence of Operation Context Params: If there are waiters, we know there is a runtime. If there are no waiters, we'll generate runtime if there are operation context parametersTesting
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License