Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .generator/src/generator/templates/api.j2
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,15 @@ impl {{ structName }} {
yield team;
}

{%- if pagination.cursorParam %}
if count == 0 {
break;
}
{%- else %}
if count < page_size as usize {
break;
}
{%- endif %}

{%- if pagination.pageParam %}
{%- set getter, setter, required, schema = get_accessors(operation, pagination.pageParam) %}
Expand Down
1 change: 0 additions & 1 deletion src/datadogV1/api/api_dashboards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,6 @@ impl DashboardsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/datadogV1/api/api_monitors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,6 @@ impl MonitorsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/datadogV1/api/api_notebooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ impl NotebooksAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ impl ServiceLevelObjectiveCorrectionsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/datadogV1/api/api_service_level_objectives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,6 @@ impl ServiceLevelObjectivesAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/datadogV1/api/api_synthetics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3555,7 +3555,6 @@ impl SyntheticsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
6 changes: 2 additions & 4 deletions src/datadogV2/api/api_audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ impl AuditAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -413,8 +412,7 @@ impl AuditAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
1 change: 0 additions & 1 deletion src/datadogV2/api/api_bits_ai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ impl BitsAIAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/datadogV2/api/api_case_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3077,7 +3077,6 @@ impl CaseManagementAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
6 changes: 2 additions & 4 deletions src/datadogV2/api/api_ci_visibility_pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,7 @@ impl CIVisibilityPipelinesAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -751,8 +750,7 @@ impl CIVisibilityPipelinesAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
6 changes: 2 additions & 4 deletions src/datadogV2/api/api_ci_visibility_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ impl CIVisibilityTestsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -576,8 +575,7 @@ impl CIVisibilityTestsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
3 changes: 1 addition & 2 deletions src/datadogV2/api/api_container_images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ impl ContainerImagesAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
3 changes: 1 addition & 2 deletions src/datadogV2/api/api_containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ impl ContainersAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
2 changes: 0 additions & 2 deletions src/datadogV2/api/api_downtimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ impl DowntimesAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down Expand Up @@ -796,7 +795,6 @@ impl DowntimesAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
6 changes: 2 additions & 4 deletions src/datadogV2/api/api_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,7 @@ impl EventsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -686,8 +685,7 @@ impl EventsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
2 changes: 0 additions & 2 deletions src/datadogV2/api/api_incidents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6823,7 +6823,6 @@ impl IncidentsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down Expand Up @@ -7001,7 +7000,6 @@ impl IncidentsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
6 changes: 2 additions & 4 deletions src/datadogV2/api/api_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,7 @@ impl LogsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -638,8 +637,7 @@ impl LogsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
3 changes: 1 addition & 2 deletions src/datadogV2/api/api_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1723,8 +1723,7 @@ impl MetricsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
1 change: 0 additions & 1 deletion src/datadogV2/api/api_network_device_monitoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ impl NetworkDeviceMonitoringAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/datadogV2/api/api_powerpack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ impl PowerpackAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
3 changes: 1 addition & 2 deletions src/datadogV2/api/api_processes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ impl ProcessesAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
6 changes: 2 additions & 4 deletions src/datadogV2/api/api_rum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,8 +861,7 @@ impl RUMAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -1051,8 +1050,7 @@ impl RUMAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
2 changes: 0 additions & 2 deletions src/datadogV2/api/api_scorecards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,6 @@ impl ScorecardsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down Expand Up @@ -1621,7 +1620,6 @@ impl ScorecardsAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
15 changes: 5 additions & 10 deletions src/datadogV2/api/api_security_monitoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10744,8 +10744,7 @@ impl SecurityMonitoringAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(page) = resp.meta.page else { break };
Expand Down Expand Up @@ -11824,8 +11823,7 @@ impl SecurityMonitoringAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -12406,8 +12404,7 @@ impl SecurityMonitoringAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -14351,8 +14348,7 @@ impl SecurityMonitoringAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down Expand Up @@ -14732,8 +14728,7 @@ impl SecurityMonitoringAPI {
for team in r {
yield team;
}

if count < page_size as usize {
if count == 0 {
break;
}
let Some(meta) = resp.meta else { break };
Expand Down
1 change: 0 additions & 1 deletion src/datadogV2/api/api_service_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ impl ServiceDefinitionAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
3 changes: 0 additions & 3 deletions src/datadogV2/api/api_software_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ impl SoftwareCatalogAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down Expand Up @@ -752,7 +751,6 @@ impl SoftwareCatalogAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down Expand Up @@ -921,7 +919,6 @@ impl SoftwareCatalogAPI {
for team in r {
yield team;
}

if count < page_size as usize {
break;
}
Expand Down
Loading
Loading