We might have to drop support in R5 for this REST interface due to this:
,"msg":"Error 1 Decoding (unpack) E2SM message from : E2SM-gNB-NRT-RANfunction-Definition"}
It points to function RAN_Function_list_To_Vector() in “sctpThread.cpp”, which I guess translates the ASN.1 from PER to XER (XML) before sending to E2SM.
There are many potential short and long-term solution.
Long-term one would be to have some kind of plugin approach. This plugin could be a E2SM function handling xApp that is potentially combined with actual "xApp functionality". But it could be also a simple E2SM-function definition encoding to which E2M can outsource the decoding of the function definitions.