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(open-api-gateway): java support for router for using single lambda function for all operations #242

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

cogwirrel
Copy link
Member

Adds a HandlerRouter class to the generated Java client which can be extended and used as the lambda entrypoint for all operations.

The router requires you to define a method for every operation, which returns a handler for that operation. Like with TypeScript and Python, these handlers are the same handlers can be used in a standalone fashion, so the router is another layer that can be easily added/removed should users decide to consolidate/split their lambdas.

The router can also be decorated with interceptors to apply to all operations (and/or override the getInterceptors method to return interceptors which need parameters for construction).

fix #238

…da function for all operations

Adds a HandlerRouter class to the generated Java client which can be extended and used as the lambda
entrypoint for all operations. The router requires you to define a method which returns a handler
for every operation. The router can also be decorated with interceptors to apply to all operations.

fix #238
@nx-cloud
Copy link

nx-cloud bot commented Dec 9, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 463ae56. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

Copy link
Contributor

@JeremyJonas JeremyJonas left a comment

Choose a reason for hiding this comment

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

LGTM - Nice work Jack! Very clean

@cogwirrel cogwirrel merged commit f4f5401 into mainline Dec 9, 2022
@cogwirrel cogwirrel deleted the feat/open-api-gateway-router-java branch December 9, 2022 05:05
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.

[FEATURE] open-api-gateway - allow all operations to use the same lambda integration
2 participants