Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove check_type parameter from ListTests endpoint #465

Merged
merged 1 commit into from
Sep 17, 2020
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.2.0",
"regenerated": "2020-09-16 15:43:27.803485",
"spec_repo_commit": "cbef552"
"regenerated": "2020-09-17 09:15:32.112617",
"spec_repo_commit": "2cc8a06"
},
"v2": {
"apigentools_version": "1.2.0",
"regenerated": "2020-09-16 15:43:33.662783",
"spec_repo_commit": "cbef552"
"regenerated": "2020-09-17 09:15:37.617382",
"spec_repo_commit": "2cc8a06"
}
}
}
2 changes: 1 addition & 1 deletion api/v1/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Class | Method | HTTP request | Description
*SyntheticsApi* | [**GetBrowserTestResult**](docs/SyntheticsApi.md#getbrowsertestresult) | **Get** /api/v1/synthetics/tests/browser/{public_id}/results/{result_id} | Get a test result (browser)
*SyntheticsApi* | [**GetTest**](docs/SyntheticsApi.md#gettest) | **Get** /api/v1/synthetics/tests/{public_id} | Get a test configuration (API)
*SyntheticsApi* | [**ListLocations**](docs/SyntheticsApi.md#listlocations) | **Get** /api/v1/synthetics/locations | Get all locations (public and private)
*SyntheticsApi* | [**ListTests**](docs/SyntheticsApi.md#listtests) | **Get** /api/v1/synthetics/tests | Get a list of tests
*SyntheticsApi* | [**ListTests**](docs/SyntheticsApi.md#listtests) | **Get** /api/v1/synthetics/tests | Get the list of all tests
*SyntheticsApi* | [**TriggerCITests**](docs/SyntheticsApi.md#triggercitests) | **Post** /api/v1/synthetics/tests/trigger/ci | Trigger some Synthetics tests for CI
*SyntheticsApi* | [**UpdateTest**](docs/SyntheticsApi.md#updatetest) | **Put** /api/v1/synthetics/tests/{public_id} | Edit a test
*SyntheticsApi* | [**UpdateTestPauseStatus**](docs/SyntheticsApi.md#updatetestpausestatus) | **Put** /api/v1/synthetics/tests/{public_id}/status | Pause or start a test
Expand Down
17 changes: 3 additions & 14 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4531,26 +4531,15 @@ paths:
- Synthetics
/api/v1/synthetics/tests:
get:
description: Get the list of all Synthetic tests (can be filtered by type).
description: Get the list of all Synthetic tests.
operationId: ListTests
parameters:
- description: API or browser to filter the list by test type, undefined to
get the unfiltered list.
explode: true
in: query
name: check_type
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/SyntheticsListTestsResponse'
description: OK - Returns the list of all Synthetic tests (properly filtered
by type).
description: OK - Returns the list of all Synthetic tests.
"403":
content:
application/json:
Expand All @@ -4563,7 +4552,7 @@ paths:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Synthetics is not activated for the user.
summary: Get a list of tests
summary: Get the list of all tests
tags:
- Synthetics
post:
Expand Down
13 changes: 2 additions & 11 deletions api/v1/datadog/api_synthetics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 5 additions & 10 deletions api/v1/datadog/docs/SyntheticsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Method | HTTP request | Description
[**GetBrowserTestResult**](SyntheticsApi.md#GetBrowserTestResult) | **Get** /api/v1/synthetics/tests/browser/{public_id}/results/{result_id} | Get a test result (browser)
[**GetTest**](SyntheticsApi.md#GetTest) | **Get** /api/v1/synthetics/tests/{public_id} | Get a test configuration (API)
[**ListLocations**](SyntheticsApi.md#ListLocations) | **Get** /api/v1/synthetics/locations | Get all locations (public and private)
[**ListTests**](SyntheticsApi.md#ListTests) | **Get** /api/v1/synthetics/tests | Get a list of tests
[**ListTests**](SyntheticsApi.md#ListTests) | **Get** /api/v1/synthetics/tests | Get the list of all tests
[**TriggerCITests**](SyntheticsApi.md#TriggerCITests) | **Post** /api/v1/synthetics/tests/trigger/ci | Trigger some Synthetics tests for CI
[**UpdateTest**](SyntheticsApi.md#UpdateTest) | **Put** /api/v1/synthetics/tests/{public_id} | Edit a test
[**UpdateTestPauseStatus**](SyntheticsApi.md#UpdateTestPauseStatus) | **Put** /api/v1/synthetics/tests/{public_id}/status | Pause or start a test
Expand Down Expand Up @@ -1018,9 +1018,9 @@ Other parameters are passed through a pointer to a apiListLocationsRequest struc

## ListTests

> SyntheticsListTestsResponse ListTests(ctx).CheckType(checkType).Execute()
> SyntheticsListTestsResponse ListTests(ctx).Execute()

Get a list of tests
Get the list of all tests



Expand Down Expand Up @@ -1050,11 +1050,10 @@ func main() {
},
)

checkType := "checkType_example" // string | API or browser to filter the list by test type, undefined to get the unfiltered list. (optional)

configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.SyntheticsApi.ListTests(ctx).CheckType(checkType).Execute()
resp, r, err := api_client.SyntheticsApi.ListTests(ctx).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.ListTests``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand All @@ -1066,17 +1065,13 @@ func main() {

### Path Parameters


This endpoint does not need any parameter.

### Other Parameters

Other parameters are passed through a pointer to a apiListTestsRequest struct via the builder pattern


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**checkType** | **string** | API or browser to filter the list by test type, undefined to get the unfiltered list. |

### Return type

[**SyntheticsListTestsResponse**](SyntheticsListTestsResponse.md)
Expand Down
12 changes: 6 additions & 6 deletions tests/api/v1/datadog/features/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip
Scenario: Get a list of tests returns "OK - Returns the list of all Synthetic tests (properly filtered by type)." response
Given new "ListTests" request
When the request is sent
Then the response status is 200 OK - Returns the list of all Synthetic tests (properly filtered by type).

@generated @skip
Scenario: Create a test returns "OK - Returns the created test details." response
Given new "CreateTest" request
Expand Down Expand Up @@ -129,3 +123,9 @@ Feature: Synthetics
And body {}
When the request is sent
Then the response status is 200 OK

@generated @skip
Scenario: Get the list of all tests returns "OK - Returns the list of all Synthetic tests." response
Given new "ListTests" request
When the request is sent
Then the response status is 200 OK - Returns the list of all Synthetic tests.