Commit 876eff6
committed
fix(client-sdks): ensure data field ordering for list response iteration
The model template emits __iter__/__getitem__/__len__ methods only for
the first array field in a model. Several list response schemas had
non-array fields (like object) before the data field, causing the
template to skip iteration methods. This made iterating a response
yield (field_name, value) tuples instead of data items.
Add reorder_data_field_first() in build_hierarchy.py to ensure the data
property comes first in any schema with an array data field.
Also update uv.lock to ogx-open-client 1.0.3.dev4.
Signed-off-by: E Geiger <egeiger@redhat.com>1 parent 081b2a1 commit 876eff6
2 files changed
Lines changed: 48 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
165 | 206 | | |
166 | 207 | | |
167 | 208 | | |
| |||
338 | 379 | | |
339 | 380 | | |
340 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
341 | 386 | | |
342 | 387 | | |
343 | 388 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments