Skip to content

Commit 4d8525c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add default values for NDM ListDevices endpoint parameters (DataDog#2990)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a8dde96 commit 4d8525c

2 files changed

Lines changed: 29 additions & 7 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,27 @@ components:
783783
required: false
784784
schema:
785785
type: string
786+
NDMPageNumber:
787+
description: Specific page number to return. Defaults to 0.
788+
in: query
789+
name: page[number]
790+
required: false
791+
schema:
792+
default: 0
793+
example: 0
794+
format: int64
795+
type: integer
796+
NDMPageSize:
797+
description: Size for a given page. The maximum allowed value is 500. Defaults
798+
to 50.
799+
in: query
800+
name: page[size]
801+
required: false
802+
schema:
803+
default: 50
804+
example: 50
805+
format: int64
806+
type: integer
786807
NotificationRuleIDPathParameter:
787808
description: Notification Rule UUID
788809
example: e555e290-ed65-49bd-ae18-8acbfcf18db7
@@ -86135,14 +86156,15 @@ paths:
8613586156
description: Get the list of devices.
8613686157
operationId: ListDevices
8613786158
parameters:
86138-
- $ref: '#/components/parameters/PageSize'
86139-
- $ref: '#/components/parameters/PageNumber'
86140-
- description: The field to sort the devices by.
86159+
- $ref: '#/components/parameters/NDMPageSize'
86160+
- $ref: '#/components/parameters/NDMPageNumber'
86161+
- description: The field to sort the devices by. Defaults to `name`.
8614186162
example: status
8614286163
in: query
8614386164
name: sort
8614486165
required: false
8614586166
schema:
86167+
default: name
8614686168
type: string
8614786169
- description: Filter devices by tag.
8614886170
example: status:ok

lib/datadog_api_client/v2/api/network_device_monitoring_api.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ def list_devices(opts = {})
169169
# Get the list of devices.
170170
#
171171
# @param opts [Hash] the optional parameters
172-
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
173-
# @option opts [Integer] :page_number Specific page number to return.
174-
# @option opts [String] :sort The field to sort the devices by.
172+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 500. Defaults to 50.
173+
# @option opts [Integer] :page_number Specific page number to return. Defaults to 0.
174+
# @option opts [String] :sort The field to sort the devices by. Defaults to `name`.
175175
# @option opts [String] :filter_tag Filter devices by tag.
176176
# @return [Array<(ListDevicesResponse, Integer, Hash)>] ListDevicesResponse data, response status code and response headers
177177
def list_devices_with_http_info(opts = {})
@@ -233,7 +233,7 @@ def list_devices_with_http_info(opts = {})
233233
# @yield [DevicesListData] Paginated items
234234
def list_devices_with_pagination(opts = {})
235235
api_version = "V2"
236-
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
236+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 50)
237237
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
238238
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0)
239239
while true do

0 commit comments

Comments
 (0)