Skip to content

Commit

Permalink
chore(lint): relinted
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
  • Loading branch information
fredbi committed Mar 4, 2024
1 parent c786eed commit fc76ee8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion expander.go
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion structs_test.go
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion swagger_test.go
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion validations_test.go
Expand Up @@ -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
Expand Down

0 comments on commit fc76ee8

Please sign in to comment.