Skip to content

Commit 1df6f85

Browse files
committed
docs: update module READMEs for consistency and clarity
1 parent 4e91dd8 commit 1df6f85

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

customer-service-client/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Generated Java client for the **customer-service**, showcasing **type‑safe generic responses** and **nested generics**
99
with a minimal OpenAPI Generator Mustache overlay. The client maps successful responses into a reusable envelope
10-
`ServiceClientResponse<T>` and decodes non‑2xx responses into RFC7807-compliant `ProblemDetail` via a custom exception.
10+
`ServiceClientResponse<T>` and decodes non‑2xx responses into RFC 7807-compliant `ProblemDetail` via a custom exception.
1111

1212
---
1313

@@ -259,7 +259,7 @@ For detailed steps, see [`../docs/adoption`](../docs/adoption).
259259

260260
Generated from the OpenAPI spec exposed by:
261261

262-
* [customer-service](../customer-service/README.md)sample Spring Boot microservice (API producer).
262+
* [customer-service](../customer-service/README.md) — Spring Boot microservice acting as the API producer for this generated client.
263263

264264
---
265265

customer-service/README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
[![Java](https://img.shields.io/badge/Java-21-red?logo=openjdk)](https://openjdk.org/projects/jdk/21/)
44
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.4.10-green?logo=springboot)](https://spring.io/projects/spring-boot)
5-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../LICENSE)
65
[![Build](https://github.com/bsayli/spring-boot-openapi-generics-clients/actions/workflows/build.yml/badge.svg)](https://github.com/bsayli/spring-boot-openapi-generics-clients/actions/workflows/build.yml)
6+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../LICENSE)
77

88
---
99

@@ -51,7 +51,7 @@ This module serves as the **server-side anchor**: the reference point for generi
5151
* These hints allow the OpenAPI Generator to produce nested generic clients such as:
5252

5353
```java
54-
class CustomerListResponse extends ServiceClientResponse<Page<CustomerDto>> {}
54+
public class ServiceResponsePageCustomerDto extends ServiceClientResponse<Page<CustomerDto>> {}
5555
```
5656

5757
* **customer-service-client** uses custom templates to emit **thin wrappers** extending the base
@@ -115,15 +115,15 @@ curl -X POST "http://localhost:8084/customer-service/v1/customers" \
115115

116116
## 📙 CRUD Endpoints
117117

118-
| Method | Path | Description | Returns |
119-
|--------|------------------------------|---------------------|--------------------------|
120-
| POST | `/v1/customers` | Create new customer | `CustomerDto` |
121-
| GET | `/v1/customers/{customerId}` | Get single customer | `CustomerDto` |
122-
| GET | `/v1/customers` | List all customers | `Page<CustomerDto>` |
123-
| PUT | `/v1/customers/{customerId}` | Update customer | `CustomerDto` |
124-
| DELETE | `/v1/customers/{customerId}` | Delete customer | `CustomerDeleteResponse` |
118+
| Method | Path | Description | Returns |
119+
|--------|------------------------------|--------------------------|--------------------------|
120+
| POST | `/v1/customers` | Create new customer | `CustomerDto` |
121+
| GET | `/v1/customers/{customerId}` | Get single customer | `CustomerDto` |
122+
| GET | `/v1/customers` | List customers (paged) | `Page<CustomerDto>` |
123+
| PUT | `/v1/customers/{customerId}` | Update existing customer | `CustomerDto` |
124+
| DELETE | `/v1/customers/{customerId}` | Delete customer | `CustomerDeleteResponse` |
125125

126-
**Base URL:** `/customer-service` (defined in `application.yml`)
126+
**Base URL:** `/customer-service` (configured in `application.yml`)
127127

128128
### Example Response: Get Customer
129129

@@ -140,7 +140,7 @@ curl -X POST "http://localhost:8084/customer-service/v1/customers" \
140140
}
141141
```
142142

143-
### Example Response: List Customers (Page-aware)
143+
### Example Response: List Customers (Paged)
144144

145145
```json
146146
{
@@ -201,7 +201,6 @@ ServiceResponsePageCustomerDto:
201201
data:
202202
$ref: "#/components/schemas/PageCustomerDto"
203203
x-api-wrapper: true
204-
x-api-wrapper-datatype: PageCustomerDto
205204
x-data-container: Page
206205
x-data-item: CustomerDto
207206
```

customer-service/src/main/java/io/github/bsayli/customerservice/api/dto/CustomerListResponse.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)