Skip to content

Commit

Permalink
Merge pull request #79 from cerberauth/renovate/all-minor-patch
Browse files Browse the repository at this point in the history
fix(deps): update module github.com/getkin/kin-openapi to v0.124.0
  • Loading branch information
emmanuelgautier authored Apr 7, 2024
2 parents e9fd3ff + beaec6b commit 08aa588
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/brianvoe/gofakeit/v7 v7.0.2
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be
github.com/fatih/color v1.16.0
github.com/getkin/kin-openapi v0.123.0
github.com/getkin/kin-openapi v0.124.0
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/jarcoal/httpmock v1.3.1
github.com/olekukonko/tablewriter v0.0.5
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/getkin/kin-openapi v0.123.0 h1:zIik0mRwFNLyvtXK274Q6ut+dPh6nlxBp0x7mNrPhs8=
github.com/getkin/kin-openapi v0.123.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M=
github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q=
github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs=
github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw=
Expand Down
5 changes: 2 additions & 3 deletions scan/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ func getOperationPath(p string, params openapi3.Parameters) (string, error) {

// if there is no example generate random param
if value == nil {
switch v.Value.Schema.Value.Type {
case "string":
if v.Value.Schema.Value.Type.Is("string") {
value = gofakeit.Word()
case "number", "integer":
} else if v.Value.Schema.Value.Type.Is("number") || v.Value.Schema.Value.Type.Is("integer") {
value = gofakeit.Number(0, 5)
}
}
Expand Down

0 comments on commit 08aa588

Please sign in to comment.