From 86b8cfec22076a97239d01c047e1b45482a23799 Mon Sep 17 00:00:00 2001 From: Daniel Isaac Khan Ramiro Date: Sun, 23 Sep 2018 18:06:04 -0700 Subject: [PATCH] quick method rename GetAPIBackendConfiguration --- openapi/openapi_spec_analyser.go | 4 ++-- openapi/openapi_spec_analyser_stub.go | 2 +- openapi/openapi_v2_spec_analyser.go | 4 ++-- openapi/provider_factory.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openapi/openapi_spec_analyser.go b/openapi/openapi_spec_analyser.go index 172972f5a..3c4c372f7 100644 --- a/openapi/openapi_spec_analyser.go +++ b/openapi/openapi_spec_analyser.go @@ -24,10 +24,10 @@ type SpecAnalyser interface { // provider; so users can provide values for the headers that are meant to be sent along with the operations the headers // are defined in. GetAllHeaderParameters() (SpecHeaderParameters, error) - // GetOpenAPIBackendConfiguration encapsulates all the information related to the backend in the OpenAPI doc + // GetAPIBackendConfiguration encapsulates all the information related to the backend in the OpenAPI doc // (e,g: host, protocols, etc) which is then used in the ProviderClient to communicate with the API as specified in // the configuration. - GetOpenAPIBackendConfiguration() (SpecBackendConfiguration, error) + GetAPIBackendConfiguration() (SpecBackendConfiguration, error) } // SpecAnalyserVersion defines the type for versions supported in the SpecAnalyser diff --git a/openapi/openapi_spec_analyser_stub.go b/openapi/openapi_spec_analyser_stub.go index ca49a8472..395b770c8 100644 --- a/openapi/openapi_spec_analyser_stub.go +++ b/openapi/openapi_spec_analyser_stub.go @@ -24,7 +24,7 @@ func (s *specAnalyserStub) GetAllHeaderParameters() (SpecHeaderParameters, error return s.headers, nil } -func (s *specAnalyserStub) GetOpenAPIBackendConfiguration() (SpecBackendConfiguration, error) { +func (s *specAnalyserStub) GetAPIBackendConfiguration() (SpecBackendConfiguration, error) { if s.error != nil { return nil, s.error } diff --git a/openapi/openapi_v2_spec_analyser.go b/openapi/openapi_v2_spec_analyser.go index ff5df0dba..1d2aaa9c2 100644 --- a/openapi/openapi_v2_spec_analyser.go +++ b/openapi/openapi_v2_spec_analyser.go @@ -35,7 +35,7 @@ func newSpecAnalyserV2(openAPIDocumentURL string) (*specV2Analyser, error) { } func (specAnalyser *specV2Analyser) GetTerraformCompliantResources() ([]SpecResource, error) { - resources := []SpecResource{} + var resources []SpecResource for resourcePath, pathItem := range specAnalyser.d.Spec().Paths.Paths { resourceRootPath, resourceRoot, resourcePayloadSchemaDef, err := specAnalyser.isEndPointFullyTerraformResourceCompliant(resourcePath) if err != nil { @@ -87,7 +87,7 @@ func (specAnalyser *specV2Analyser) GetAllHeaderParameters() (SpecHeaderParamete return specHeaderParameters, nil } -func (specAnalyser *specV2Analyser) GetOpenAPIBackendConfiguration() (SpecBackendConfiguration, error) { +func (specAnalyser *specV2Analyser) GetAPIBackendConfiguration() (SpecBackendConfiguration, error) { return newOpenAPIBackendConfigurationV2(specAnalyser.d.Spec(), specAnalyser.openAPIDocumentURL) } diff --git a/openapi/provider_factory.go b/openapi/provider_factory.go index 070fc5fe4..2ec1557f5 100644 --- a/openapi/provider_factory.go +++ b/openapi/provider_factory.go @@ -123,7 +123,7 @@ func (p providerFactory) configureProvider() schema.ConfigureFunc { if err != nil { return nil, err } - openAPIBackendConfiguration, err := p.specAnalyser.GetOpenAPIBackendConfiguration() + openAPIBackendConfiguration, err := p.specAnalyser.GetAPIBackendConfiguration() if err != nil { return nil, err }