openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
161 stars 133 forks source link

Wrong type of MemberId in SubmitTestEvent #290

Open ifel opened 2 days ago

ifel commented 2 days ago

Hello,

According to the scheme https://redfish.dmtf.org/schemas/v1/Event.v1_4_0.json, they type of the MemberId is string, but in the code it's int: https://github.com/openbmc/bmcweb/blob/6fe8751c46d7086e49977b68e74262927b4a7d39/redfish-core/include/event_service_manager.hpp#L316

So, clients written in typed languages cannot deserialize the response.

edtanous commented 2 days ago

Yep, this does appear to be incorrectly typed in code. Feel free to send patches to fix.

ifel commented 2 days ago

@edtanous already done, please review - https://github.com/openbmc/bmcweb/pull/291

edtanous commented 2 days ago

Patches need to be submitted to gerrit. Also FYI, there's two lines that need fixed, one for TestEvent and one for normal Event path.

ifel commented 2 days ago

Thanks, it took some time to recall how to use Gerrit, but I made it :)

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/75269

You're right, there is also the second place, modified it as well.