Commit 8c338f9
committed
feat: auto-register ServiceResponse wrappers + refactor client template overlay
- customer-service:
* Added `ResponseTypeIntrospector` as a Spring component to introspect controller return types.
* Introduced `AutoWrapperSchemaCustomizer` to automatically register ServiceResponse<T> wrappers in OpenAPI schemas (including async return types).
* Removed need for manual `SwaggerCustomerResponseCustomizer`.
- customer-service-client:
* Refactored OpenAPI Generator configuration to support upstream template unpacking.
* Effective template directory now built by combining upstream Java templates with local overrides.
* Only customized templates (`model.mustache`, `api_wrapper.mustache`) remain under `src/main/resources/openapi-templates`.
This enables automatic OpenAPI schema generation for all response types and simplifies template maintenance by leveraging upstream defaults.1 parent 194bd6b commit 8c338f9
File tree
9 files changed
+198
-811
lines changed- customer-service-client
- src/main/resources
- openapi-templates
- customer-service/src/main/java/com/example/demo
- common/openapi
- autoreg
- introspector
- customer/openapi
9 files changed
+198
-811
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | | - | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
83 | | - | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
88 | | - | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
95 | 171 | | |
96 | 172 | | |
97 | 173 | | |
| |||
100 | 176 | | |
101 | 177 | | |
102 | 178 | | |
| 179 | + | |
103 | 180 | | |
104 | 181 | | |
105 | 182 | | |
| |||
113 | 190 | | |
114 | 191 | | |
115 | 192 | | |
116 | | - | |
117 | | - | |
| 193 | + | |
118 | 194 | | |
119 | 195 | | |
120 | 196 | | |
| |||
131 | 207 | | |
132 | 208 | | |
133 | 209 | | |
134 | | - | |
| 210 | + | |
135 | 211 | | |
136 | 212 | | |
137 | 213 | | |
| |||
151 | 227 | | |
152 | 228 | | |
153 | 229 | | |
154 | | - | |
| 230 | + | |
155 | 231 | | |
156 | 232 | | |
157 | 233 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 0 additions & 120 deletions
This file was deleted.
Lines changed: 0 additions & 6 deletions
This file was deleted.
0 commit comments