From fc76ee8940734eba89b15691fb3be6e06ae63a65 Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Mon, 4 Mar 2024 10:26:16 +0100 Subject: [PATCH] chore(lint): relinted Signed-off-by: Frederic BIDON --- expander.go | 2 +- structs_test.go | 2 +- swagger_test.go | 2 +- validations_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/expander.go b/expander.go index 74f91c3..b81a569 100644 --- a/expander.go +++ b/expander.go @@ -57,7 +57,7 @@ func ExpandSpec(spec *Swagger, options *ExpandOptions) error { if !options.SkipSchemas { for key, definition := range spec.Definitions { parentRefs := make([]string, 0, 10) - parentRefs = append(parentRefs, fmt.Sprintf("#/definitions/%s", key)) + parentRefs = append(parentRefs, "#/definitions/"+key) def, err := expandSchema(definition, parentRefs, resolver, specBasePath) if resolver.shouldStopOnError(err) { diff --git a/structs_test.go b/structs_test.go index c8e191a..d464b93 100644 --- a/structs_test.go +++ b/structs_test.go @@ -78,7 +78,7 @@ func assertParsesYAML(t testing.TB, actual string, expected interface{}) bool { if !isPointed(expected) { act = reflect.Indirect(parsed).Interface() } - return assert.EqualValues(t, act, expected) + return assert.EqualValues(t, expected, act) } func TestSerialization_SerializeJSON(t *testing.T) { diff --git a/swagger_test.go b/swagger_test.go index cb288e6..59e2403 100644 --- a/swagger_test.go +++ b/swagger_test.go @@ -243,7 +243,7 @@ func TestSwaggerSpec_Serialize(t *testing.T) { require.NoError(t, err) var actual map[string]interface{} require.NoError(t, json.Unmarshal(b, &actual)) - assert.EqualValues(t, actual, expected) + assert.EqualValues(t, expected, actual) } func TestSwaggerSpec_Deserialize(t *testing.T) { diff --git a/validations_test.go b/validations_test.go index 993547c..6582921 100644 --- a/validations_test.go +++ b/validations_test.go @@ -109,7 +109,7 @@ func TestValidations(t *testing.T) { require.False(t, cv.HasArrayValidations()) sv.SetValidations(val) - sv.ClearObjectValidations(func(validation string, value interface{}) { + sv.ClearObjectValidations(func(validation string, _ interface{}) { switch validation { case "minProperties", "maxProperties", "patternProperties": return