dataplaneapi icon indicating copy to clipboard operation
dataplaneapi copied to clipboard

Inaccurate Enum Values in OpenAPI Specification for /services/haproxy/stats/native Endpoint

Open SergeyZvyagin opened this issue 7 months ago • 2 comments

Hello!

According to the OpenAPI specification provided on this page, the status and check_status fields in the response from the GET /services/haproxy/stats/native endpoint are expected to have the following values:

Field Acceptable values
status UP, DOWN, NOLB, MAINT, no check
check_status UNK, INI, SOCKERR, L4OK, L4TOUT, L4CON, L6OK, L6TOUT, L6RSP, L7OK, L7OKC, L7TOUT, L7RSP, L7STS

However, in actuality, the Data Plane API returns values such as UP 1/2, DOWN 1/5, or * L4TOUT, etc., which are valid according to HAProxy, but are not covered by the OpenAPI specification. I'm not entirely sure about other cases, but this could be one of many mismatches between the specification and the API behavior.

Thanks!

SergeyZvyagin avatar May 06 '25 14:05 SergeyZvyagin

Hi thank you for the report, we'll check this and update the enums properly.

mjuraga avatar May 09 '25 12:05 mjuraga

It's worth noting that while it might be sufficient to add values with * to the check_status enum, the variety of threshold check states required for changing statuses in the status field cannot be displayed as enum, as these are configurable parameters.

A good solution could be, for example, to display these markers (* and x/x) in new separate fields.

Thanks!

SergeyZvyagin avatar May 21 '25 11:05 SergeyZvyagin