Elering / estfeed-datahub-docs

Estfeed Datahub Documentation
0 stars 0 forks source link

[EDH-2362] /authorization/search requires userName, but UI hacks it with empty [] #14

Closed EinarArro closed 1 month ago

EinarArro commented 2 months ago

Description

By the Swagger description the userName attribute is mandatory for the /authorization/search API But in order to support search by personal code only, the UI "hacks" it by sending empty array:

{code:java} { "marketParticipantContext": { "marketParticipantIdentification": "38X-EIN-ALL----B", "marketParticipantRole": "GRID_OPERATOR", "commodityType": "ELECTRICITY" }, "personalCode": "38210245217", "userName": [], "includeAssignableRoles": false } {code}

This kind of approach is not elegant. Developers should not make something mandatory and then come up with hacks to bypass it