Skip to content

Commit deb2ca7

Browse files
committed
fixed linting issues
1 parent fbd662b commit deb2ca7

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

paths/paths_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ paths:
677677
}
678678

679679
func TestNewValidator_FindPathWithEncodedArg(t *testing.T) {
680-
681680
spec := `openapi: 3.1.0
682681
paths:
683682
/something/{string_contains_encoded}:

responses/validate_body.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ package responses
55

66
import (
77
"fmt"
8-
"gopkg.in/yaml.v3"
98
"net/http"
109
"strconv"
1110
"strings"
1211

1312
"github.com/pb33f/libopenapi/datamodel/high/base"
1413
"github.com/pb33f/libopenapi/orderedmap"
1514
"github.com/pb33f/libopenapi/utils"
15+
"gopkg.in/yaml.v3"
1616

1717
v3 "github.com/pb33f/libopenapi/datamodel/high/v3"
1818

@@ -175,10 +175,10 @@ func (v *responseBodyValidator) checkResponseSchema(
175175
}
176176

177177
if len(renderedInline) > 0 && len(renderedJSON) > 0 && schema != nil {
178-
// render the schema, to be used for validation
179-
valid, vErrs := ValidateResponseSchema(request, response, schema, renderedInline, renderedJSON, config.WithRegexEngine(v.options.RegexEngine))
180-
if !valid {
181-
validationErrors = append(validationErrors, vErrs...)
178+
// render the schema, to be used for validation
179+
valid, vErrs := ValidateResponseSchema(request, response, schema, renderedInline, renderedJSON, config.WithRegexEngine(v.options.RegexEngine))
180+
if !valid {
181+
validationErrors = append(validationErrors, vErrs...)
182182
}
183183
}
184184
}

validator_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,6 @@ paths:
15471547
// https://github.com/pb33f/libopenapi-validator/issues/107
15481548
// https://github.com/pb33f/libopenapi-validator/issues/103
15491549
func TestNewValidator_TestCircularRefsInValidation_Request(t *testing.T) {
1550-
15511550
spec := `openapi: 3.1.0
15521551
info:
15531552
title: Panic at response validation
@@ -1625,7 +1624,6 @@ components:
16251624
// https://github.com/pb33f/libopenapi-validator/issues/107
16261625
// https://github.com/pb33f/libopenapi-validator/issues/103
16271626
func TestNewValidator_TestCircularRefsInValidation_Response(t *testing.T) {
1628-
16291627
spec := `openapi: 3.1.0
16301628
info:
16311629
title: Panic at response validation

0 commit comments

Comments
 (0)