-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebuild data replacement strategy to use input from OpenAPI schema
Previously, the data replacer worked by taking input request and output response data, and replacing values if the types matched up. This generally worked, but would result in some inappropriate replacements for more complex data types like arrays, as seen in [1]. In this patch we upgrade the replacement strategy so that we perform replacements if the type of incoming request data matches what we expected in the response based on the OpenAPI schema. This allows us, for example, to not only check that a type is an array, but also what sort of elements that array is supposed to contain, even if the value from our fixtures is an empty array (which is often the case). Fixes #210. [1] #210
- Loading branch information
Showing
3 changed files
with
459 additions
and
95 deletions.
There are no files selected for viewing
This file contains 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 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
Oops, something went wrong.