Commit 92046bd
committed
Add configurable enum value capitalization
This change makes enum value capitalization optional and configurable
through the JaxRsProjectSettings class. Previously, enum values were
always converted to uppercase. Now users can control this behavior
with the capitalizeEnumValues setting (default: true for backward
compatibility).
Changes:
- Added capitalizeEnumValues field to JaxRsProjectSettings
- Modified JaxRsEnumRule to accept settings and conditionally capitalize
- Updated JaxRsRuleFactory to pass settings to JaxRsEnumRule
- Updated sanitizeEnumConstantName() to respect the configuration
To preserve original enum casing:
settings.setCapitalizeEnumValues(false);
To use uppercase enum constants (default):
settings.setCapitalizeEnumValues(true);1 parent d70ab8f commit 92046bd
File tree
3 files changed
+30
-8
lines changed- core/src/main/java/io/apicurio/hub/api/codegen
3 files changed
+30
-8
lines changedLines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
324 | | - | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
| |||
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
337 | | - | |
338 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
339 | 343 | | |
340 | 344 | | |
341 | 345 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
189 | 204 | | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
| 993 | + | |
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
| |||
1086 | 1086 | | |
1087 | 1087 | | |
1088 | 1088 | | |
| 1089 | + | |
| 1090 | + | |
1089 | 1091 | | |
1090 | 1092 | | |
1091 | 1093 | | |
1092 | | - | |
| 1094 | + | |
1093 | 1095 | | |
| 1096 | + | |
1094 | 1097 | | |
1095 | 1098 | | |
1096 | 1099 | | |
1097 | 1100 | | |
1098 | 1101 | | |
1099 | 1102 | | |
1100 | 1103 | | |
1101 | | - | |
| 1104 | + | |
1102 | 1105 | | |
1103 | 1106 | | |
1104 | 1107 | | |
| |||
0 commit comments