Closed titpetric closed 1 month ago
Failed to generate code suggestions for PR
API Changes
--- prev.txt 2024-10-09 12:45:49.727991125 +0000
+++ current.txt 2024-10-09 12:45:43.691955732 +0000
@@ -7954,7 +7954,7 @@
func (a APIDefinitionLoader) GetOASFilepath(path string) string
-func (a APIDefinitionLoader) MakeSpec(def *nestedApiDefinition, logger *logrus.Entry) (*APISpec, error)
+func (a APIDefinitionLoader) MakeSpec(def *model.MergedAPI, logger *logrus.Entry) (*APISpec, error)
MakeSpec will generate a flattened URLSpec from and APIDefinitions'
VersionInfo data. paths are keyed to the Api version name, which is
determined during routing to speed up lookups
Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension SonarLint
User description
https://tyktech.atlassian.net/browse/TT-13242
PR Type
enhancement
Description
nestedApiDefinition
withmodel.MergedAPI
across the codebase.nestedApiDefinitionList
struct and its associated methods, replacing them withMergedAPIList
.MergedAPI
model, ensuring compatibility and correctness.merged_apis.go
in theinternal/model
package to defineMergedAPI
andMergedAPIList
structs with relevant methods.Changes walkthrough 📝
api_definition.go
Refactor API definition handling to use MergedAPI model
gateway/api_definition.go
nestedApiDefinition
withmodel.MergedAPI
.nestedApiDefinitionList
and related methods.model.MergedAPIList
.Filter
method fromMergedAPIList
.tracing.go
Update tracing logic for MergedAPI integration
gateway/tracing.go - Modified trace handler to use `model.MergedAPI`.
merged_apis.go
Introduce MergedAPI and MergedAPIList models
internal/model/merged_apis.go
MergedAPIList
andMergedAPI
structs.SetClassic
andFilter
methods forMergedAPIList
.api_definition_test.go
Update tests for MergedAPI model integration
gateway/api_definition_test.go
model.MergedAPIList
.nestedApiDefinition
withmodel.MergedAPI
.Filter
method.coprocess_id_extractor_test.go
Modify coprocess ID extractor tests for MergedAPI
gateway/coprocess_id_extractor_test.go - Updated test setup to use `model.MergedAPI`.
policy_test.go
Update policy tests for MergedAPI model
gateway/policy_test.go
nestedApiDefinition
withmodel.MergedAPI
in mock data.testutil.go
Adjust test utilities for MergedAPI model
gateway/testutil.go - Updated utility function to use `model.MergedAPI`.