Open APIs

 View Only
  • 1.  TMF637 Product Inventory Management API URL inconsistent

    TM Forum Member
    Posted Jan 24, 2023 10:29
    Hello,

    I would like to have your feedback about an issue we have identified in TMF637 Product Inventory Management API documents

    According to the information present in the API User Guide /Specification PDF we have:

        GET serverRoot/tmf-api/productManagement/v4/product
        POST serverRoot/tmf-api/productManagement/v4/product
        DELETE serverRoot/tmf-api/productManagement/v4/product
        PATCH serverRoot/tmf-api/productManagement/v4/product/

    - Here we can see that url shows "tmf-api/productManagement"

    However in this same document we have an example for GET that shows:
    Request
        GET serverRoot/tmf-api/productManagement/v4/product/g265-tf85
    Response:
            200
            {
                "id": "g265-tf85",
                "href": "https://host:port/productInventoryManagement/v4/product/g265-tf85",
                "description": "product description"
            (...)
    - In this example the href url shows "tmf-api/productInventoryManagement".

    Additionally, if we check the TMF swagger or the Postman Collection we see:
        "url": "{{Product_Inventory_API}}/tmf-api/productInventory/v4/
    - Here we can see that url shows "tmf-api/productInventory"

    In summary we can see some inconsistency across the several sources.

    Which one shall be the correct one? The one present in the API User Guide / Specification PDF?

    Many thanks,
    Miguel Leal


    ------------------------------
    Miguel Leal
    Nokia
    ------------------------------


  • 2.  RE: TMF637 Product Inventory Management API URL inconsistent

    Posted Jan 25, 2023 03:22
    Hello Miguel,

    I have been through the same situation a few weeks ago, and I would like to highlight that retrieving product using its id is defined in swagger files.

    I suggest you use the swagger files for the API as a starting point, and then use the testing report to identify the missing operations, filtering or field choosing.

    use below link for reference for the Open API table:
    Open API Table - TM Forum Ecosystem API Portal - TM Forum Confluence

    Hope that helps.

    ------------------------------
    Ahmed Elbanna
    SEGMA COM
    ------------------------------



  • 3.  RE: TMF637 Product Inventory Management API URL inconsistent

    TM Forum Member
    Posted Jan 25, 2023 17:20
    Edited by Miguel Leal Jan 25, 2023 17:20
    Hello Ahmed,

    I believe you misunderstood my question - or I was not clear in my explanation.

    The issue I'm pointing is the fact that we have different URL paths to access the Product Inventory Management API described in several places:
    -  API User Guide /Specification PDF shows: "/productManagement/" and "/productInventoryManagement/"
    - Swagger API shows: "/productInventory/"

    So, the question is: which of these 3 paths/names is the correct one? In all other TMF APIs I've worked URL paths were consistent across all documents.

    Many thanks,
    Miguel Leal



    ------------------------------
    Miguel Leal
    Nokia
    ------------------------------



  • 4.  RE: TMF637 Product Inventory Management API URL inconsistent

    TM Forum Member
    Posted Jan 30, 2023 00:20
    As long as both the swagger file and CTK tests are using the same path we can move forward.

    The swagger has the base path
    /tmf-api/productInventory/v4/
    The CTK also executes tests on (Though we can change it, but still just checked what is written there)
    /tmf-api/productInventory/v4/

    It looks fix is required in the documents, but we can go with path /tmf-api/productInventory/v4/

    ------------------------------
    Vikram Billa
    Qvantel Oy
    ------------------------------



  • 5.  RE: TMF637 Product Inventory Management API URL inconsistent

    TM Forum Member
    Posted Jan 30, 2023 04:42
    Hi all
    Thanks for the discussion and highlighting the problem.
    In the Open API team, all the assets are ultimately generated from the same source, which includes a rules file defining how to generate. This rules file includes the line:
      basePath: /tmf-api/productInventory/v4/​

    From here you can see that this is the intended base path. And indeed the swagger, the document, and the CTK all use this. The problem is "only" in the examples, which are crafted manually and hence human error can intervene. In more recent versions of our tooling we have validation of examples against the underlying entity schemas, but I'm not sure that this validation extends to verifying content (e.g. content of base path).
    I plan to open two issues:
    • Against the API, so that the examples can be fixed (I suspect that this will happen only in v5 of the API)
    • Against the tooling, so that validation can check href content against the base path, again in v5
    Hope it helps

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------