Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openapi3,openapi3filter: replace interface{} with any #1040

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading