Skip to content

Commit

Permalink
quick method rename GetAPIBackendConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
dikhan committed Sep 24, 2018
1 parent d8c62e7 commit 86b8cfe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions openapi/openapi_spec_analyser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_spec_analyser_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions openapi/openapi_v2_spec_analyser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion openapi/provider_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 86b8cfe

Please sign in to comment.