-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[Rust] Enum Query Parameter Serialization Fixes #22683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wing328
merged 13 commits into
OpenAPITools:master
from
winrid:rust-reqwest-query-params
Jan 13, 2026
+5,184
−153
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
aa729b4
[Rust] Enum Query Parameter Serialization Fixes
winrid a6e19c2
Remove duplicate query param integration tests from petstore samples
winrid 70f90bf
re-gen samples
winrid 3b08398
fix enum boxing tests
winrid e564281
stream files
winrid e30fd8c
samples
winrid 0585c24
doc generator fix & snapshot
winrid 8bd6777
doc generation fixes, update samples
winrid 9212fef
another attempt to fix the doc generator
winrid e7ddde7
improve doc generation - don't try link to internal models, and fixin…
winrid 44136fb
also fix hyper
winrid 50d3a51
applying same fix to hyper
winrid ebf7367
snapshot fixes
winrid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| generatorName: rust | ||
| outputDir: samples/client/others/rust/reqwest/multipart-async | ||
| library: reqwest | ||
| inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/multipart-file-upload.yaml | ||
| templateDir: modules/openapi-generator/src/main/resources/rust | ||
| additionalProperties: | ||
| supportAsync: true | ||
| useSingleRequestParameter: true | ||
| packageName: multipart-upload-reqwest-async |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
modules/openapi-generator/src/test/resources/3_0/rust/multipart-file-upload.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| openapi: 3.0.3 | ||
| info: | ||
| title: Multipart File Upload Test | ||
| description: Regression test for async multipart file uploads with tokio::fs | ||
| version: 1.0.0 | ||
| servers: | ||
| - url: http://localhost:8080 | ||
| paths: | ||
| /upload/single: | ||
| post: | ||
| operationId: uploadSingleFile | ||
| summary: Upload a single file (required parameter) | ||
| description: Tests async multipart file upload with required file parameter | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| multipart/form-data: | ||
| schema: | ||
| type: object | ||
| required: | ||
| - file | ||
| - description | ||
| properties: | ||
| description: | ||
| type: string | ||
| description: File description metadata | ||
| file: | ||
| type: string | ||
| format: binary | ||
| description: File to upload | ||
| responses: | ||
| '200': | ||
| description: Upload successful | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/UploadResponse' | ||
| '400': | ||
| description: Bad request | ||
|
|
||
| /upload/optional: | ||
| post: | ||
| operationId: uploadOptionalFile | ||
| summary: Upload an optional file | ||
| description: Tests async multipart file upload with optional file parameter | ||
| requestBody: | ||
| content: | ||
| multipart/form-data: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| metadata: | ||
| type: string | ||
| description: Optional metadata string | ||
| file: | ||
| type: string | ||
| format: binary | ||
| description: Optional file to upload | ||
| responses: | ||
| '200': | ||
| description: Upload successful | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/UploadResponse' | ||
|
|
||
| /upload/multiple-fields: | ||
| post: | ||
| operationId: uploadMultipleFields | ||
| summary: Upload with multiple form fields | ||
| description: Tests async multipart with multiple files and text fields | ||
| requestBody: | ||
| content: | ||
| multipart/form-data: | ||
| schema: | ||
| type: object | ||
| required: | ||
| - primaryFile | ||
| properties: | ||
| title: | ||
| type: string | ||
| description: Upload title | ||
| tags: | ||
| type: array | ||
| items: | ||
| type: string | ||
| description: Tags for the upload | ||
| primaryFile: | ||
| type: string | ||
| format: binary | ||
| description: Primary file (required) | ||
| thumbnail: | ||
| type: string | ||
| format: binary | ||
| description: Optional thumbnail file | ||
| responses: | ||
| '200': | ||
| description: Upload successful | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/UploadResponse' | ||
| '400': | ||
| description: Bad request | ||
|
|
||
| components: | ||
| schemas: | ||
| UploadResponse: | ||
| type: object | ||
| required: | ||
| - success | ||
| - fileCount | ||
| properties: | ||
| success: | ||
| type: boolean | ||
| description: Whether the upload was successful | ||
| fileCount: | ||
| type: integer | ||
| format: int32 | ||
| description: Number of files uploaded | ||
| message: | ||
| type: string | ||
| description: Optional message about the upload | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: requestBody missing
required: true, making required multipart file optionalPrompt for AI agents