impl "multipart/form-data" support (rebased #418)#1215
Draft
spikespaz wants to merge 2 commits intooxidecomputer:mainfrom
Draft
impl "multipart/form-data" support (rebased #418)#1215spikespaz wants to merge 2 commits intooxidecomputer:mainfrom
spikespaz wants to merge 2 commits intooxidecomputer:mainfrom
Conversation
spikespaz
commented
Oct 11, 2025
| .body( | ||
| serde_urlencoded::to_string(body) | ||
| .map_err(|_| Error::InvalidRequest("failed to serialize body".to_string()))?, | ||
| serde_urlencoded::to_string(body).map_err(|e| { |
Contributor
Author
There was a problem hiding this comment.
Spurious, consider moving to another commit.
spikespaz
commented
Oct 11, 2025
| /// OpenAPI generator. | ||
| pub struct Generator { | ||
| type_space: TypeSpace, | ||
| forms: IndexSet<TypeId>, |
spikespaz
commented
Oct 11, 2025
|
|
||
| let client_docstring = { | ||
| let mut s = format!("Client for {}", spec.info.title); | ||
| let mut doc = format!("Client for {}", spec.info.title); |
Contributor
Author
There was a problem hiding this comment.
Stylistic change, move out.
spikespaz
commented
Oct 11, 2025
| .type_space | ||
| .get_type(type_id) | ||
| .unwrap() | ||
| .expect("TypeIDs are _never_ deleted. qed") |
Contributor
Author
There was a problem hiding this comment.
Markdown unsupported in terminal emulators. Remove emphasis.
What is "qed"?
Spurious?
spikespaz
commented
Oct 11, 2025
| } if enumeration.is_empty() => Ok(()), | ||
| _ => Err(Error::UnexpectedFormat(format!( | ||
| "invalid schema for application/octet-stream: {:?}", | ||
| "invalid schema for {}: {:?}", |
Contributor
Author
There was a problem hiding this comment.
Unrelated stylistic change.
spikespaz
commented
Oct 11, 2025
| // type: "string" | ||
| // format: "binary" | ||
| // ``` | ||
| // "schema": { |
Contributor
Author
There was a problem hiding this comment.
Needs code block.
Clarify.
Reduce indentation level inside YAML block.
spikespaz
commented
Oct 11, 2025
| .fmt(expander::Edition::_2021) | ||
| .verbose(true) | ||
| .write_to_out_dir(output) | ||
| .expect("Writing file works. qed"); |
Contributor
Author
There was a problem hiding this comment.
What is the purpose of this change?
spikespaz
commented
Oct 11, 2025
| serde_yaml = "0.9" | ||
| serde_tokenstream = "0.2.0" | ||
| syn = { version = "2.0", features = ["full", "extra-traits"] } | ||
| expander = "2" |
spikespaz
commented
Oct 11, 2025
| @@ -0,0 +1,51 @@ | |||
| // Copyright 2022 Oxide Computer Company | |||
Contributor
Author
There was a problem hiding this comment.
New file needs updated copyright.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a rebased #418 by @drahnr on latest
main. I've cleaned the diff of any spurious changes that aren't directly related tomultipart/form-datasupport1.Still need to:
Closes #402
Footnotes
With the one exception of a
cargo: lints: forbid unused_crate_dependenciescommit. If this is to be rebase-merged, I'd like to keep it, if it's squashed, remove it. ↩