Skip to content

Commit

Permalink
openapi3: gofmt -w -r "interface{} -> any" .
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Dec 11, 2024
1 parent 793b28d commit 129f6a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openapi3/issue82_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func TestIssue82(t *testing.T) {
payload := map[string]interface{}{
payload := map[string]any{
"prop1": "val",
"prop3": "val",
}
Expand Down
2 changes: 1 addition & 1 deletion openapi3/refs_issue247_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ components:
require.NoError(t, err)

var ptr jsonpointer.Pointer
var v interface{}
var v any
var kind reflect.Kind

ptr, err = jsonpointer.New("/paths")
Expand Down
2 changes: 1 addition & 1 deletion openapi3filter/validate_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func appendToQueryValues[T any](q url.Values, parameterName string, v []T) {
// populateDefaultQueryParameters populates default values inside query parameters, while ensuring types are respected
func populateDefaultQueryParameters(q url.Values, parameterName string, value any) {
switch t := value.(type) {
case []interface{}:
case []any:
appendToQueryValues(q, parameterName, t)
default:
q.Add(parameterName, fmt.Sprintf("%v", value))
Expand Down

0 comments on commit 129f6a3

Please sign in to comment.