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` ` `
0 commit comments