diff --git a/go.mod b/go.mod index c0af26f6..9d1104fa 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/cloudbase/garm-provider-common v0.1.8-0.20251001105909-bbcacae60e7c github.com/felixge/httpsnoop v1.0.4 github.com/gdamore/tcell/v2 v2.9.0 - github.com/go-openapi/errors v0.22.3 + github.com/go-openapi/errors v0.22.4 github.com/go-openapi/runtime v0.29.0 github.com/go-openapi/strfmt v0.24.0 github.com/go-openapi/swag v0.25.1 diff --git a/go.sum b/go.sum index be14d8f2..a07b6b79 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/analysis v0.24.0 h1:vE/VFFkICKyYuTWYnplQ+aVr45vlG6NcZKC7BdIXhsA= github.com/go-openapi/analysis v0.24.0/go.mod h1:GLyoJA+bvmGGaHgpfeDh8ldpGo69fAJg7eeMDMRCIrw= -github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs= -github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ= +github.com/go-openapi/errors v0.22.4 h1:oi2K9mHTOb5DPW2Zjdzs/NIvwi2N3fARKaTJLdNabaM= +github.com/go-openapi/errors v0.22.4/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= @@ -80,6 +80,8 @@ github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3 github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-openapi/validate v0.25.0 h1:JD9eGX81hDTjoY3WOzh6WqxVBVl7xjsLnvDo1GL5WPU= github.com/go-openapi/validate v0.25.0/go.mod h1:SUY7vKrN5FiwK6LyvSwKjDfLNirSfWwHNgxd2l29Mmw= github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= diff --git a/vendor/github.com/go-openapi/errors/README.md b/vendor/github.com/go-openapi/errors/README.md index 6d57ea55..d7e3a18b 100644 --- a/vendor/github.com/go-openapi/errors/README.md +++ b/vendor/github.com/go-openapi/errors/README.md @@ -6,3 +6,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/errors)](https://goreportcard.com/report/github.com/go-openapi/errors) Shared errors and error interface used throughout the various libraries found in the go-openapi toolkit. + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). diff --git a/vendor/github.com/go-openapi/errors/api.go b/vendor/github.com/go-openapi/errors/api.go index 52d45777..d39233ba 100644 --- a/vendor/github.com/go-openapi/errors/api.go +++ b/vendor/github.com/go-openapi/errors/api.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -46,14 +35,14 @@ func (a *apiError) Code() int32 { // MarshalJSON implements the JSON encoding interface func (a apiError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": a.code, "message": a.message, }) } // New creates a new API error with a code and a message -func New(code int32, message string, args ...interface{}) Error { +func New(code int32, message string, args ...any) Error { if len(args) > 0 { return &apiError{ code: code, @@ -67,7 +56,7 @@ func New(code int32, message string, args ...interface{}) Error { } // NotFound creates a new not found error -func NotFound(message string, args ...interface{}) Error { +func NotFound(message string, args ...any) Error { if message == "" { message = "Not found" } @@ -97,7 +86,7 @@ func (m *MethodNotAllowedError) Code() int32 { // MarshalJSON implements the JSON encoding interface func (m MethodNotAllowedError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": m.code, "message": m.message, "allowed": m.Allowed, diff --git a/vendor/github.com/go-openapi/errors/auth.go b/vendor/github.com/go-openapi/errors/auth.go index 0545b501..08de582e 100644 --- a/vendor/github.com/go-openapi/errors/auth.go +++ b/vendor/github.com/go-openapi/errors/auth.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors diff --git a/vendor/github.com/go-openapi/errors/doc.go b/vendor/github.com/go-openapi/errors/doc.go index af01190c..b4627f30 100644 --- a/vendor/github.com/go-openapi/errors/doc.go +++ b/vendor/github.com/go-openapi/errors/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 /* Package errors provides an Error interface and several concrete types diff --git a/vendor/github.com/go-openapi/errors/headers.go b/vendor/github.com/go-openapi/errors/headers.go index 6ea1151f..2d837c34 100644 --- a/vendor/github.com/go-openapi/errors/headers.go +++ b/vendor/github.com/go-openapi/errors/headers.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -25,9 +14,9 @@ type Validation struct { //nolint: errname code int32 Name string In string - Value interface{} + Value any message string - Values []interface{} + Values []any } func (e *Validation) Error() string { @@ -41,7 +30,7 @@ func (e *Validation) Code() int32 { // MarshalJSON implements the JSON encoding interface func (e Validation) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": e.code, "message": e.message, "in": e.In, @@ -72,7 +61,7 @@ const ( // InvalidContentType error for an invalid content type func InvalidContentType(value string, allowed []string) *Validation { - values := make([]interface{}, 0, len(allowed)) + values := make([]any, 0, len(allowed)) for _, v := range allowed { values = append(values, v) } @@ -88,7 +77,7 @@ func InvalidContentType(value string, allowed []string) *Validation { // InvalidResponseFormat error for an unacceptable response format request func InvalidResponseFormat(value string, allowed []string) *Validation { - values := make([]interface{}, 0, len(allowed)) + values := make([]any, 0, len(allowed)) for _, v := range allowed { values = append(values, v) } diff --git a/vendor/github.com/go-openapi/errors/middleware.go b/vendor/github.com/go-openapi/errors/middleware.go index 1b9f3a93..c434e59a 100644 --- a/vendor/github.com/go-openapi/errors/middleware.go +++ b/vendor/github.com/go-openapi/errors/middleware.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors diff --git a/vendor/github.com/go-openapi/errors/parsing.go b/vendor/github.com/go-openapi/errors/parsing.go index 34930c08..ea2a7c60 100644 --- a/vendor/github.com/go-openapi/errors/parsing.go +++ b/vendor/github.com/go-openapi/errors/parsing.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -63,7 +52,7 @@ func (e ParseError) MarshalJSON() ([]byte, error) { if e.Reason != nil { reason = e.Reason.Error() } - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": e.code, "message": e.message, "in": e.In, diff --git a/vendor/github.com/go-openapi/errors/schema.go b/vendor/github.com/go-openapi/errors/schema.go index 8f3239df..e59ca4f8 100644 --- a/vendor/github.com/go-openapi/errors/schema.go +++ b/vendor/github.com/go-openapi/errors/schema.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -130,7 +119,7 @@ func (c *CompositeError) Unwrap() []error { // MarshalJSON implements the JSON encoding interface func (c CompositeError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": c.code, "message": c.message, "errors": c.Errors, @@ -254,7 +243,7 @@ func InvalidTypeName(typeName string) *Validation { } // InvalidType creates an error for when the type is invalid -func InvalidType(name, in, typeName string, value interface{}) *Validation { +func InvalidType(name, in, typeName string, value any) *Validation { var message string if in != "" { @@ -302,7 +291,7 @@ func DuplicateItems(name, in string) *Validation { } // TooManyItems error for when an array contains too many items -func TooManyItems(name, in string, maximum int64, value interface{}) *Validation { +func TooManyItems(name, in string, maximum int64, value any) *Validation { msg := fmt.Sprintf(maximumItemsFail, name, in, maximum) if in == "" { msg = fmt.Sprintf(maximumItemsFailNoIn, name, maximum) @@ -318,7 +307,7 @@ func TooManyItems(name, in string, maximum int64, value interface{}) *Validation } // TooFewItems error for when an array contains too few items -func TooFewItems(name, in string, minimum int64, value interface{}) *Validation { +func TooFewItems(name, in string, minimum int64, value any) *Validation { msg := fmt.Sprintf(minItemsFail, name, in, minimum) if in == "" { msg = fmt.Sprintf(minItemsFailNoIn, name, minimum) @@ -333,7 +322,7 @@ func TooFewItems(name, in string, minimum int64, value interface{}) *Validation } // ExceedsMaximumInt error for when maximumimum validation fails -func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value interface{}) *Validation { +func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -358,7 +347,7 @@ func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value int } // ExceedsMaximumUint error for when maximumimum validation fails -func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value interface{}) *Validation { +func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -383,7 +372,7 @@ func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value i } // ExceedsMaximum error for when maximumimum validation fails -func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value interface{}) *Validation { +func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -408,7 +397,7 @@ func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value inte } // ExceedsMinimumInt error for when minimum validation fails -func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value interface{}) *Validation { +func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -433,7 +422,7 @@ func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value int } // ExceedsMinimumUint error for when minimum validation fails -func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value interface{}) *Validation { +func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -458,7 +447,7 @@ func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value i } // ExceedsMinimum error for when minimum validation fails -func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value interface{}) *Validation { +func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -483,7 +472,7 @@ func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value inte } // NotMultipleOf error for when multiple of validation fails -func NotMultipleOf(name, in string, multiple, value interface{}) *Validation { +func NotMultipleOf(name, in string, multiple, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(multipleOfFailNoIn, name, multiple) @@ -500,7 +489,7 @@ func NotMultipleOf(name, in string, multiple, value interface{}) *Validation { } // EnumFail error for when an enum validation fails -func EnumFail(name, in string, value interface{}, values []interface{}) *Validation { +func EnumFail(name, in string, value any, values []any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(enumFailNoIn, name, values) @@ -519,7 +508,7 @@ func EnumFail(name, in string, value interface{}, values []interface{}) *Validat } // Required error for when a value is missing -func Required(name, in string, value interface{}) *Validation { +func Required(name, in string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(requiredFailNoIn, name) @@ -536,7 +525,7 @@ func Required(name, in string, value interface{}) *Validation { } // ReadOnly error for when a value is present in request -func ReadOnly(name, in string, value interface{}) *Validation { +func ReadOnly(name, in string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(readOnlyFailNoIn, name) @@ -553,7 +542,7 @@ func ReadOnly(name, in string, value interface{}) *Validation { } // TooLong error for when a string is too long -func TooLong(name, in string, maximum int64, value interface{}) *Validation { +func TooLong(name, in string, maximum int64, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooLongMessageNoIn, name, maximum) @@ -570,7 +559,7 @@ func TooLong(name, in string, maximum int64, value interface{}) *Validation { } // TooShort error for when a string is too short -func TooShort(name, in string, minimum int64, value interface{}) *Validation { +func TooShort(name, in string, minimum int64, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooShortMessageNoIn, name, minimum) @@ -589,7 +578,7 @@ func TooShort(name, in string, minimum int64, value interface{}) *Validation { // FailedPattern error for when a string fails a regex pattern match // the pattern that is returned is the ECMA syntax version of the pattern not the golang version. -func FailedPattern(name, in, pattern string, value interface{}) *Validation { +func FailedPattern(name, in, pattern string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(patternFailNoIn, name, pattern) @@ -608,7 +597,7 @@ func FailedPattern(name, in, pattern string, value interface{}) *Validation { // MultipleOfMustBePositive error for when a // multipleOf factor is negative -func MultipleOfMustBePositive(name, in string, factor interface{}) *Validation { +func MultipleOfMustBePositive(name, in string, factor any) *Validation { return &Validation{ code: MultipleOfMustBePositiveCode, Name: name, diff --git a/vendor/modules.txt b/vendor/modules.txt index 9f6e3b1d..4ac1502f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -96,7 +96,7 @@ github.com/go-openapi/analysis/internal/flatten/operations github.com/go-openapi/analysis/internal/flatten/replace github.com/go-openapi/analysis/internal/flatten/schutils github.com/go-openapi/analysis/internal/flatten/sortref -# github.com/go-openapi/errors v0.22.3 +# github.com/go-openapi/errors v0.22.4 ## explicit; go 1.24.0 github.com/go-openapi/errors # github.com/go-openapi/jsonpointer v0.22.1