Skip to content

Typing Inconsistency for "v1.SearchSLOResponse" on GET /api/v1/slo endpoints #1461

Open
@Vroomfrondal

Description

@Vroomfrondal

Describe the bug
Bad key typing on the v1.SearchSLOResponse typescript type for GET /api/v1/slo/search. Proper response type is in snake_case while intellisense suggests camelCase for the property type.

Example 1:

const type = sloData.data.attributes.slos[0].data.attributes?.sloType // actual property is `.slo_type`

Example 2:

const status = sloData.data.attributes.slos[0].data.attributes?.overallStatus // actual property is `.overall_status`

To Reproduce

  1. in a typescript environment create a GET request to https://api.datadoghq.com/api/v1/slo/search
  2. Ensure the response type is using v1.SearchSLOResponse
  3. View the response data and observe examples listed above within code-editors intellisense

Expected behavior

  • When using the property in code you should see a snake_case suggestion.

Screenshots
Screenshot 2023-12-19 at 3 01 46 PM

Environment and Versions (please complete the following information):

  • datadog/datadog-api-client version 1.19.0
  • Typescript

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions