-
Notifications
You must be signed in to change notification settings - Fork 109
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
Empty response when expanding an optional unset attribute #46
Comments
Oops, yep that's a crash:
Shouldn't be too hard to shore this up. I'll take a look. |
Just as a quick update: I looked into this one, and the reason this fails where other places don't is that right now we'll attempt to use fixture that's usually pre-specified in Outcome and rule are a special case because they're API resources that we don't have a top-level resource for, and so the generator balks when it gets to them. Solutions might include:
The better approach is probably the latter so — it'd shore things up for now, and still allow us to generate higher fidelity subresource fixtures for |
Here we codify a path to generate a synthetic schema for objects that couldn't be loaded from fixtures. This is useful in a couple situations: 1. Where we're trying to expand on a deep object that never lives at the top level of the API (see #46). 2. Where we have a schema that doesn't have have fixtures generated for it yet (e.g., an internal or prerelease one). Fixes #46.
I ended up going with option (2) above. Confirmed that #48 fixes this problem:
|
Here we codify a path to generate a synthetic schema for objects that couldn't be loaded from fixtures. This is useful in a couple situations: 1. Where we're trying to expand on a deep object that never lives at the top level of the API (see #46). 2. Where we have a schema that doesn't have have fixtures generated for it yet (e.g., an internal or prerelease one). Fixes #46.
Here we codify a path to generate a synthetic schema for objects that couldn't be loaded from fixtures. This is useful in a couple situations: 1. Where we're trying to expand on a deep object that never lives at the top level of the API (see #46). 2. Where we have a schema that doesn't have have fixtures generated for it yet (e.g., an internal or prerelease one). Fixes #46.
Here we codify a path to generate a synthetic schema for objects that couldn't be loaded from fixtures. This is useful in a couple situations: 1. Where we're trying to expand on a deep object that never lives at the top level of the API (see #46). 2. Where we have a schema that doesn't have have fixtures generated for it yet (e.g., an internal or prerelease one). Fixes #46.
If you try to expand
outcome.rule
on a charge object, you get an empty response:outcome.rule
is a valid expandable attribute (cf. API ref), however it is only set when applicable and is not set in the fixtures file.The API's behavior in this case is simply to return the charge object, e.g.:
The text was updated successfully, but these errors were encountered: