diff --git a/.apigentools-info b/.apigentools-info index 435d1e6cf8..4f71fad68b 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-07 14:48:21.110074", - "spec_repo_commit": "dbf17f07" + "regenerated": "2024-03-07 16:40:15.725956", + "spec_repo_commit": "ba5b230c" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-07 14:48:21.127279", - "spec_repo_commit": "dbf17f07" + "regenerated": "2024-03-07 16:40:15.743321", + "spec_repo_commit": "ba5b230c" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4593428f90..9201083ceb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32455,7 +32455,7 @@ paths: - Service Definition x-pagination: limitParam: page[size] - pageOffsetParam: page[number] + pageParam: page[number] resultsPath: data post: description: Create or update service definition in the Datadog Service Catalog. diff --git a/src/datadog_api_client/v2/api/service_definition_api.py b/src/datadog_api_client/v2/api/service_definition_api.py index d52aa9102f..fa9be4638b 100644 --- a/src/datadog_api_client/v2/api/service_definition_api.py +++ b/src/datadog_api_client/v2/api/service_definition_api.py @@ -266,7 +266,7 @@ def list_service_definitions_with_pagination( pagination = { "limit_value": local_page_size, "results_path": "data", - "page_offset_param": "page_number", + "page_param": "page_number", "endpoint": endpoint, "kwargs": kwargs, } diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_service_definitions_returns_ok_response_with_pagination.yaml b/tests/v2/cassettes/test_scenarios/test_get_all_service_definitions_returns_ok_response_with_pagination.yaml index 00b3fe23b6..5b5b952493 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_all_service_definitions_returns_ok_response_with_pagination.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_all_service_definitions_returns_ok_response_with_pagination.yaml @@ -5,7 +5,7 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/services/definitions?page%5Bsize%5D=2 + uri: https://api.datadoghq.com/api/v2/services/definitions?page%5Bsize%5D=2&page%5Bnumber%5D=0 response: body: string: '{"data":[{"type":"service-definition","id":"000c4db9ae43787066748b39ad1c3059","attributes":{"meta":{"last-modified-time":"2023-04-03T20:23:00Z","github-html-url":"","ingestion-source":"api","origin":"unknown","origin-detail":"","warnings":[],"ingested-schema-version":"v2.1"},"schema":{"schema-version":"v2.1","dd-service":"service-examplecreateorupdateservicedefinitionusingschemav21returnscreatedresponse1680553380","team":"my-team","contacts":[{"name":"Team @@ -29,7 +29,7 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/services/definitions?page%5Bsize%5D=2&page%5Bnumber%5D=2 + uri: https://api.datadoghq.com/api/v2/services/definitions?page%5Bsize%5D=2&page%5Bnumber%5D=1 response: body: string: '{"data":[{"type":"service-definition","id":"0059bcab67b74e99cc832ca503019574","attributes":{"meta":{"last-modified-time":"2023-03-02T12:21:20Z","github-html-url":"","ingestion-source":"api","origin":"dd_terraform","origin-detail":"","warnings":[{"keyword-location":"/properties/contacts/items/$ref/allOf/1/then/properties/contact/pattern","instance-location":"/contacts/0/contact","message":"does