diff --git a/import-export-cli/box/resources/init/api_params.tmpl b/import-export-cli/box/resources/init/api_params.tmpl index ee9a80984..0af10d357 100644 --- a/import-export-cli/box/resources/init/api_params.tmpl +++ b/import-export-cli/box/resources/init/api_params.tmpl @@ -2,7 +2,5 @@ environments:{{- range $name, $elem := . }} - name: {{ $name }} endpoints: production: - url: sandbox: - url: {{- end }} diff --git a/import-export-cli/specs/params/params.go b/import-export-cli/specs/params/params.go index d5d188578..959e5aeb8 100644 --- a/import-export-cli/specs/params/params.go +++ b/import-export-cli/specs/params/params.go @@ -104,25 +104,9 @@ func loadApiParams(r io.Reader) (*ApiParams, error) { return nil, err } - // Cleanup empty URLs - cleanEmptyEnvironmentURLs(apiParams.Environments) return apiParams, nil } -// Remove whole production/sandbox endpoint sections of each environment when corresponding urls are empty -func cleanEmptyEnvironmentURLs (envs []Environment) { - for _, env := range envs { - if env.Endpoints != nil { - if env.Endpoints.Production != nil && env.Endpoints.Production.Url == nil { - env.Endpoints.Production = nil - } - if env.Endpoints.Sandbox != nil && env.Endpoints.Sandbox.Url == nil { - env.Endpoints.Sandbox = nil - } - } - } -} - // LoadApiParamsFromFile loads a configuration YAML file located in path. It returns an error or a valid ApiParams func LoadApiParamsFromFile(path string) (*ApiParams, error) { r, err := os.Open(path)