Wrong schema definition for jsonschema validation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tacker |
In Progress
|
Undecided
|
Itsuro Oda |
Bug Description
In the Tacker Antelope implementation, schema definition of `CpProtocolData` has a wrong enum definition, which causes validation error when a LCM request is sent from clients.
When an InstantiateVnfR
```
{"status": 400, "detail": "Invalid input for field/attribute layerProtocol. Value: IP_OVER_ETHERNET. 'IP_OVER_ETHERNET' is not one of 'IP_OVER_
```
Parameter of InstantiateVnfR
```
{
"flavourId": "simple",
"instantiatio
"extVirtualLi
{
"id": "270f1e37-
"resourceId": "270f1e37-
"extCps": [
{
"cpdId": "VDU1_CP1",
{
}
}
]
}
}
},
{
"cpdId": "VDU2_CP1",
{
}
}
]
}
}
}
]
}
]
}
```
In the sample described in JSON schema document[1], value type of "enum" is array. However, JSON schema of CpProtocolData is defined as follows[2]:
```
CpProtocolData = {
'type': 'object',
'properties': {
'type': 'string',
'enum': 'IP_OVER_
},
'required': ['layerProtocol'],
'additional
}
```
I think the root cause of this behavior is that `properties.
```
CpProtocolData = {
'type': 'object',
'properties': {
'type': 'string',
'enum': ['IP_OVER_
},
'required': ['layerProtocol'],
'additional
}
```
--- References ---
[1] https:/
[2] https:/
description: | updated |
description: | updated |
Changed in tacker: | |
status: | New → In Progress |
Changed in tacker: | |
assignee: | nobody → Itsuro Oda (oda-g) |