fix: support httpmock generation for array types#1261
Open
danieleades wants to merge 5 commits intooxidecomputer:mainfrom
Open
fix: support httpmock generation for array types#1261danieleades wants to merge 5 commits intooxidecomputer:mainfrom
danieleades wants to merge 5 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 |
6316c26 to
6b29797
Compare
6b29797 to
f410fa5
Compare
b67549d to
02de846
Compare
Author
|
@ahl - would it be possible to trigger CI for this one? this issue is a blocker for me adopting |
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 doesn't hold for vectors.
Summary
Displaytypes by reusingQueryParamserialization and matching on decoded(key, value)pairs.query_param_pairsinprogenitor-clientto mirrorQueryParamrules (scalars, arrays with repeated keys, objects/maps), and use it throughout generated httpmock matchers.Notes
expectbecause these are non-recoverable errors in generated mocks/tests.