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

Cleanup path replacement #2852

Merged
merged 2 commits into from
Dec 20, 2024
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
2 changes: 1 addition & 1 deletion .generator/src/generator/templates/api.j2
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (a *{{ classname }}) {{ operation.operationId }}(ctx _context.Context{% for

localVarPath := localBasePath + "{{ path }}"
{%- for name, parameter in operation|parameters if parameter.in == "path" %}
localVarPath = strings.Replace(localVarPath, "{"+"{{ name }}"+"}", _neturl.PathEscape({{ common_package_name }}.ParameterToString({{ name|variable_name}}, "{{ parameter|collection_format }}")), -1)
localVarPath = {{ common_package_name }}.ReplacePathParameter(localVarPath, "{% raw %}{{% endraw %}{{ name }}{% raw %}}{% endraw %}", _neturl.PathEscape({{ common_package_name }}.ParameterToString({{ name|variable_name}}, "{{ parameter|collection_format }}")))
{%- endfor %}

localVarHeaderParams := make(map[string]string)
Expand Down
7 changes: 6 additions & 1 deletion .generator/src/generator/templates/client.j2
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func ParameterToString(obj interface{}, collectionFormat string) string {
}

if reflect.TypeOf(obj).Kind() == reflect.Slice {
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
return strings.Trim(strings.ReplaceAll(fmt.Sprint(obj), " ", delimiter), "[]")
} else if t, ok := obj.(time.Time); ok {
if t.Nanosecond() == 0 {
return t.Format("2006-01-02T15:04:05Z07:00")
Expand All @@ -118,6 +118,11 @@ func ParameterToString(obj interface{}, collectionFormat string) string {
return fmt.Sprintf("%v", obj)
}

// ReplacePathParameter replace all occurrences of `pathKey` in `path` with `parameterValue`.
func ReplacePathParameter(path, pathKey, parameterValue string) string {
return strings.ReplaceAll(path, pathKey, parameterValue)
}

{# The method is used in Terraform client and needs to be public. -#}
// CallAPI do the request.
func (c *APIClient) CallAPI(request *http.Request) (*http.Response, error) {
Expand Down
7 changes: 6 additions & 1 deletion api/datadog/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func ParameterToString(obj interface{}, collectionFormat string) string {
}

if reflect.TypeOf(obj).Kind() == reflect.Slice {
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
return strings.Trim(strings.ReplaceAll(fmt.Sprint(obj), " ", delimiter), "[]")
} else if t, ok := obj.(time.Time); ok {
if t.Nanosecond() == 0 {
return t.Format("2006-01-02T15:04:05Z07:00")
Expand All @@ -120,6 +120,11 @@ func ParameterToString(obj interface{}, collectionFormat string) string {
return fmt.Sprintf("%v", obj)
}

// ReplacePathParameter replace all occurrences of `pathKey` in `path` with `parameterValue`.
func ReplacePathParameter(path, pathKey, parameterValue string) string {
return strings.ReplaceAll(path, pathKey, parameterValue)
}

// CallAPI do the request.
func (c *APIClient) CallAPI(request *http.Request) (*http.Response, error) {
var rawBody []byte
Expand Down
7 changes: 3 additions & 4 deletions api/datadogV1/api_dashboard_lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand Down Expand Up @@ -104,7 +103,7 @@ func (a *DashboardListsApi) DeleteDashboardList(ctx _context.Context, listId int
}

localVarPath := localBasePath + "/api/v1/dashboard/lists/manual/{list_id}"
localVarPath = strings.Replace(localVarPath, "{"+"list_id"+"}", _neturl.PathEscape(datadog.ParameterToString(listId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{list_id}", _neturl.PathEscape(datadog.ParameterToString(listId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -175,7 +174,7 @@ func (a *DashboardListsApi) GetDashboardList(ctx _context.Context, listId int64)
}

localVarPath := localBasePath + "/api/v1/dashboard/lists/manual/{list_id}"
localVarPath = strings.Replace(localVarPath, "{"+"list_id"+"}", _neturl.PathEscape(datadog.ParameterToString(listId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{list_id}", _neturl.PathEscape(datadog.ParameterToString(listId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -316,7 +315,7 @@ func (a *DashboardListsApi) UpdateDashboardList(ctx _context.Context, listId int
}

localVarPath := localBasePath + "/api/v1/dashboard/lists/manual/{list_id}"
localVarPath = strings.Replace(localVarPath, "{"+"list_id"+"}", _neturl.PathEscape(datadog.ParameterToString(listId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{list_id}", _neturl.PathEscape(datadog.ParameterToString(listId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
19 changes: 9 additions & 10 deletions api/datadogV1/api_dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand Down Expand Up @@ -178,7 +177,7 @@ func (a *DashboardsApi) DeleteDashboard(ctx _context.Context, dashboardId string
}

localVarPath := localBasePath + "/api/v1/dashboard/{dashboard_id}"
localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", _neturl.PathEscape(datadog.ParameterToString(dashboardId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{dashboard_id}", _neturl.PathEscape(datadog.ParameterToString(dashboardId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -312,7 +311,7 @@ func (a *DashboardsApi) DeletePublicDashboard(ctx _context.Context, token string
}

localVarPath := localBasePath + "/api/v1/dashboard/public/{token}"
localVarPath = strings.Replace(localVarPath, "{"+"token"+"}", _neturl.PathEscape(datadog.ParameterToString(token, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{token}", _neturl.PathEscape(datadog.ParameterToString(token, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -382,7 +381,7 @@ func (a *DashboardsApi) DeletePublicDashboardInvitation(ctx _context.Context, to
}

localVarPath := localBasePath + "/api/v1/dashboard/public/{token}/invitation"
localVarPath = strings.Replace(localVarPath, "{"+"token"+"}", _neturl.PathEscape(datadog.ParameterToString(token, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{token}", _neturl.PathEscape(datadog.ParameterToString(token, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -447,7 +446,7 @@ func (a *DashboardsApi) GetDashboard(ctx _context.Context, dashboardId string) (
}

localVarPath := localBasePath + "/api/v1/dashboard/{dashboard_id}"
localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", _neturl.PathEscape(datadog.ParameterToString(dashboardId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{dashboard_id}", _neturl.PathEscape(datadog.ParameterToString(dashboardId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -518,7 +517,7 @@ func (a *DashboardsApi) GetPublicDashboard(ctx _context.Context, token string) (
}

localVarPath := localBasePath + "/api/v1/dashboard/public/{token}"
localVarPath = strings.Replace(localVarPath, "{"+"token"+"}", _neturl.PathEscape(datadog.ParameterToString(token, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{token}", _neturl.PathEscape(datadog.ParameterToString(token, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -621,7 +620,7 @@ func (a *DashboardsApi) GetPublicDashboardInvitations(ctx _context.Context, toke
}

localVarPath := localBasePath + "/api/v1/dashboard/public/{token}/invitation"
localVarPath = strings.Replace(localVarPath, "{"+"token"+"}", _neturl.PathEscape(datadog.ParameterToString(token, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{token}", _neturl.PathEscape(datadog.ParameterToString(token, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -942,7 +941,7 @@ func (a *DashboardsApi) SendPublicDashboardInvitation(ctx _context.Context, toke
}

localVarPath := localBasePath + "/api/v1/dashboard/public/{token}/invitation"
localVarPath = strings.Replace(localVarPath, "{"+"token"+"}", _neturl.PathEscape(datadog.ParameterToString(token, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{token}", _neturl.PathEscape(datadog.ParameterToString(token, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -1016,7 +1015,7 @@ func (a *DashboardsApi) UpdateDashboard(ctx _context.Context, dashboardId string
}

localVarPath := localBasePath + "/api/v1/dashboard/{dashboard_id}"
localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", _neturl.PathEscape(datadog.ParameterToString(dashboardId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{dashboard_id}", _neturl.PathEscape(datadog.ParameterToString(dashboardId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -1090,7 +1089,7 @@ func (a *DashboardsApi) UpdatePublicDashboard(ctx _context.Context, token string
}

localVarPath := localBasePath + "/api/v1/dashboard/public/{token}"
localVarPath = strings.Replace(localVarPath, "{"+"token"+"}", _neturl.PathEscape(datadog.ParameterToString(token, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{token}", _neturl.PathEscape(datadog.ParameterToString(token, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
9 changes: 4 additions & 5 deletions api/datadogV1/api_downtimes.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand All @@ -32,7 +31,7 @@ func (a *DowntimesApi) CancelDowntime(ctx _context.Context, downtimeId int64) (*
}

localVarPath := localBasePath + "/api/v1/downtime/{downtime_id}"
localVarPath = strings.Replace(localVarPath, "{"+"downtime_id"+"}", _neturl.PathEscape(datadog.ParameterToString(downtimeId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{downtime_id}", _neturl.PathEscape(datadog.ParameterToString(downtimeId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -246,7 +245,7 @@ func (a *DowntimesApi) GetDowntime(ctx _context.Context, downtimeId int64) (Down
}

localVarPath := localBasePath + "/api/v1/downtime/{downtime_id}"
localVarPath = strings.Replace(localVarPath, "{"+"downtime_id"+"}", _neturl.PathEscape(datadog.ParameterToString(downtimeId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{downtime_id}", _neturl.PathEscape(datadog.ParameterToString(downtimeId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -429,7 +428,7 @@ func (a *DowntimesApi) ListMonitorDowntimes(ctx _context.Context, monitorId int6
}

localVarPath := localBasePath + "/api/v1/monitor/{monitor_id}/downtimes"
localVarPath = strings.Replace(localVarPath, "{"+"monitor_id"+"}", _neturl.PathEscape(datadog.ParameterToString(monitorId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{monitor_id}", _neturl.PathEscape(datadog.ParameterToString(monitorId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -502,7 +501,7 @@ func (a *DowntimesApi) UpdateDowntime(ctx _context.Context, downtimeId int64, bo
}

localVarPath := localBasePath + "/api/v1/downtime/{downtime_id}"
localVarPath = strings.Replace(localVarPath, "{"+"downtime_id"+"}", _neturl.PathEscape(datadog.ParameterToString(downtimeId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{downtime_id}", _neturl.PathEscape(datadog.ParameterToString(downtimeId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
3 changes: 1 addition & 2 deletions api/datadogV1/api_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand Down Expand Up @@ -107,7 +106,7 @@ func (a *EventsApi) GetEvent(ctx _context.Context, eventId int64) (EventResponse
}

localVarPath := localBasePath + "/api/v1/events/{event_id}"
localVarPath = strings.Replace(localVarPath, "{"+"event_id"+"}", _neturl.PathEscape(datadog.ParameterToString(eventId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{event_id}", _neturl.PathEscape(datadog.ParameterToString(eventId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
5 changes: 2 additions & 3 deletions api/datadogV1/api_hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand Down Expand Up @@ -301,7 +300,7 @@ func (a *HostsApi) MuteHost(ctx _context.Context, hostName string, body HostMute
}

localVarPath := localBasePath + "/api/v1/host/{host_name}/mute"
localVarPath = strings.Replace(localVarPath, "{"+"host_name"+"}", _neturl.PathEscape(datadog.ParameterToString(hostName, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{host_name}", _neturl.PathEscape(datadog.ParameterToString(hostName, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -375,7 +374,7 @@ func (a *HostsApi) UnmuteHost(ctx _context.Context, hostName string) (HostMuteRe
}

localVarPath := localBasePath + "/api/v1/host/{host_name}/unmute"
localVarPath = strings.Replace(localVarPath, "{"+"host_name"+"}", _neturl.PathEscape(datadog.ParameterToString(hostName, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{host_name}", _neturl.PathEscape(datadog.ParameterToString(hostName, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
13 changes: 6 additions & 7 deletions api/datadogV1/api_key_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand Down Expand Up @@ -177,7 +176,7 @@ func (a *KeyManagementApi) DeleteAPIKey(ctx _context.Context, key string) (ApiKe
}

localVarPath := localBasePath + "/api/v1/api_key/{key}"
localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(datadog.ParameterToString(key, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{key}", _neturl.PathEscape(datadog.ParameterToString(key, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -248,7 +247,7 @@ func (a *KeyManagementApi) DeleteApplicationKey(ctx _context.Context, key string
}

localVarPath := localBasePath + "/api/v1/application_key/{key}"
localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(datadog.ParameterToString(key, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{key}", _neturl.PathEscape(datadog.ParameterToString(key, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -319,7 +318,7 @@ func (a *KeyManagementApi) GetAPIKey(ctx _context.Context, key string) (ApiKeyRe
}

localVarPath := localBasePath + "/api/v1/api_key/{key}"
localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(datadog.ParameterToString(key, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{key}", _neturl.PathEscape(datadog.ParameterToString(key, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -390,7 +389,7 @@ func (a *KeyManagementApi) GetApplicationKey(ctx _context.Context, key string) (
}

localVarPath := localBasePath + "/api/v1/application_key/{key}"
localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(datadog.ParameterToString(key, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{key}", _neturl.PathEscape(datadog.ParameterToString(key, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -601,7 +600,7 @@ func (a *KeyManagementApi) UpdateAPIKey(ctx _context.Context, key string, body A
}

localVarPath := localBasePath + "/api/v1/api_key/{key}"
localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(datadog.ParameterToString(key, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{key}", _neturl.PathEscape(datadog.ParameterToString(key, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -675,7 +674,7 @@ func (a *KeyManagementApi) UpdateApplicationKey(ctx _context.Context, key string
}

localVarPath := localBasePath + "/api/v1/application_key/{key}"
localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(datadog.ParameterToString(key, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{key}", _neturl.PathEscape(datadog.ParameterToString(key, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
5 changes: 2 additions & 3 deletions api/datadogV1/api_logs_indexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand Down Expand Up @@ -113,7 +112,7 @@ func (a *LogsIndexesApi) GetLogsIndex(ctx _context.Context, name string) (LogsIn
}

localVarPath := localBasePath + "/api/v1/logs/config/indexes/{name}"
localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", _neturl.PathEscape(datadog.ParameterToString(name, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{name}", _neturl.PathEscape(datadog.ParameterToString(name, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -338,7 +337,7 @@ func (a *LogsIndexesApi) UpdateLogsIndex(ctx _context.Context, name string, body
}

localVarPath := localBasePath + "/api/v1/logs/config/indexes/{name}"
localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", _neturl.PathEscape(datadog.ParameterToString(name, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{name}", _neturl.PathEscape(datadog.ParameterToString(name, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
7 changes: 3 additions & 4 deletions api/datadogV1/api_logs_pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_context "context"
_nethttp "net/http"
_neturl "net/url"
"strings"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)
Expand Down Expand Up @@ -113,7 +112,7 @@ func (a *LogsPipelinesApi) DeleteLogsPipeline(ctx _context.Context, pipelineId s
}

localVarPath := localBasePath + "/api/v1/logs/config/pipelines/{pipeline_id}"
localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", _neturl.PathEscape(datadog.ParameterToString(pipelineId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pipeline_id}", _neturl.PathEscape(datadog.ParameterToString(pipelineId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -185,7 +184,7 @@ func (a *LogsPipelinesApi) GetLogsPipeline(ctx _context.Context, pipelineId stri
}

localVarPath := localBasePath + "/api/v1/logs/config/pipelines/{pipeline_id}"
localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", _neturl.PathEscape(datadog.ParameterToString(pipelineId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pipeline_id}", _neturl.PathEscape(datadog.ParameterToString(pipelineId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down Expand Up @@ -410,7 +409,7 @@ func (a *LogsPipelinesApi) UpdateLogsPipeline(ctx _context.Context, pipelineId s
}

localVarPath := localBasePath + "/api/v1/logs/config/pipelines/{pipeline_id}"
localVarPath = strings.Replace(localVarPath, "{"+"pipeline_id"+"}", _neturl.PathEscape(datadog.ParameterToString(pipelineId, "")), -1)
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pipeline_id}", _neturl.PathEscape(datadog.ParameterToString(pipelineId, "")))

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
Expand Down
Loading
Loading