Repository navigation
Commit eac731b
[rust] fix: free-form object query parameters reference a nonexistent models::serde_json (#24866)
* fix: [rust] type free-form object parameters as serde_json::Value, not models::serde_json::Value
A free-form object parameter (type: object with no properties) maps to
serde_json::Value, but the api templates qualify every non-primitive,
non-container parameter type with models:: - and models re-exports no
serde_json, so the generated crate fails with E0433. Free-form body
parameters already avoid this because updateRequestBodyForObject marks
them primitive; give non-body free-form parameters the same treatment.
Free-form schemas with additionalProperties stay containers (HashMap)
and keep their JSON serialization.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CxDNCjqJycKTfzVWg2SeTJ
* ci: retrigger after ubuntu mirror outage
* [rust] tidy: shorten the free-form parameter comment
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* [rust] test: cover free-form object parameters in all four libraries
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* [rust] test: cover free-form object path and header parameters
The fix marks every free-form entry in allParams, so the fixture now
also carries a free-form path parameter and a free-form header
parameter, and the test asserts both are typed serde_json::Value.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent a85be6d commit eac731b
3 files changed
Lines changed: 92 additions & 0 deletions
File tree
- modules/openapi-generator/src
- main/java/org/openapitools/codegen/languages
- test
- java/org/openapitools/codegen/rust
- resources/3_0/rust
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
798 | 805 | | |
799 | 806 | | |
800 | 807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
322 | 353 | | |
323 | 354 | | |
324 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments