go.mod: Update oapi-codegen and kin-openapi
This commit is contained in:
parent
add17bba45
commit
a83cf95d5b
156 changed files with 29663 additions and 2248 deletions
27
vendor/github.com/getkin/kin-openapi/openapi3/callback.go
generated
vendored
27
vendor/github.com/getkin/kin-openapi/openapi3/callback.go
generated
vendored
|
|
@ -1,13 +1,34 @@
|
|||
package openapi3
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/jsonpointer"
|
||||
)
|
||||
|
||||
type Callbacks map[string]*CallbackRef
|
||||
|
||||
var _ jsonpointer.JSONPointable = (*Callbacks)(nil)
|
||||
|
||||
func (c Callbacks) JSONLookup(token string) (interface{}, error) {
|
||||
ref, ok := c[token]
|
||||
if ref == nil || !ok {
|
||||
return nil, fmt.Errorf("object has no field %q", token)
|
||||
}
|
||||
|
||||
if ref.Ref != "" {
|
||||
return &Ref{Ref: ref.Ref}, nil
|
||||
}
|
||||
return ref.Value, nil
|
||||
}
|
||||
|
||||
// Callback is specified by OpenAPI/Swagger standard version 3.0.
|
||||
type Callback map[string]*PathItem
|
||||
|
||||
func (value Callback) Validate(c context.Context) error {
|
||||
func (value Callback) Validate(ctx context.Context) error {
|
||||
for _, v := range value {
|
||||
if err := v.Validate(c); err != nil {
|
||||
if err := v.Validate(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue