Open APIs

 View Only
  • 1.  TMF 620 category.parentId

    Posted Oct 08, 2019 07:32
    Hi,
    In TMF 620 category.parentId is defined as a simple string value.
    Wouldn't it be better to change it to a ref (e.g. parentRef) pointing to the parent category resource, if any?
    This may be a minor point, but it would be consistent with the soul of the API.
    Regards,

    ------------------------------
    Şanver Narin
    PiA-TEAM INC.
    ------------------------------


  • 2.  RE: TMF 620 category.parentId

    TM Forum Member
    Posted Oct 10, 2019 03:53
    Hi Sanver
    Thanks for the suggestion
    This parent ID pattern is followed in all the Category resources for the various catalogs.
    You could argue that in a tree structure there is no need for the child to know who its parents are, only for the parents to know who its children are (and this is satisfied by an array of categoryRef as you describe). I don't think that we have bi-directional references anywhere in the Open API model, at least not in the parts I am familiar with. So the parent id is a logical pointer.

    Hope it helps

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    ------------------------------



  • 3.  RE: TMF 620 category.parentId

    Posted Oct 10, 2019 08:38
    Thanks for the comments Jonathan.
    Regards,

    ------------------------------
    Şanver Narin
    PiA-TEAM INC.
    ------------------------------



  • 4.  RE: TMF 620 category.parentId

    Posted Feb 02, 2020 06:32
    Hi Jonathan,
    I came across this issue again, while working on something else.
    It appears catalog API's do not explicitly mention that categories should have a tree structure (with the exception of TMF633 which does mention a "tree", but I believe it should emphasize that point).
    As far as I can see, the only factor enforcing a tree structure is that category.parentId can contain a single value. If you omit category.parentId, sub categories could be referenced by multiple parent categories, and a graph structure could emerge rather than a tree.

    Do you think enforcing a tree structure is necessary? (To be honest, I don't have any real world cases necessitating to extend it.)

    Regards,

    ------------------------------
    Şanver Narin
    PiA-TEAM INC.
    ------------------------------