go.mod: bump github.com/getkin/kin-openapi to v0.131.0

As deepmap/oapi-codegen didn't work with this newer version, upgrade to
oapi-codegen/oapi-codegen v2.

Mitigating CVE-2025-30153
This commit is contained in:
Sanne Raymaekers 2025-03-21 11:50:30 +01:00 committed by Ondřej Budai
parent c5cb0d0618
commit b2700903ae
403 changed files with 44758 additions and 16347 deletions

34
vendor/github.com/oapi-codegen/runtime/jsonmerge.go generated vendored Normal file
View file

@ -0,0 +1,34 @@
package runtime
import (
"encoding/json"
"github.com/apapsch/go-jsonmerge/v2"
)
// JsonMerge merges two JSON representation into a single object. `data` is the
// existing representation and `patch` is the new data to be merged in
//
// Deprecated: Use JSONMerge instead.
func JsonMerge(data, patch json.RawMessage) (json.RawMessage, error) {
return JSONMerge(data, patch)
}
// JSONMerge merges two JSON representation into a single object. `data` is the
// existing representation and `patch` is the new data to be merged in
func JSONMerge(data, patch json.RawMessage) (json.RawMessage, error) {
merger := jsonmerge.Merger{
CopyNonexistent: true,
}
if data == nil {
data = []byte(`{}`)
}
if patch == nil {
patch = []byte(`{}`)
}
merged, err := merger.MergeBytes(data, patch)
if err != nil {
return nil, err
}
return merged, nil
}