Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
openapi-generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
A domain gateway is a private case of the api gateway pattern. The repository java-design-patterns refers to the gateway pattern as:
Retrofit
Note: we're including the ApiClient.kt, OAuth.kt, and OAuthOkHttpClient.kt as currently there is a bug in the generator. This bug doesn't allow generating Retrofit clients with Jackson as the serialization library. I have opened a pull request for the fix on the OpenApi generator's repository. If the pull request was merged, you can remove the exclude part from your project.
All code examples in this article are available in my GitHub account at this repository: https://github.com/yonatankarp/domain-gateway-demo
Spring Boot - At the time of writing this article, SpringBoot 3 is still not supported by the OpenAPI generator. Thus we will use the latest Spring Boot 2
Kotlin
Related posts
- Javalin – a simple web framework for Java and Kotlin
- Show HN: Java REST without annotations, DI nor reactive streams
- (Ab)using a server library as a GUI - bad idea or only sort of bad idea?
- Getting back into Java after 12-15 years away?
- GraalVM 22.2: Smaller JDK size, improved memory usage, better library support