Skip to content

SDTList (/sdt/sdts): swagger SDT model omits entity fields the API returns (deviceDisplayName, deviceId, deviceGroupId, dataSource*) #53

Description

@rdmarsh

Summary

The LM swagger SDT model (used by GET /sdt/sdts, i.e. SDTList) does not
declare the entity-identifying fields that the API actually returns. As a result,
any field projection on those fields is rejected as an "unknown field" even though
the API returns them correctly.

This is an upstream LM swagger gap, not an elm bug — elm validates -f against the
declared response schema, which is incomplete.

Affected endpoint

  • SDTListGET /sdt/sdts

Evidence

The swagger SDT definition declares only generic scheduling fields:

admin, comment, defaultValue, duration, endDateTime, endDateTimeOnLocal,
endHour, endMinute, hour, id, isEffective, minute, monthDay, sdtType,
startDateTime, startDateTimeOnLocal, timezone, type, weekDay, weekOfMonth

But the API returns these additional fields, none of which are declared on SDT
(or on the empty type subclasses ResourceSDT / ResourceGroupSDT /
DeviceDataSourceInstanceSDT):

deviceId, deviceDisplayName, deviceGroupId, deviceGroupFullPath,
dataSourceId, dataSourceName, dataSourceInstanceId, dataSourceInstanceName

These are exactly the fields needed to tell what each SDT applies to (a device,
a group, or an instance), so their omission is significant.

Reproduction

$ elm SDTList -s0 -f deviceDisplayName,startDateTime,endDateTime,comment
{"SDTList": [ ... records, including a populated "deviceDisplayName" ... ]}
Warning: unknown field: deviceDisplayName

The warning fires because deviceDisplayName is absent from the declared schema,
yet the value is present in the response. Same applies to deviceId,
deviceGroupId, deviceGroupFullPath, and the dataSource* fields.

Impact

  • -f projection on these fields emits a spurious unknown field warning.
  • Tooling that validates against the swagger schema (or merging stderr into the
    JSON stream) can be tripped up by the warning.
  • The field still works — elm passes it through — so the practical workaround is to
    omit it from -f and let the full record come back, then pick the field
    client-side.

Notes

  • Verified against an acme sandbox portal; the API returns the undeclared fields
    consistently across ResourceSDT, ResourceGroupSDT, and
    DeviceDataSourceInstanceSDT records.
  • Related to the broader swagger-completeness gaps tracked in LM swagger missing standard query params on multiple endpoints #47.
  • Upstream LM issue — keep open until the LM swagger SDT model is corrected; do not
    close on an elm-side workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream-bugBug in an upstream dependency (LM API, etc.) — should be raised with vendor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions