Swordfish-API-Emulator
Swordfish-API-Emulator copied to clipboard
DataStorageLoSCapabilities_v1_2_2_DataStorageLoSCapabilities SupportedLinesOfService
Hi,
using v1.2.6 the mockup http://service-based-mockups.swordfishmockups.com fails validation using the provided openapi description documents. The PathItems
/redfish/v1/StorageServices/FileService/DataProtectionLoSCapabilities/
/redfish/v1/StorageServices/1/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/FileService/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/1/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/FileService/IOConnectivityLoSCapabilities/
/redfish/v1/StorageServices/1/DataProtectionLoSCapabilities/
/redfish/v1/StorageServices/FileService/DataSecurityLoSCapabilities/
/redfish/v1/StorageServices/FileService/IOPerformanceLoSCapabilities/
/redfish/v1/StorageServices/1/DataSecurityLoSCapabilities/
/redfish/v1/StorageServices/1/DataStorageLoSCapabilities/
fail validation.
The problem is in the SupportedLinesOfService property:
10 validation errors for DataStorageLoSCapabilities_v1_2_2_DataStorageLoSCapabilities
SupportedLinesOfService.0.`@odata.type`
Extra inputs are not permitted [type=extra_forbidden, input_value='#DataSecurityLineOfServi...taSecurityLineOfService', input_type=str]
For further information visit https://errors.pydantic.dev/2.5/v/extra_forbidden
SupportedLinesOfService.0.Id
Extra inputs are not permitted [type=extra_forbidden, input_value='SecureData', input_type=str]
For further information visit https://errors.pydantic.dev/2.5/v/extra_forbidden
…
which is defined as
SupportedLinesOfService:
description: Collection of known and supported DataStorageLinesOfService.
items:
$ref: http://redfish.dmtf.org/schemas/v1/odata-v4.yaml#/components/schemas/odata-v4_idRef
readOnly: false
type: array
x-autoExpand: true
x-longDescription: The collection shall contain known and supported DataStorageLinesOfService.
but served as:
…
"SupportedLinesOfService": [
{
"@odata.type": "#DataSecurityLineOfService.v1_1_1.DataSecurityLineOfService",
"Id": "SecureData",
"Name": "SecureData",
"MediaEncryptionStrength": "Bits_256",
"ChannelEncryptionStrength": "Bits_128",
"HostAuthenticationType": "Ticket",
"UserAuthenticationType": "Password",
"SecureChannelProtocol": "TLS",
"AntivirusScanPolicies": [],
"DataSanitizationPolicy": "CryptographicErase",
"@odata.id": "/redfish/v1/StorageServices/FileService/LinesOfService/DataSecurityLinesOfService/SecureData"
}
…
this is most likely due to missing auto-expansion when generating the OpenAPI description documents (c.f. https://github.com/DMTF/Redfish-Service-Validator/issues/588). Changing the type to the "expanded" in the description documents works for me.
Cross-logged in Swordfish TWG repository.
Fixed in 1.2.7 version of Swordfish; last autogen should've picked up the fix.