Repository navigation
Commit b0954bf
authored
fix: add after/limit pagination query params for listUserGroups (OKTA-1273404) (#1711)
* fix: add after/limit pagination query params for listUserGroups (OKTA-1273404)
The listUserGroups operation had no query parameters at all, so the SDK
could never page through a user's groups even though the real Users API
supports pagination via after/limit, matching the pattern already used
by the analogous listGroupUsers operation.
Adds the after (via queryAfter component) and limit query parameters to
the listUserGroups operation.
Co-Authored-By: Claude Code
* fix: generate backward-compatible overloads when new optional query params are added
Adding a new optional query parameter to an already-shipped operation
(e.g. OKTA-1273483's getDevice expand, OKTA-1273404's listUserGroups
after/limit) changes the arity of the generated method, which silently
breaks any existing caller using the old, shorter signature -- a
compile-time break for real SDK consumers, confirmed via CI as a runtime
MissingMethodException in the Groovy integration tests.
Extends the custom api.mustache template to additionally emit a
required-params-only overload (plus its additionalHeaders variant, and
Paged equivalents) whenever an operation has optional params, delegating
to the full-arity method with null for the omitted optional params. This
restores the previously-shipped signature for any operation whose
required-only shape was the prior public surface, with no impact on
operations that have no optional params.
Note: this does not preserve every historically-shipped arity in general
(e.g. adding a param to an operation that already had other optional
params, like listDevices/fields in OKTA-1277564, still changes that
operation's full-arity signature) -- only the required-only shape is
guaranteed stable.
Co-Authored-By: Claude Code
* fix: scope compatibility overloads to x-preserve-compat ops, fix javadoc
The blanket hasOptionalParams-gated compatibility overloads broke an
unrelated operation (getApplication) with a compile error: an
ambiguous null passed to two overloads of the same arity
(getApplication(String,String) vs the new getApplication(String,Map)).
This happens whenever an operation has exactly one optional param.
Scope the new overloads to only operations explicitly opted in via the
x-preserve-compat vendor extension, and set that extension only on
listUserGroups (the operation this branch's fix touches) so unrelated
operations across the spec are unaffected.
Also fix invalid Javadoc: the compatibility overloads' @PARAM tags
referenced the omitted optional parameters, which don't exist on the
overload's actual signature -- javadoc's doclint correctly rejected
this as "@PARAM name not found", breaking `mvn install`. Replaced with
a prose mention of the omitted params and @PARAM tags for the actual
(required) parameters instead.
Co-Authored-By: Claude Code1 parent 70dc747 commit b0954bf
2 files changed
Lines changed: 77 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
226 | 263 | | |
227 | 264 | | |
228 | 265 | | |
| |||
334 | 371 | | |
335 | 372 | | |
336 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
337 | 405 | | |
338 | 406 | | |
339 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24079 | 24079 | | |
24080 | 24080 | | |
24081 | 24081 | | |
| 24082 | + | |
| 24083 | + | |
| 24084 | + | |
| 24085 | + | |
| 24086 | + | |
| 24087 | + | |
| 24088 | + | |
| 24089 | + | |
| 24090 | + | |
24082 | 24091 | | |
24083 | 24092 | | |
24084 | 24093 | | |
| |||
0 commit comments