Skip to content

Commit

Permalink
(fix): enum type was being picked up incorrectly #211
Browse files Browse the repository at this point in the history
`libopenapi` was incorrectly extracting enums by looking through everything for a 'type' so when a value had the same name, it got upset. This has now been fixed and vacuum is running `libopenapi` v0.4.6.
  • Loading branch information
daveshanley committed Dec 16, 2022
1 parent d107096 commit 454bd67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
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/libopenapi v0.3.2
github.com/pb33f/libopenapi v0.4.6
github.com/pterm/pterm v0.12.50
github.com/santhosh-tekuri/jsonschema/v5 v5.1.1
github.com/spf13/cobra v1.6.1
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
github.com/pb33f/libopenapi v0.3.2 h1:rsS1bNltxC2pf+34RewbNbSxT62c8OdthpoTXZQM1ic=
github.com/pb33f/libopenapi v0.3.2/go.mod h1:UcUNPQcwq4ojgQgthV+zbeUs25lhDlD4bM9Da8n2vdU=
github.com/pb33f/libopenapi v0.4.5 h1:99h9A7ojryM74GFnt4npT0Z6lLcDrlBOgZ2ZFBbu/30=
github.com/pb33f/libopenapi v0.4.5/go.mod h1:UcUNPQcwq4ojgQgthV+zbeUs25lhDlD4bM9Da8n2vdU=
github.com/pb33f/libopenapi v0.4.6 h1:DSgP3ifXouTgTgEAwMIIaH99tCcex4n3z9VuRNvMNv4=
github.com/pb33f/libopenapi v0.4.6/go.mod h1:UcUNPQcwq4ojgQgthV+zbeUs25lhDlD4bM9Da8n2vdU=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
2 changes: 1 addition & 1 deletion motor/rule_tests/openapi_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ paths:
rules := rs.GenerateOpenAPIDefaultRuleSet()
lintExecution := motor.ApplyRulesToRuleSet(&motor.RuleSetExecution{RuleSet: rules, Spec: []byte(badDoc)})
assert.Len(t, lintExecution.Errors, 0)
assert.Len(t, lintExecution.Results, 27)
assert.Len(t, lintExecution.Results, 30)

for n := 0; n < len(lintExecution.Results); n++ {
assert.NotNil(t, lintExecution.Results[n].Path)
Expand Down

0 comments on commit 454bd67

Please sign in to comment.