Commit 9fe40a1
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 8001980 commit 9fe40a1
2 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
| |||
| 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 | + | |
279 | 290 | | |
280 | 291 | | |
281 | 292 | | |
| |||
0 commit comments