Skip to content

Uncertainty on when invoice.subscription is to be expanded.  #61

Description

@rdarder

Hi there!
I'm wrapping my head around x-expandableFields and x-expansionResources. I thought I got this right but there's a case that confuses me.
Let's take invoice.subscription. it's not an expandableFIeld and it's still anyOf(str, ref(subscription)). So far, every time I get an invoice, I see the subscription automatically expanded. So my questions are:

  • can subscription in this case come un-expanded and just as a string?
  • is there any way of controlling this behavior?
    I notice that the field is hinted with an x-expansionResources, which if I understand correctly, hints that the id form of this field is a reference to the indicated (subscription) resource. I'm just unsure if I'm missing something here.

My intention is to reduce the type ambiguity of the return types, so consumers don't need to check whether -- in this case -- the subscription is an id or the actual object. I can deal with expandableFields most of the times, but this one seems off.

Thank you!!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions