fix: support httpmock generation for array types#1261
Draft
danieleades wants to merge 6 commits intooxidecomputer:mainfrom
Draft
fix: support httpmock generation for array types#1261danieleades wants to merge 6 commits intooxidecomputer:mainfrom
danieleades wants to merge 6 commits intooxidecomputer:mainfrom
Conversation
16c7571 to
e4f70cd
Compare
Author
|
this now works against my openAPI spec. note the need to convert &str to String to satisfy the trait bounds of httpmock |
Author
|
marking as a draft until the upstream issue in httpmock is resolved |
Author
|
upstream fix has been merged, just need a new release of |
String types (`&str`) don't implement `Deserialize` and are unsized, which causes `json_body_obj` to fail. Convert to owned `String` before passing to httpmock methods.
6316c26 to
6b29797
Compare
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.
closes #1260
Http mock generation fails for me at compile time because it assumes that all types implement Display.
This version uses serde_urlencoded to do the serialisation instead, which is more flexible.
This is a bit more verbose, and has a lot of
expectssprinkled about. I think panicking is justified since these are non-recoverable errors