Open APIs

 View Only
  • 1.  TMF 633 and TMF 641

    Posted Feb 11, 2020 07:25
    I understand that  "Service characteristics" [] object in 633 as well as 641 supports complex object type. Please see the example.

    "serviceCharacteristic": [
    {
    "name": "plan",
    "valueType": "object",
    "value": {"no of host": "2", "user id":"abc", "admin user":"bcaa"},
    "@baseType": "plan",
    "@schemaLocation": "<uri>",
    "@type": "<string>"
    }
    ]  

    Question: does the "plan" service char can be an array??- please see the below example. let me know if this structure is supported in open api?

      "serviceCharacteristic": [
    {
    "name": "plan",
    "valueType": "array",
    "value":
    [
    {"name":"baseplan","type":"base","no of host": "1", "user id":"abc", "admin user":"bcaa"},
    {"name":"addon1","type":"free addon","no of host": "2", "user id":"abc", "admin user":"bcaa"},
    {"name":"addon2","type":"optional addon","no of host": "2", "user id":"abc", "admin user":"bcaa"},
    {"name":"addon3","type":"chargeable addon","no of host": "2", "user id":"abc", "admin user":"bcaa"},
    ]

    "@baseType": "planarray",
    "@schemaLocation": "<uri>",
    "@type": "<string>"
    }
    ]

    ------------------------------
    Arup Sinha
    Infosys
    ------------------------------


  • 2.  RE: TMF 633 and TMF 641

    TM Forum Member
    Posted Feb 12, 2020 04:10
    Hi Arup
    The Characteristic pattern across all the Open APIs is being enhanced - specifically the Characteristic class is becoming an abstract base class, with removal of the value attribute (that was typed with Any) - this is due to difficulties that were encountered in code generation for this empty Any class.
    Instead,  subclasses are being introduced, such as IntegerCharacteristic, StringCharacteristic, etc., where each subclass does allOf Characteristic, and adds a strongly typed value attribute, e.g. 
    "value": {
    "type": "integer",
    "description": "Value of the characteristic"
    }
    or

    "value": {
    "type": "string",
    "description": "Value of the characteristic"
    }

    The idea is that you would be able to create your own subclass to allow complex characteristics, including arrays.

    This is work-in-progress, we don't yet have the impact on the catalog APIs (product, service, resource), hopefully will be done sometime soon.

    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.
    ------------------------------