Skip to content

Commit

Permalink
upgraded deps
Browse files Browse the repository at this point in the history
latest validator requires a few test changes.
  • Loading branch information
daveshanley committed Oct 2, 2024
1 parent 0ab6060 commit 6f371c6
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 84 deletions.
6 changes: 3 additions & 3 deletions functions/core/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ uniqueItems: true`
res := def.RunRule(nodes, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "Enum values must not have duplicate entry: items at index 0 and 2 are equal", res[0].Message)
assert.Equal(t, "Enum values must not have duplicate entry: items at 0 and 2 are equal", res[0].Message)

}

Expand Down Expand Up @@ -115,7 +115,7 @@ func TestOpenAPISchema_InvalidSchemaInteger(t *testing.T) {
res := def.RunRule(nodes, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "schema must be valid: expected integer, but got string", res[0].Message)
assert.Equal(t, "schema must be valid: got string, want integer", res[0].Message)

}

Expand Down Expand Up @@ -176,7 +176,7 @@ properties:
res := def.RunRule(nodes, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "schema must be valid: expected boolean, but got string", res[0].Message)
assert.Equal(t, "schema must be valid: got string, want boolean", res[0].Message)

}

Expand Down
16 changes: 8 additions & 8 deletions functions/openapi/examples_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ components:
res := def.RunRule(nil, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "additionalProperties 'name' not allowed", res[0].Message)
assert.Equal(t, "additional properties 'name' not allowed", res[0].Message)
assert.Equal(t, "$.components.schemas['Herbs'].examples[0]", res[0].Path)

}
Expand Down Expand Up @@ -243,9 +243,9 @@ components:
res := def.RunRule(nil, ctx)

assert.Len(t, res, 2)
assert.Equal(t, "value must be \"smoked\"", res[0].Message)
assert.Equal(t, "value must be 'smoked'", res[0].Message)
assert.Equal(t, "$.components.schemas['Herbs'].examples[0]", res[0].Path)
assert.Equal(t, "expected integer, but got string", res[1].Message)
assert.Equal(t, "got string, want integer", res[1].Message)
assert.Equal(t, "$.components.schemas['Herbs'].examples[0]", res[01].Path)

}
Expand Down Expand Up @@ -327,9 +327,9 @@ components:
res := def.RunRule(nil, ctx)

assert.Len(t, res, 2)
assert.Equal(t, "value must be \"smoked\"", res[0].Message)
assert.Equal(t, "value must be 'smoked'", res[0].Message)
assert.Equal(t, "$.components.schemas['Herbs'].example", res[0].Path)
assert.Equal(t, "expected integer, but got string", res[1].Message)
assert.Equal(t, "got string, want integer", res[1].Message)
assert.Equal(t, "$.components.schemas['Herbs'].example", res[1].Path)

}
Expand Down Expand Up @@ -413,7 +413,7 @@ components:
res := def.RunRule(nil, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "value must be \"spicy\"", res[0].Message)
assert.Equal(t, "value must be 'spicy'", res[0].Message)
assert.Equal(t, "$.components.parameters['Herbs'].examples['sammich']", res[0].Path)

}
Expand Down Expand Up @@ -457,7 +457,7 @@ paths:
res := def.RunRule(nil, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "value must be \"tasty\"", res[0].Message)
assert.Equal(t, "value must be 'tasty'", res[0].Message)
assert.Equal(t, "$.paths['/herbs'].get.responses['200'].headers['Herbs'].examples['sammich']", res[0].Path)

}
Expand Down Expand Up @@ -501,7 +501,7 @@ paths:
res := def.RunRule(nil, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "value must be \"tasty\"", res[0].Message)
assert.Equal(t, "value must be 'tasty'", res[0].Message)
assert.Equal(t, "$.paths['/herbs'].get.responses['200'].content['application/json'].examples['sammich']", res[0].Path)

}
1 change: 0 additions & 1 deletion functions/openapi/oas_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/pb33f/libopenapi-validator/errors"
"github.com/pb33f/libopenapi-validator/schema_validation"
"github.com/pb33f/libopenapi/utils"
_ "github.com/santhosh-tekuri/jsonschema/v5/httploader"
"gopkg.in/yaml.v3"
)

Expand Down
39 changes: 20 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@ go 1.23.0

require (
github.com/alecthomas/chroma v0.10.0
github.com/dop251/goja v0.0.0-20240828124009-016eb7256539
github.com/dop251/goja v0.0.0-20240927123429-241b342198c2
github.com/dop251/goja_nodejs v0.0.0-20240728170619-29b559befffc
github.com/dustin/go-humanize v1.0.1
github.com/fsnotify/fsnotify v1.7.0
github.com/ghodss/yaml v1.0.0
github.com/gizak/termui/v3 v3.1.0
github.com/json-iterator/go v1.1.12
github.com/mitchellh/mapstructure v1.5.0
github.com/pb33f/doctor v0.0.12
github.com/pb33f/libopenapi v0.18.0
github.com/pb33f/libopenapi-validator v0.1.0
github.com/pb33f/doctor v0.0.13
github.com/pb33f/libopenapi v0.18.2
github.com/pb33f/libopenapi-validator v0.2.0
github.com/pterm/pterm v0.12.79
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
github.com/sourcegraph/conc v0.3.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/tliron/glsp v0.2.2
github.com/vmware-labs/yaml-jsonpath v0.3.2
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
golang.org/x/text v0.18.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -43,7 +44,7 @@ require (
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand All @@ -52,34 +53,34 @@ require (
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/nsf/termbox-go v1.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/sasha-s/go-deadlock v0.3.5 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/sourcegraph/jsonrpc2 v0.2.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tliron/commonlog v0.2.10 // indirect
github.com/tliron/kutil v0.3.14 // indirect
github.com/tliron/commonlog v0.2.19 // indirect
github.com/tliron/kutil v0.3.26 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.9-0.20240815153524-6ea36470d1bd // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 6f371c6

Please sign in to comment.