Unfortunately it looks as if the design guidelines were not refreshed in R18.5, apologies on behalf of the Open API team.
But the R18.5 specifications (go to the
Open API table for links) include examples for complex attribute values.For example in TMF 638 Service Inventory we give an example of an IP address attribute:
"serviceCharacteristic": [
{
"name": "vCPE_IP",
"valueType": "object",
"value": {
"@type": "IPAddress",
"@schemaLocation": "https://mycsp.com:8080/tmf-api/schema/Service/IPAddress.schema.json",
"address": "193.218.236.21"
}
}
The corresponding definition in the swagger is:
"name": {
"type": "string",
"description": "Name of the characteristic"
},
"valueType": {
"type": "string",
"description": "Data type of the value of the characteristic"
},
"value": {
"$ref": "#/definitions/Any",
"description": "The value of the characteristic"
},
and Any is "Any": {},
In other words there is no strong typing for the value, since
Any matches any json object. For complex types (such as IP address, or list of TNs for friends and family) the provider will likely set a type name (@type) and a schema (@schemaLocation) for the type that will allow validation. The provider could give a schema also for simple types if this aligns with its business aims.
Hope it helps
------------------------------
Jonathan Goldberg
Amdocs Management Limited
------------------------------
Original Message:
Sent: May 24, 2019 17:02
From: Benoit Le Nabec
Subject: TMF641: Service Ordering API: Service Chararcteristic / Value
We are not able to find API design guidelines 3.1, to take effect for release 18.5!
Do you have the URL ?
------------------------------
Benoit Le Nabec
CGI Info Systems Management Consulting Inc.
Original Message:
Sent: Jul 09, 2018 02:05
From: Jonathan Goldberg
Subject: TMF641: Service Ordering API: Service Chararcteristic / Value
Regarding a characteristic with a list of values (perhaps family and friend numbers is an example), @Mariano Belaunde is working on a formalization of the Characteristic/Characteristic Value pattern, which will allow characteristics to be strongly-typed with basic types or with type Object - this is set to become part of the API design guidelines 3.1, to take effect for release 18.5. Of course there is no guarantee that all the API specs will be updated in the 18.5 timescale. Suggest you reach out to Mariano to get more details, and see how the list use case can be handled.
Regarding nested characteristics, can you give a concrete example. SID has a relationship between characteristics, but in general the API model tries to simplify where this makes sense.
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Original Message:
Sent: Jul 07, 2018 15:16
From: Adrian Ofterdinger
Subject: TMF641: Service Ordering API: Service Chararcteristic / Value
Dear TMF641 Committers and Experts,
in the TMF641 API, a specific service has n Characteristics with one value each. My question is:
- How to work with lists of values in within one characteristic?
- How to work with nested types of characteristics
Thanks in advance
Adrian
------------------------------
Adrian Ofterdinger
Capgemini
------------------------------