Skip to content
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

Send valid path to generator while running test suite #54

Merged
merged 1 commit into from
Mar 30, 2018

Conversation

brandur-stripe
Copy link
Contributor

@brandur-stripe brandur-stripe commented Mar 30, 2018

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 latest
version 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 so
causes the generated resource to fail to validate because that string is
not in the OpenAPI spec's enum set for url.

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

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 latest
version 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 so
causes the generated resource to fail to validate because that string is
not in the OpenAPI spec's `enum` set for `url`.

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.
@tmaxwell-stripe
Copy link
Contributor

LGTM

@brandur-stripe
Copy link
Contributor Author

Thanks Tim.

@brandur-stripe brandur-stripe merged commit 07a7a9d into master Mar 30, 2018
@brandur-stripe brandur-stripe deleted the brandur-send-path branch March 30, 2018 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants