-
Notifications
You must be signed in to change notification settings - Fork 103
impl "multipart/form-data" support (rebased #418) #1215
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
base: main
Are you sure you want to change the base?
impl "multipart/form-data" support (rebased #418) #1215
Conversation
.body( | ||
serde_urlencoded::to_string(body) | ||
.map_err(|_| Error::InvalidRequest("failed to serialize body".to_string()))?, | ||
serde_urlencoded::to_string(body).map_err(|e| { |
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.
Spurious, consider moving to another commit.
/// OpenAPI generator. | ||
pub struct Generator { | ||
type_space: TypeSpace, | ||
forms: IndexSet<TypeId>, |
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.
Better name?
|
||
let client_docstring = { | ||
let mut s = format!("Client for {}", spec.info.title); | ||
let mut doc = format!("Client for {}", spec.info.title); |
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.
Stylistic change, move out.
.type_space | ||
.get_type(type_id) | ||
.unwrap() | ||
.expect("TypeIDs are _never_ deleted. qed") |
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.
Markdown unsupported in terminal emulators. Remove emphasis.
What is "qed"?
Spurious?
} if enumeration.is_empty() => Ok(()), | ||
_ => Err(Error::UnexpectedFormat(format!( | ||
"invalid schema for application/octet-stream: {:?}", | ||
"invalid schema for {}: {:?}", |
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.
Unrelated stylistic change.
// type: "string" | ||
// format: "binary" | ||
// ``` | ||
// "schema": { |
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.
Needs code block.
Clarify.
Reduce indentation level inside YAML block.
.fmt(expander::Edition::_2021) | ||
.verbose(true) | ||
.write_to_out_dir(output) | ||
.expect("Writing file works. qed"); |
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.
What is the purpose of this change?
serde_yaml = "0.9" | ||
serde_tokenstream = "0.2.0" | ||
syn = { version = "2.0", features = ["full", "extra-traits"] } | ||
expander = "2" |
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.
Purpose?
@@ -0,0 +1,51 @@ | |||
// Copyright 2022 Oxide Computer Company |
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.
New file needs updated copyright.
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-data
support1.Still need to:
Closes #402
Footnotes
With the one exception of a
cargo: lints: forbid unused_crate_dependencies
commit. If this is to be rebase-merged, I'd like to keep it, if it's squashed, remove it. ↩