Send valid path to generator while running test suite #54
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.
So I couldn't figure out what exactly changed here, but as reported in
our channel yesterday,
stripe-mock
's test suite fails on the latestversion of the OpenAPI spec.
The reason is that when generating list resources, we're currently
filling in
url
with the dud string<test request path>
, and doing socauses the generated resource to fail to validate because that string is
not in the OpenAPI spec's
enum
set forurl
.Here we resolve the problem by plumbing through each URL's path from the
ingested OpenAPI spec and sending it onto the generator.
This doesn't quite fix the problems with the latest OpenAPI though —
there's at least one more case of an invalid fixture which I'm trying to
resolve separately.
r? @tmaxwell-stripe
cc @alexander-stripe
cc @stripe/api-libraries