Skip to content

Commit

Permalink
Regenerate client from commit 6ccf2a1f of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Dec 6, 2023
1 parent 01b763a commit c60cc2d
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 47 deletions.
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.6.6",
"regenerated": "2023-12-05 19:40:55.716902",
"spec_repo_commit": "334a5ac9"
"regenerated": "2023-12-06 19:01:02.661513",
"spec_repo_commit": "6ccf2a1f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-05 19:40:55.735172",
"spec_repo_commit": "334a5ac9"
"regenerated": "2023-12-06 19:01:02.681746",
"spec_repo_commit": "6ccf2a1f"
}
}
}
6 changes: 0 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22325,9 +22325,6 @@ paths:
cursorPath: meta.page.after
limitParam: page[limit]
resultsPath: data
x-unstable: '**Note**: This endpoint is in beta.

For access, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/events/search:
post:
description: 'List endpoint returns events that match an events search query.
Expand Down Expand Up @@ -22370,9 +22367,6 @@ paths:
cursorPath: meta.page.after
limitParam: body.page.limit
resultsPath: data
x-unstable: '**Note**: This endpoint is in beta.

For access, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents:
get:
description: Get all incidents for the user's organization.
Expand Down
2 changes: 0 additions & 2 deletions api/datadog/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ func NewConfiguration() *Configuration {
"v2.GetMonthlyCostAttribution": false,
"v2.CreateDORADeployment": false,
"v2.CreateDORAIncident": false,
"v2.ListEvents": false,
"v2.SearchEvents": false,
"v2.CreateIncident": false,
"v2.CreateIncidentIntegration": false,
"v2.CreateIncidentTodo": false,
Expand Down
16 changes: 0 additions & 16 deletions api/datadogV2/api_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ package datadogV2

import (
_context "context"
_fmt "fmt"
_log "log"
_nethttp "net/http"
_neturl "net/url"

Expand Down Expand Up @@ -89,13 +87,6 @@ func (a *EventsApi) ListEvents(ctx _context.Context, o ...ListEventsOptionalPara
optionalParams = o[0]
}

operationId := "v2.ListEvents"
if a.Client.Cfg.IsUnstableOperationEnabled(operationId) {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
} else {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.EventsApi.ListEvents")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down Expand Up @@ -270,13 +261,6 @@ func (a *EventsApi) SearchEvents(ctx _context.Context, o ...SearchEventsOptional
optionalParams = o[0]
}

operationId := "v2.SearchEvents"
if a.Client.Cfg.IsUnstableOperationEnabled(operationId) {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
} else {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.EventsApi.SearchEvents")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/ListEvents.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.ListEvents", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewEventsApi(apiClient)
resp, r, err := api.ListEvents(ctx, *datadogV2.NewListEventsOptionalParameters())
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/ListEvents_1527584014.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.ListEvents", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewEventsApi(apiClient)
resp, _ := api.ListEventsWithPagination(ctx, *datadogV2.NewListEventsOptionalParameters().WithFilterFrom("now-15m").WithFilterTo("now").WithPageLimit(2))
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/ListEvents_2663715109.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.ListEvents", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewEventsApi(apiClient)
resp, r, err := api.ListEvents(ctx, *datadogV2.NewListEventsOptionalParameters().WithFilterQuery("datadog-agent").WithFilterFrom("2020-09-17T11:48:36+01:00").WithFilterTo("2020-09-17T12:48:36+01:00").WithPageLimit(5))
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/SearchEvents.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func main() {
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.SearchEvents", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewEventsApi(apiClient)
resp, r, err := api.SearchEvents(ctx, *datadogV2.NewSearchEventsOptionalParameters().WithBody(body))
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/SearchEvents_3856995058.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func main() {
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.SearchEvents", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewEventsApi(apiClient)
resp, _ := api.SearchEventsWithPagination(ctx, *datadogV2.NewSearchEventsOptionalParameters().WithBody(body))
Expand Down
21 changes: 7 additions & 14 deletions tests/scenarios/features/v2/events.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ Feature: Events

@generated @skip @team:DataDog/event-management
Scenario: Get a list of events returns "Bad Request" response
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
When the request is sent
Then the response status is 400 Bad Request

@skip-validation @team:DataDog/event-management
Scenario: Get a list of events returns "OK" response
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
When the request is sent
Then the response status is 200 OK

@replay-only @skip-validation @team:DataDog/event-management @with-pagination
Scenario: Get a list of events returns "OK" response with pagination
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
And request contains "filter[from]" parameter with value "now-15m"
And request contains "filter[to]" parameter with value "now"
And request contains "page[limit]" parameter with value 2
Expand All @@ -37,8 +34,7 @@ Feature: Events

@team:DataDog/event-management
Scenario: Get a quick list of events returns "OK" response
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
And request contains "filter[query]" parameter with value "datadog-agent"
And request contains "filter[from]" parameter with value "2020-09-17T11:48:36+01:00"
And request contains "filter[to]" parameter with value "2020-09-17T12:48:36+01:00"
Expand All @@ -49,25 +45,22 @@ Feature: Events

@team:DataDog/event-management
Scenario: Search events returns "Bad Request" response
Given operation "SearchEvents" enabled
And new "SearchEvents" request
Given new "SearchEvents" request
And body with value {"filter": {"from": "now-15m", "query": "service:web* AND @http.status_code:[200 TO 299]", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/event-management
Scenario: Search events returns "OK" response
Given operation "SearchEvents" enabled
And new "SearchEvents" request
Given new "SearchEvents" request
And body with value {"filter": {"query": "datadog-agent", "from": "2020-09-17T11:48:36+01:00", "to": "2020-09-17T12:48:36+01:00"}, "sort": "timestamp", "page": {"limit": 5}}
When the request is sent
Then the response status is 200 OK
And the response "data" has length 0

@replay-only @skip-validation @team:DataDog/event-management @with-pagination
Scenario: Search events returns "OK" response with pagination
Given operation "SearchEvents" enabled
And new "SearchEvents" request
Given new "SearchEvents" request
And body with value {"filter": {"from": "now-15m", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"}
When the request with pagination is sent
Then the response status is 200 OK
Expand Down

0 comments on commit c60cc2d

Please sign in to comment.