OpenApi struct is undefined
bkzhang opened this issue · 7 comments
Hi I am using the latest open api build (since I need the new features) but several structs are undefined. So far I've noted that it happens for Stripe.Session.__struct__
and Stripe.Discount.__struct__
Example:
** (CompileError) lib/core/services/user/stripe_session.ex:328: Stripe.Session.__struct__/0 is undefined, cannot expand struct Stripe.Session. Make sure the struct name is correct. If the struct name exists and is correct but it still cannot be found, you likely have cyclic module usage in your code
expanding struct: Stripe.Session.__struct__/0
...
```
Is this from main
branch?
Is this from
main
branch?
Yes, I realized that the Stripe.Session
is now Stripe.Checkout.Session
but the the Stripe.Discount
object is still missing
I looked into Stripe.Discount. It is skipped because the openapi spec doesn't have all the things discount would need. You can hack around it but then it is still missing things like the delete route for discounts.
Thanks, I did make a temporary workaround in the meantime
I found a way to also generate the Stripe.Discount structs, though it results in a whole bunch of structs being generated which is nice for documentation purposes but also a bit bloaty. I'll see if I can create a PR.
This issue has been automatically marked as "stale:discard". If this issue still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment.
Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!