Closed EinarArro closed 1 month ago
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
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