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

View file

@ -0,0 +1,6 @@
[*]
end_of_line = lf
insert_final_newline = true
[*.{cmd,bat}]
end_of_line = crlf

View file

@ -0,0 +1,175 @@
## AUTO-DETECT - Handle line endings automatically for files detected
## as text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto
# Custom for Visual Studio
*.sln text eol=crlf
*.csproj text eol=crlf
*.vbproj text eol=crlf
*.fsproj text eol=crlf
*.dbproj text eol=crlf
*.vcxproj text eol=crlf
*.vcxitems text eol=crlf
*.props text eol=crlf
*.filters text eol=crlf
# Documents
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.csv text
*.sql text
*.ini text
## SOURCE CODE
*.go text eol=lf
*.c text eol=lf
*.h text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.coffee text eol=lf
*.htm text diff=html
*.html text diff=html
*.xml text diff=html
*.xhtml text diff=html
*.js text eol=lf
*.jsx text eol=lf
*.json text eol=lf
*.ts text eol=lf
*.css text diff=css eol=lf
*.scss text diff=css eol=lf
*.less text diff=css eol=lf
*.sass text eol=lf
*.sh text eol=lf
## DOCUMENTATION
*.md text eol=lf
*.txt text
AUTHORS text eol=lf
CHANGELOG text eol=lf
CHANGES text eol=lf
CONTRIBUTING text eol=lf
COPYING text eol=lf
INSTALL text eol=lf
license text eol=lf
LICENSE text eol=lf
NEWS text eol=lf
readme text eol=lf
*README* text eol=lf
TODO text eol=lf
## TEMPLATES
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.tmpl text
## LINTERS
.csslintrc text eol=lf
.eslintrc text eol=lf
.jscsrc text eol=lf
.jshintrc text eol=lf
.jshintignore text eol=lf
.stylelintrc text eol=lf
## CONFIGS
*.bowerrc text eol=lf
*.cnf text
*.conf text
*.config text
.editorconfig text eol=lf
.gitattributes text eol=lf
.gitconfig text eol=lf
.gitignore text eol=lf
*.npmignore text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
Makefile text eol=lf
makefile text eol=lf
## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary
## AUDIO
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary
## VIDEO
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.swc binary
*.swf binary
*.webm binary
## ARCHIVES
*.7z binary
*.gz binary
*.rar binary
*.tar binary
*.zip binary
## FONTS
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary
## EXECUTABLES
*.exe binary
*.dll binary

11
vendor/github.com/apapsch/go-jsonmerge/v2/.gitignore generated vendored Normal file
View file

@ -0,0 +1,11 @@
# GoLand
/.idea/
/vendor/
/cmd/cmd.exe
/cmd/cmd
/artifacts/
/test/
/cmd/test/

View file

@ -0,0 +1,42 @@
variables:
GOPROJ: "github.com/RaveNoX/go-jsonmerge"
stages:
- test
- build
test:
tags:
- docker
- linux
image: golang:latest
stage: test
script:
- mkdir -p artifacts
- go test -cover -v -coverprofile="./artifacts/cover.out" ./
- go tool cover -html="./artifacts/cover.out" -o "./artifacts/cover.htm"
- go test -cover -v -coverprofile="./artifacts/cover_cmd.out" ./cmd/jsonmerge
- go tool cover -html="./artifacts/cover_cmd.out" -o "./artifacts/cover_cmd.htm"
artifacts:
paths:
- artifacts/*
build:
stage: build
tags:
- docker
- linux
image: golang:latest
script:
- mkdir -p artifacts
- echo "Building for Linux"
- GOOS=linux GOARCH=amd64 go build -o artifacts/jsonmerge ./cmd/jsonmerge
- echo "Building for MacOS (darwin)"
- GOOS=darwin GOARCH=amd64 go build -o artifacts/jsonmerge_darwin ./cmd/jsonmerge
- echo "Building for Windows"
- GOOS=windows GOARCH=amd64 go build -o artifacts/jsonmerge.exe ./cmd/jsonmerge
artifacts:
paths:
- artifacts/*

19
vendor/github.com/apapsch/go-jsonmerge/v2/.travis.yml generated vendored Normal file
View file

@ -0,0 +1,19 @@
language: go
go:
- 1.x
install:
- mkdir -p artifacts
env:
- GO111MODULE=on
script:
- go test -cover -v -coverprofile="./artifacts/cover.out" ./
- go tool cover -html="./artifacts/cover.out" -o "./artifacts/cover.htm"
- go test -cover -v -coverprofile="./artifacts/cover_cmd.out" ./cmd/jsonmerge
- go tool cover -html="./artifacts/cover_cmd.out" -o "./artifacts/cover_cmd.htm"
- GOARCH=amd64 GOOS=linux go build -o artifacts/jsonmerge ./cmd/jsonmerge
- GOARCH=amd64 GOOS=windows go build -o artifacts/jsonmerge.exe ./cmd/jsonmerge
- GOARCH=amd64 GOOS=darwin go build -o artifacts/jsonmerge_darwin ./cmd/jsonmerge

21
vendor/github.com/apapsch/go-jsonmerge/v2/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-2019 Artur Kraev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

81
vendor/github.com/apapsch/go-jsonmerge/v2/README.md generated vendored Normal file
View file

@ -0,0 +1,81 @@
# go-jsonmerge
[![Build Status](https://travis-ci.org/RaveNoX/go-jsonmerge.svg?branch=master)](https://travis-ci.org/RaveNoX/go-jsonmerge)
[![GoDoc](https://godoc.org/github.com/RaveNoX/go-jsonmerge?status.svg)](https://godoc.org/github.com/RaveNoX/go-jsonmerge)
GO library for merging JSON objects
## Original document
```json
{
"number": 1,
"string": "value",
"object": {
"number": 1,
"string": "value",
"nested object": {
"number": 2
},
"array": [1, 2, 3],
"partial_array": [1, 2, 3]
}
}
```
## Patch
```json
{
"number": 2,
"string": "value1",
"nonexitent": "woot",
"object": {
"number": 3,
"string": "value2",
"nested object": {
"number": 4
},
"array": [3, 2, 1],
"partial_array": {
"1": 4
}
}
}
```
## Result
```json
{
"number": 2,
"string": "value1",
"object": {
"number": 3,
"string": "value2",
"nested object": {
"number": 4
},
"array": [3, 2, 1],
"partial_array": [1, 4, 3]
}
}
```
## Commandline Tool
```bash
$ go get -u github.com/RaveNoX/go-jsonmerge/cmd/jsonmerge
$ jsonmerge [options] <patch.json> <glob1.json> <glob2.json>...<globN.json>
# For help
$ jsonmerge -h
```
## Development
```
# Install depencencies
./init.sh
# Build
./build.sh
```
## License
[MIT](./LICENSE.MD)

25
vendor/github.com/apapsch/go-jsonmerge/v2/build.cmd generated vendored Normal file
View file

@ -0,0 +1,25 @@
@ECHO OFF
setlocal
set GOARCH=amd64
cd %~dp0
md artifacts
echo Windows
set GOOS=windows
call go build -o artifacts\jsonmerge.exe .\cmd || goto :error
echo Linux
set GOOS=linux
call go build -o artifacts\jsonmerge .\cmd || goto :error
echo Darwin
set GOOS=darwin
call go build -o artifacts\jsonmerge_darwin .\cmd || goto :error
echo Build done
exit
:error
exit /b %errorlevel%

19
vendor/github.com/apapsch/go-jsonmerge/v2/build.sh generated vendored Normal file
View file

@ -0,0 +1,19 @@
#!/bin/sh
set -e
MY_DIR=$(dirname "$0")
cd "${MY_DIR}"
mkdir -p "artifacts"
echo "Linux"
GOARCH=amd64 GOOS=linux go build -o "artifacts/jsonmerge" ./cmd
echo "Windows"
GOARCH=amd64 GOOS=windows go build -o "artifacts/jsonmerge.exe" ./cmd
echo "Mac(darwin)"
GOARCH=amd64 GOOS=darwin go build -o "artifacts/jsonmerge_darwin" ./cmd
echo "Build done"

52
vendor/github.com/apapsch/go-jsonmerge/v2/doc.go generated vendored Normal file
View file

@ -0,0 +1,52 @@
// Package jsonmerge helps mergeing JSON objects
//
// For example you have this documents:
//
// original.json
// {
// "number": 1,
// "string": "value",
// "object": {
// "number": 1,
// "string": "value",
// "nested object": {
// "number": 2
// },
// "array": [1, 2, 3],
// "partial_array": [1, 2, 3]
// }
// }
//
// patch.json
// {
// "number": 2,
// "string": "value1",
// "nonexitent": "woot",
// "object": {
// "number": 3,
// "string": "value2",
// "nested object": {
// "number": 4
// },
// "array": [3, 2, 1],
// "partial_array": {
// "1": 4
// }
// }
// }
//
// After merge you will have this result:
// {
// "number": 2,
// "string": "value1",
// "object": {
// "number": 3,
// "string": "value2",
// "nested object": {
// "number": 4
// },
// "array": [3, 2, 1],
// "partial_array": [1, 4, 3]
// }
// }
package jsonmerge

167
vendor/github.com/apapsch/go-jsonmerge/v2/merge.go generated vendored Normal file
View file

@ -0,0 +1,167 @@
package jsonmerge
import (
"bytes"
"encoding/json"
"fmt"
"reflect"
"strconv"
"strings"
)
// Merger describes result of merge operation and provides
// configuration.
type Merger struct {
// Errors is slice of non-critical errors of merge operations
Errors []error
// Replaced is describe replacements
// Key is path in document like
// "prop1.prop2.prop3" for object properties or
// "arr1.1.prop" for arrays
// Value is value of replacemet
Replaced map[string]interface{}
// CopyNonexistent enables setting fields into the result
// which only exist in the patch.
CopyNonexistent bool
}
func (m *Merger) mergeValue(path []string, patch map[string]interface{}, key string, value interface{}) interface{} {
patchValue, patchHasValue := patch[key]
if !patchHasValue {
return value
}
_, patchValueIsObject := patchValue.(map[string]interface{})
path = append(path, key)
pathStr := strings.Join(path, ".")
if _, ok := value.(map[string]interface{}); ok {
if !patchValueIsObject {
err := fmt.Errorf("patch value must be object for key \"%v\"", pathStr)
m.Errors = append(m.Errors, err)
return value
}
return m.mergeObjects(value, patchValue, path)
}
if _, ok := value.([]interface{}); ok && patchValueIsObject {
return m.mergeObjects(value, patchValue, path)
}
if !reflect.DeepEqual(value, patchValue) {
m.Replaced[pathStr] = patchValue
}
return patchValue
}
func (m *Merger) mergeObjects(data, patch interface{}, path []string) interface{} {
if patchObject, ok := patch.(map[string]interface{}); ok {
if dataArray, ok := data.([]interface{}); ok {
ret := make([]interface{}, len(dataArray))
for i, val := range dataArray {
ret[i] = m.mergeValue(path, patchObject, strconv.Itoa(i), val)
}
return ret
} else if dataObject, ok := data.(map[string]interface{}); ok {
ret := make(map[string]interface{})
for k, v := range dataObject {
ret[k] = m.mergeValue(path, patchObject, k, v)
}
if m.CopyNonexistent {
for k, v := range patchObject {
if _, ok := dataObject[k]; !ok {
ret[k] = v
}
}
}
return ret
}
}
return data
}
// Merge merges patch document to data document
//
// Returning merged document. Result of merge operation can be
// obtained from the Merger. Result information is discarded before
// merging.
func (m *Merger) Merge(data, patch interface{}) interface{} {
m.Replaced = make(map[string]interface{})
m.Errors = make([]error, 0)
return m.mergeObjects(data, patch, nil)
}
// MergeBytesIndent merges patch document buffer to data document buffer
//
// Use prefix and indent for set indentation like in json.MarshalIndent
//
// Returning merged document buffer and error if any.
func (m *Merger) MergeBytesIndent(dataBuff, patchBuff []byte, prefix, indent string) (mergedBuff []byte, err error) {
var data, patch, merged interface{}
err = unmarshalJSON(dataBuff, &data)
if err != nil {
err = fmt.Errorf("error in data JSON: %v", err)
return
}
err = unmarshalJSON(patchBuff, &patch)
if err != nil {
err = fmt.Errorf("error in patch JSON: %v", err)
return
}
merged = m.Merge(data, patch)
mergedBuff, err = json.MarshalIndent(merged, prefix, indent)
if err != nil {
err = fmt.Errorf("error writing merged JSON: %v", err)
}
return
}
// MergeBytes merges patch document buffer to data document buffer
//
// Returning merged document buffer, merge info and
// error if any
func (m *Merger) MergeBytes(dataBuff, patchBuff []byte) (mergedBuff []byte, err error) {
var data, patch, merged interface{}
err = unmarshalJSON(dataBuff, &data)
if err != nil {
err = fmt.Errorf("error in data JSON: %v", err)
return
}
err = unmarshalJSON(patchBuff, &patch)
if err != nil {
err = fmt.Errorf("error in patch JSON: %v", err)
return
}
merged = m.Merge(data, patch)
mergedBuff, err = json.Marshal(merged)
if err != nil {
err = fmt.Errorf("error writing merged JSON: %v", err)
}
return
}
func unmarshalJSON(buff []byte, data interface{}) error {
decoder := json.NewDecoder(bytes.NewReader(buff))
decoder.UseNumber()
return decoder.Decode(data)
}