Commit 9d957e8
committed
fix(osgen): treat ISM/KNN/LTR/ML/PPL/SM/UBI/WLM as acronyms
Go identifier convention requires acronyms to be all-uppercase (the
generator already does this for API, HTTP, JSON, URL, etc.). The
OpenSearch plugin-namespace acronyms were missing from the table, so the
generated surface emitted IsmPolicy, KnnStats, MlModel, SmPolicy, and
similar mis-cased identifiers.
Add the missing entries to the acronyms map so titleSegment expands them:
ISM Index State Management
KNN k-Nearest Neighbors
LTR Learning to Rank
ML Machine Learning
PPL Piped Processing Language
SM Snapshot Management
UBI User Behavior Insights
WLM Workload Management
Matching is whole-segment only (segments are split on '.' and '_' before
lookup), so words like "smile" are unaffected; a regression test pins
this. The rename takes effect on the next code generation, which rewrites
the affected *_gen.go identifiers (e.g. IsmPolicy -> ISMPolicy) in one
pass.
Closes opensearch-project#863
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>1 parent 300d1ae commit 9d957e8
2 files changed
Lines changed: 80 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
54 | 110 | | |
55 | 111 | | |
56 | 112 | | |
| |||
89 | 145 | | |
90 | 146 | | |
91 | 147 | | |
| 148 | + | |
92 | 149 | | |
93 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
94 | 156 | | |
95 | 157 | | |
96 | 158 | | |
97 | 159 | | |
98 | 160 | | |
| 161 | + | |
99 | 162 | | |
100 | 163 | | |
101 | 164 | | |
| 165 | + | |
102 | 166 | | |
103 | 167 | | |
104 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
276 | 285 | | |
277 | 286 | | |
278 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
279 | 294 | | |
280 | 295 | | |
281 | 296 | | |
| |||
0 commit comments