You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Type-safe client generation with Spring Boot & OpenAPI using generics.**
4
9
This repository demonstrates how to teach OpenAPI Generator to work with generics in order to avoid boilerplate, reduce duplicated wrappers, and keep client code clean.
5
10
@@ -9,6 +14,7 @@ This repository demonstrates how to teach OpenAPI Generator to work with generic
9
14
10
15
Most backend teams standardize responses with a generic wrapper like `ApiResponse<T>`.
11
16
However, **OpenAPI Generator does not natively support generics** — instead, it generates one wrapper per endpoint (duplicating fields like `status`, `message`, and `errors`).
17
+
12
18
This creates:
13
19
14
20
* ❌ Dozens of almost-identical classes
@@ -22,11 +28,57 @@ This creates:
22
28
This project shows how to:
23
29
24
30
* Customize **Springdoc** to mark wrapper schemas in OpenAPI
25
-
* Add a **tiny Mustache partial**to make the generator emit thin shells extending a reusable generic base
31
+
* Add a **tiny Mustache partial**so the generator emits thin shells extending a reusable generic base
26
32
* Keep **compile-time type safety** without repetitive mappers
0 commit comments