Skip to content

Commit 2c2629a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add default values for NDM ListDevices endpoint parameters (#3471)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3f3188e commit 2c2629a

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

.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

src/main/java/com/datadog/api/client/v2/api/NetworkDeviceMonitoringApi.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ public static class ListDevicesOptionalParameters {
385385
/**
386386
* Set pageSize.
387387
*
388-
* @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default
389-
* to 10)
388+
* @param pageSize Size for a given page. The maximum allowed value is 500. Defaults to 50.
389+
* (optional, default to 50)
390390
* @return ListDevicesOptionalParameters
391391
*/
392392
public ListDevicesOptionalParameters pageSize(Long pageSize) {
@@ -397,7 +397,7 @@ public ListDevicesOptionalParameters pageSize(Long pageSize) {
397397
/**
398398
* Set pageNumber.
399399
*
400-
* @param pageNumber Specific page number to return. (optional, default to 0)
400+
* @param pageNumber Specific page number to return. Defaults to 0. (optional, default to 0)
401401
* @return ListDevicesOptionalParameters
402402
*/
403403
public ListDevicesOptionalParameters pageNumber(Long pageNumber) {
@@ -408,7 +408,8 @@ public ListDevicesOptionalParameters pageNumber(Long pageNumber) {
408408
/**
409409
* Set sort.
410410
*
411-
* @param sort The field to sort the devices by. (optional)
411+
* @param sort The field to sort the devices by. Defaults to <code>name</code>. (optional,
412+
* default to "name")
412413
* @return ListDevicesOptionalParameters
413414
*/
414415
public ListDevicesOptionalParameters sort(String sort) {
@@ -515,7 +516,7 @@ public PaginationIterable<DevicesListData> listDevicesWithPagination(
515516
Long limit;
516517

517518
if (parameters.pageSize == null) {
518-
limit = 10l;
519+
limit = 50l;
519520
parameters.pageSize(limit);
520521
} else {
521522
limit = parameters.pageSize;

0 commit comments

Comments
 (0)