You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When processing a POST the code would accept any payload as long as it is a properly formatted RedFish object.
As an example let's take the below RedFish event object.
{
"@odata.type": "#Event.v1_7_0.Event",
"Id": "1",
"Name": "Manager Created",
"Context": "",
"Events": [{
"EventType": "Other",
"EventId": "4594",
"Severity": "Ok",
"Message": "New Manager Available at FQDN http://foo.bar.org and Port 1234 ",
"MessageId": "Manager.1.0.AggregationSourceDiscovered",
"MessageArgs": [ "http://foo.bar.org", "1234" ],
"OriginOfCondition": {
"@odata.id": "/redfish/v1/Managers/Manager1"
}}
]
}
if this is posted to /redfish/v1/Chassis the API replies with a 200 and the below Frankenstein Chassis object is created:
{
"@Redfish.Copyright": "Copyright 2YNTSJ14-2YNTSJ21 SNIA. All rights reserved.",
"@odata.id": "/redfish/v1Chassis/YNTSJ",
"@odata.type": "#Event.v1_7_0.Event",
"ChassisType": "IP based Chassis",
"Context": "",
"Events": [
{
"EventId": "4594",
"EventType": "Other",
"Message": "New Manager Available at FQDN http://foo.bar.org and Port 1234 ",
"MessageArgs": [
"http://foo.bar.org",
"1234"
],
"MessageId": "Manager.1.0.AggregationSourceDiscovered",
"OriginOfCondition": {
"@odata.id": "/redfish/v1/Managers/Manager1"
},
"Severity": "Ok"
}
],
"Id": "1",
"Name": "Manager Created"
}
This request should instead fail because of a malformed payload. Each API endpoint should validate the payload before processing the request.
The text was updated successfully, but these errors were encountered:
When processing a
POST
the code would accept any payload as long as it is a properly formatted RedFish object.As an example let's take the below RedFish event object.
if this is posted to
/redfish/v1/Chassis
the API replies with a200
and the below Frankenstein Chassis object is created:This request should instead fail because of a malformed payload. Each API endpoint should validate the payload before processing the request.
The text was updated successfully, but these errors were encountered: