TS29510_Nnrf_NFManagement.yaml SubscriptionData/subscrCond (oneof classes) need to be more strict
vasilky3 opened this issue · 2 comments
Not sure if this thread is suitable for this type of issues. Correct me if I wrong.
Problem:
SubscriptionData
{
"nfStatusNotificationUri": "robot:8081",
"subscriptionId": "123456",
"subscrCond": {
"nfType": "UDR"
},
"reqNotifEvents": [
"NF_REGISTERED",
"NF_DEREGISTERED",
"NF_PROFILE_CHANGED"
]
}
generates errors in python validator:
Failed validating 'oneOf' in schema['properties', 'SubscriptionData', 'properties', 'subscrCond']:
-> {'nfType': 'UDR'} is valid under each of {'$ref': '#/properties/ScpDomainCond'}, {'$ref': '#/properties/NfTypeCond'}
On instancedeque(['SubscriptionData', 'subscrCond']):
{'nfType': 'UDR'}
Solution:
more strict rules for oneof types solves the problem:
ScpDomainCond:
description: Subscription to a set of NF or SCP or SEPP instances belonging to certain SCP domains
type: object
required: # fix
- scpDomains
properties:
scpDomains:
type: array
items:
type: string
minItems: 1
thanks @vasilky3. this is definitely an issue that needs to be corrected. this same problem has been detected before in other similar "xxxCond" types, used under this oneOf construct, but this one seems to be still pending.
your proposed solution is for sure a possibility; another approach, that has been used in other "xxxCond" types, where there is no obvious attributes to be used as "required" attributes, is to define a new required attribute called "conditionType" (see for example data types NefCond or NwdafCond, where this approach has been used).
i'll take note of this issue and bring it up during the next 3GPP Working Group meeting in August.
thanks for reporting the issue!