Skip to content

Commit bde0446

Browse files
committed
ran gofumpt
1 parent e868dd6 commit bde0446

15 files changed

+43
-33
lines changed

config/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package config
22

33
import (
4-
"github.com/pb33f/libopenapi-validator/cache"
54
"github.com/santhosh-tekuri/jsonschema/v6"
5+
6+
"github.com/pb33f/libopenapi-validator/cache"
67
)
78

89
// RegexCache can be set to enable compiled regex caching.

parameters/header_parameters.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import (
99
"strconv"
1010
"strings"
1111

12-
lowbase "github.com/pb33f/libopenapi/datamodel/low/base"
13-
1412
"github.com/pb33f/libopenapi/datamodel/high/base"
1513

1614
v3 "github.com/pb33f/libopenapi/datamodel/high/v3"
15+
lowbase "github.com/pb33f/libopenapi/datamodel/low/base"
1716

1817
"github.com/pb33f/libopenapi-validator/errors"
1918
"github.com/pb33f/libopenapi-validator/helpers"

parameters/validate_parameter_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import (
55
"sync"
66
"testing"
77

8-
"github.com/pb33f/libopenapi-validator/config"
9-
"github.com/pb33f/libopenapi-validator/helpers"
10-
lowv3 "github.com/pb33f/libopenapi/datamodel/low/v3"
11-
128
"github.com/pb33f/libopenapi"
139
"github.com/stretchr/testify/assert"
14-
1510
"github.com/stretchr/testify/require"
11+
12+
lowv3 "github.com/pb33f/libopenapi/datamodel/low/v3"
13+
14+
"github.com/pb33f/libopenapi-validator/config"
15+
"github.com/pb33f/libopenapi-validator/helpers"
1616
)
1717

1818
func Test_ForceCompilerError(t *testing.T) {

requests/validate_body_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import (
1212
"testing"
1313

1414
"github.com/pb33f/libopenapi"
15-
"github.com/pb33f/libopenapi-validator/config"
16-
"github.com/pb33f/libopenapi-validator/paths"
1715
"github.com/stretchr/testify/assert"
1816
"github.com/stretchr/testify/require"
17+
18+
"github.com/pb33f/libopenapi-validator/config"
19+
"github.com/pb33f/libopenapi-validator/paths"
1920
)
2021

2122
func TestValidateBody_NotRequiredBody(t *testing.T) {

requests/validate_request.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ import (
1313
"regexp"
1414
"strconv"
1515

16-
"github.com/pb33f/libopenapi-validator/cache"
17-
"github.com/pb33f/libopenapi-validator/config"
18-
"github.com/pb33f/libopenapi-validator/errors"
19-
"github.com/pb33f/libopenapi-validator/helpers"
20-
"github.com/pb33f/libopenapi-validator/schema_validation"
2116
"github.com/pb33f/libopenapi/datamodel/high/base"
2217
"github.com/pb33f/libopenapi/utils"
2318
"github.com/santhosh-tekuri/jsonschema/v6"
2419
"go.yaml.in/yaml/v4"
2520
"golang.org/x/text/language"
2621
"golang.org/x/text/message"
22+
23+
"github.com/pb33f/libopenapi-validator/cache"
24+
"github.com/pb33f/libopenapi-validator/config"
25+
"github.com/pb33f/libopenapi-validator/errors"
26+
"github.com/pb33f/libopenapi-validator/helpers"
27+
"github.com/pb33f/libopenapi-validator/schema_validation"
2728
)
2829

2930
var instanceLocationRegex = regexp.MustCompile(`^/(\d+)`)

requests/validate_request_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import (
99
"testing"
1010

1111
"github.com/pb33f/libopenapi"
12-
"github.com/pb33f/libopenapi-validator/config"
1312
"github.com/pb33f/libopenapi/datamodel/high/base"
1413
"github.com/stretchr/testify/assert"
1514
"github.com/stretchr/testify/require"
15+
16+
"github.com/pb33f/libopenapi-validator/config"
1617
)
1718

1819
func TestValidateRequestSchema(t *testing.T) {

responses/validate_headers.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ import (
88
"net/http"
99
"strings"
1010

11-
"github.com/pb33f/libopenapi-validator/helpers"
12-
"github.com/pb33f/libopenapi-validator/parameters"
11+
"github.com/pb33f/libopenapi/orderedmap"
12+
1313
v3 "github.com/pb33f/libopenapi/datamodel/high/v3"
1414
lowv3 "github.com/pb33f/libopenapi/datamodel/low/v3"
15-
"github.com/pb33f/libopenapi/orderedmap"
1615

1716
"github.com/pb33f/libopenapi-validator/config"
1817
"github.com/pb33f/libopenapi-validator/errors"
18+
"github.com/pb33f/libopenapi-validator/helpers"
19+
"github.com/pb33f/libopenapi-validator/parameters"
1920
)
2021

2122
// ValidateResponseHeaders validates the response headers against the OpenAPI spec.

responses/validate_response.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ import (
1313
"regexp"
1414
"strconv"
1515

16-
"github.com/pb33f/libopenapi-validator/cache"
17-
"github.com/pb33f/libopenapi-validator/config"
18-
"github.com/pb33f/libopenapi-validator/errors"
19-
"github.com/pb33f/libopenapi-validator/helpers"
20-
"github.com/pb33f/libopenapi-validator/schema_validation"
2116
"github.com/pb33f/libopenapi/datamodel/high/base"
2217
"github.com/pb33f/libopenapi/utils"
2318
"github.com/santhosh-tekuri/jsonschema/v6"
2419
"go.yaml.in/yaml/v4"
2520
"golang.org/x/text/language"
2621
"golang.org/x/text/message"
22+
23+
"github.com/pb33f/libopenapi-validator/cache"
24+
"github.com/pb33f/libopenapi-validator/config"
25+
"github.com/pb33f/libopenapi-validator/errors"
26+
"github.com/pb33f/libopenapi-validator/helpers"
27+
"github.com/pb33f/libopenapi-validator/schema_validation"
2728
)
2829

2930
var instanceLocationRegex = regexp.MustCompile(`^/(\d+)`)

responses/validate_response_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import (
99
"testing"
1010

1111
"github.com/pb33f/libopenapi"
12-
"github.com/pb33f/libopenapi-validator/config"
1312
"github.com/pb33f/libopenapi/datamodel/high/base"
1413
"github.com/stretchr/testify/assert"
1514
"github.com/stretchr/testify/require"
15+
16+
"github.com/pb33f/libopenapi-validator/config"
1617
)
1718

1819
func TestValidateResponseSchema(t *testing.T) {

schema_validation/property_locator.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import (
77
"regexp"
88
"strings"
99

10-
liberrors "github.com/pb33f/libopenapi-validator/errors"
11-
"github.com/pb33f/libopenapi-validator/helpers"
1210
"github.com/santhosh-tekuri/jsonschema/v6"
1311
"go.yaml.in/yaml/v4"
12+
13+
liberrors "github.com/pb33f/libopenapi-validator/errors"
14+
"github.com/pb33f/libopenapi-validator/helpers"
1415
)
1516

1617
// PropertyNameInfo contains extracted information about a property name validation error

0 commit comments

Comments
 (0)