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
docs(customer-service): clarify enhanced OpenAPI contract and wrapper extensions in README
- Updated Architecture & Explanation sections to highlight that customer-service
publishes an enhanced OpenAPI spec with x-api-wrapper extensions.
- Clarified client-side consumption path and removed redundant consumer app details.
- Added note that the spec is stored under customer-service-client as customer-api-docs.yaml.
- Improved example response formatting with explicit ServiceResponse<T> wrapper mention.
[customer-service] ── publishes ──> /v3/api-docs.yaml (OpenAPI contract with x-api-wrapper extensions)
30
30
│
31
31
└─ consumed by OpenAPI Generator (+ generics-aware templates)
32
32
│
@@ -37,14 +37,13 @@ against.
37
37
38
38
### Explanation
39
39
40
-
***customer-service** exposes the OpenAPI contract at `/v3/api-docs.yaml` (and Swagger UI).
41
-
***customer-service-client** runs the OpenAPI Generator against that contract, applying generics-aware Mustache
42
-
templates to produce **thin wrapper classes**.
43
-
***Your applications** then depend on this generated client. They call `CustomerControllerApi` (and other APIs)
44
-
directly without worrying about HTTP details, connection management, or response parsing.
40
+
***customer-service** exposes an **enhanced OpenAPI contract** at `/v3/api-docs.yaml` (and Swagger UI).
41
+
It auto-registers generic wrappers (`ServiceResponse<T>`) using `OpenApiCustomizer` and `ResponseTypeIntrospector`,
42
+
enriching the spec with vendor extensions:
43
+
-`x-api-wrapper: true`
44
+
-`x-api-wrapper-datatype: <T>`
45
45
46
-
➡️ This separation keeps the **server-side contract** clear, the **client auto-generated**, and the **consumer apps
47
-
strongly typed**.
46
+
***customer-service-client** runs the OpenAPI Generator against this enhanced contract, applying generics-aware Mustache templates to generate **thin wrapper classes** instead of duplicating full models.
48
47
49
48
---
50
49
@@ -81,7 +80,7 @@ curl -X POST "http://localhost:8084/customer-service/v1/customers" \
0 commit comments