Open APIs

 View Only
  • 1.  Depth/Expand - does it change ref to value?

    TM Forum Member
    Posted Jun 11, 2025 04:26

    Hi

    if I expand an EntityRef using depth and expand directives, should the returned @type be changed from EntityRef to Entity, or should it remain EntityRef with additional fields?



    ------------------------------
    Piotr Ledwoń
    Suntech S.A.
    ------------------------------


  • 2.  RE: Depth/Expand - does it change ref to value?

    TM Forum Member
    Posted Jun 12, 2025 01:01

    Hi Piotr

     

    We return the @type of the Entity in the response when using depth or expand directives.

     

    Good luck!






  • 3.  RE: Depth/Expand - does it change ref to value?

    TM Forum Member
    Posted Jun 12, 2025 02:33

    That is an interesting question. 

    This is what we have done in our implementations. As an example for an "expand": "@type": 'AccountRef' becomes "@type": "Account" and where there was previously an EntityRef object, we now display the entity.

    But this leads to the next relevant question: Do the OAS API specifications allow this at all? The "@type" will play a much more important role as a discriminator in the future. From the OAS perspective, an expand would then only be permitted if both an EntityRef and an Entity are possible at the position. However, this is only possible for GET operations and not for other operations.

    I've never really checked the v5 APIs for the expand feature.

    Above all, multiple nested expands are also possible (via depth). In my example with AccountRef and Account: If Account also uses EntityRef patterns again, the schema definition of Account must also allow its refs to be "resolved" in turn.

    Greetings,
    Jan



    ------------------------------
    Jan Lemmermann
    OSS Lead Architect
    EWE TEL GmbH
    ------------------------------



  • 4.  RE: Depth/Expand - does it change ref to value?

    TM Forum Member
    Posted Jun 12, 2025 02:54

    Valid concern.  I have raised a JIRA ticket against this at [AP-6841] Consistency when using expand/depth directive alongside the strongly-typed Gen5 schemas - TM Forum JIRA



    ------------------------------
    Dan d'Albuquerque
    Entronica Company Limited
    ------------------------------



  • 5.  RE: Depth/Expand - does it change ref to value?

    TM Forum Member
    Posted Jun 12, 2025 04:10
    Edited by Piotr Ledwoń Jun 12, 2025 04:10

    Is it allowed to use RefOrValue in place of Ref if expansion is supported for a given field?

    Also, who has access to view those Jira tickets? I assume they are not publicly accessible since I can't view them. Is  there no read-only view options for regular members so that we know in which direction the API development goes?



    ------------------------------
    Piotr Ledwoń
    Suntech S.A.
    ------------------------------



  • 6.  RE: Depth/Expand - does it change ref to value?

    TM Forum Member
    Posted Jun 12, 2025 04:49

    Please go ahead and join the Open APIs project at the link below.  The more the merrier!  You will then have access to JIRA and Confluence pages once approved.

     

    TM Forum - Site Content - Page - Collaboration projects






  • 7.  RE: Depth/Expand - does it change ref to value?

    TM Forum Member
    Posted Jun 12, 2025 05:08

    Thanks, I will do that



    ------------------------------
    Piotr Ledwoń
    Suntech S.A.
    ------------------------------