File tree Expand file tree Collapse file tree 7 files changed +18
-8
lines changed Expand file tree Collapse file tree 7 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 55[ ![ codecov] ( https://codecov.io/gh/bsayli/spring-boot-openapi-generics-clients/branch/main/graph/badge.svg )] ( https://codecov.io/gh/bsayli/spring-boot-openapi-generics-clients )
66[ ![ Java] ( https://img.shields.io/badge/Java-21-red?logo=openjdk )] ( https://openjdk.org/projects/jdk/21/ )
77[ ![ Spring Boot] ( https://img.shields.io/badge/Spring%20Boot-3.4.10-green?logo=springboot )] ( https://spring.io/projects/spring-boot )
8- [ ![ OpenAPI Generator] ( https://img.shields.io/badge/OpenAPI%20Generator-7.x -blue?logo=openapiinitiative )] ( https://openapi-generator.tech/ )
8+ [ ![ OpenAPI Generator] ( https://img.shields.io/badge/OpenAPI%20Generator-7.16.0 -blue?logo=openapiinitiative )] ( https://openapi-generator.tech/ )
99[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( LICENSE )
1010
1111---
@@ -51,7 +51,7 @@ This repository consists of two main modules:
5151| ** Java** | 21 |
5252| ** Spring Boot** | 3.4.10 |
5353| ** Springdoc OpenAPI** | 2.8.13 |
54- | ** OpenAPI Generator** | 7.15 .0 |
54+ | ** OpenAPI Generator** | 7.16 .0 |
5555| ** Apache HttpClient 5** | 5.5 |
5656
5757---
Original file line number Diff line number Diff line change 22
33[ ![ Java 21] ( 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- [ ![ OpenAPI Generator] ( https://img.shields.io/badge/OpenAPI%20Generator-7.15 .0-blue?logo=openapiinitiative )] ( https://openapi-generator.tech/ )
5+ [ ![ OpenAPI Generator] ( https://img.shields.io/badge/OpenAPI%20Generator-7.16 .0-blue?logo=openapiinitiative )] ( https://openapi-generator.tech/ )
66[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( ../LICENSE )
77
88Generated Java client for the ** customer-service** , showcasing ** type-safe generic responses** with OpenAPI + a
Original file line number Diff line number Diff line change 66
77 <groupId >io.github.bsayli</groupId >
88 <artifactId >customer-service-client</artifactId >
9- <version >0.6.4 </version >
9+ <version >0.6.5 </version >
1010 <name >customer-service-client</name >
1111 <description >Generated client (RestClient) using generics-aware OpenAPI templates</description >
1212 <packaging >jar</packaging >
1717 <java .version>21</java .version>
1818
1919 <spring-boot .version>3.4.10</spring-boot .version>
20- <openapi .generator.version>7.15 .0</openapi .generator.version>
20+ <openapi .generator.version>7.16 .0</openapi .generator.version>
2121
2222 <jakarta .validation.version>3.1.1</jakarta .validation.version>
2323 <jakarta .annotation-api.version>3.0.0</jakarta .annotation-api.version>
213213 <openApiNullable >false</openApiNullable >
214214 <sourceFolder >src/gen/java</sourceFolder >
215215 </configOptions >
216+ <additionalProperties >
217+ <additionalProperty >commonPackage=io.github.bsayli.openapi.client.common
218+ </additionalProperty >
219+ </additionalProperties >
216220 </configuration >
217221 </execution >
218222 </executions >
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ openapi: 3.1.0
22info :
33 title : Customer Service API
44 description : Customer Service API with type-safe generic responses using OpenAPI
5- version : 0.6.4
5+ version : 0.6.5
66servers :
77 - url : http://localhost:8084/customer-service
88 description : Local service URL
Original file line number Diff line number Diff line change 1+ { {#vendorExtensions.x-class-extra-annotation} }
2+ { {{vendorExtensions.x-class-extra-annotation} }}
3+ { {/vendorExtensions.x-class-extra-annotation} }
14public class { {classname} }
2- extends io.github.bsayli.openapi.client.common .ServiceClientResponse<{ {vendorExtensions.x-api-wrapper-datatype} }> {
5+ extends { {commonPackage } } .ServiceClientResponse<{ {vendorExtensions.x-api-wrapper-datatype} }> {
36}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
88{ {/useReflectionEqualsHashCode} }
99import java.util.Objects;
1010import java.util.Arrays;
11+ import java.util.Locale;
1112{ {#imports} }
1213import { {import} };
1314{ {/imports} }
@@ -64,10 +65,12 @@ import java.util.StringJoiner;
6465{ {#models} }
6566{ {#model} }
6667
68+ { {! ---- Generics-aware thin wrappers when x-api-wrapper is present ---- } }
6769{ {#vendorExtensions.x-api-wrapper} }
6870 { {> api_wrapper} }
6971{ {/vendorExtensions.x-api-wrapper} }
7072
73+ { {! ---- Fallback to stock generation when not a wrapper ---- } }
7174{ {^vendorExtensions.x-api-wrapper} }
7275 { {#isEnum} }
7376 { {> modelEnum} }
Original file line number Diff line number Diff line change 1313
1414 <groupId >io.github.bsayli</groupId >
1515 <artifactId >customer-service</artifactId >
16- <version >0.6.4 </version >
16+ <version >0.6.5 </version >
1717 <name >customer-service</name >
1818 <description >Spring Boot 3.4 + Springdoc (OpenAPI) for generics-aware client generation</description >
1919
You can’t perform that action at this time.
0 commit comments