Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
reuvenharrison committed Sep 21, 2024
1 parent 2b56755 commit 7058596
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
3 changes: 2 additions & 1 deletion diff/discriminator_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package diff

import (
"github.com/getkin/kin-openapi/openapi3"
"github.com/tufin/oasdiff/utils"
)

// DiscriminatorDiff describes the changes between a pair of discriminator objects: https://swagger.io/specification/#discriminator-object
Expand Down Expand Up @@ -60,7 +61,7 @@ func getDiscriminatorDiffInternal(config *Config, state *state, discriminator1,
return nil, err
}
result.PropertyNameDiff = getValueDiff(discriminator1.PropertyName, discriminator2.PropertyName)
result.MappingDiff = getStringMapDiff(discriminator1.Mapping, discriminator2.Mapping)
result.MappingDiff = getStringMapDiff(utils.StringMap(discriminator1.Mapping), utils.StringMap(discriminator2.Mapping))

return result, nil
}
2 changes: 1 addition & 1 deletion diff/oauth_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func getOAuthFlowDiffInternal(config *Config, state *state, flow1, flow2 *openap
result.AuthorizationURLDiff = getValueDiff(flow1.AuthorizationURL, flow2.AuthorizationURL)
result.TokenURLDiff = getValueDiff(flow1.TokenURL, flow2.TokenURL)
result.RefreshURLDiff = getValueDiff(flow1.RefreshURL, flow2.RefreshURL)
result.ScopesDiff = getStringMapDiff(flow1.Scopes, flow2.Scopes)
result.ScopesDiff = getScopesDiff(flow1.Scopes, flow2.Scopes)

return &result, nil
}
16 changes: 16 additions & 0 deletions diff/scopes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package diff

import (
"github.com/getkin/kin-openapi/openapi3"
"github.com/tufin/oasdiff/utils"
)

func getScopesDiff(scopes1, scopes2 openapi3.StringMap) *StringMapDiff {
diff := getStringMapDiff(utils.StringMap(scopes1), utils.StringMap(scopes2))

if diff.Empty() {
return nil
}

return diff
}
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module github.com/tufin/oasdiff

go 1.22.5

replace gopkg.in/yaml.v3 => github.com/oasdiff/yaml3 v0.0.0-20240819204501-233901bce7fe
replace gopkg.in/yaml.v3 => github.com/oasdiff/yaml3 v0.0.0-20240920135353-c185dc6ea7c6

replace github.com/invopop/yaml => github.com/oasdiff/yaml v0.0.0-20240822113848-2830227c9671
replace github.com/invopop/yaml => github.com/oasdiff/yaml v0.0.0-20240920191703-3e5a9fb5bdf3

replace github.com/getkin/kin-openapi => github.com/oasdiff/kin-openapi v0.0.0-20240822114340-77f909bcefa1
replace github.com/getkin/kin-openapi => github.com/oasdiff/kin-openapi v0.0.0-20240921075217-8a00ba059558

require (
cloud.google.com/go v0.115.0
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/oasdiff/kin-openapi v0.0.0-20240822114340-77f909bcefa1 h1:ljShh904MDrvao/PtQTzfaAnonDA3tYupY9R5NuuL8w=
github.com/oasdiff/kin-openapi v0.0.0-20240822114340-77f909bcefa1/go.mod h1:dttoAiKGJ89CXBRPozVnlbkS6QI2CA1bL2uziw1uQmE=
github.com/oasdiff/kin-openapi v0.0.0-20240921075217-8a00ba059558 h1:aIfXRW0EbLKQsUA9RdAcIDvShF6I4DqQO3viCFEpnzw=
github.com/oasdiff/kin-openapi v0.0.0-20240921075217-8a00ba059558/go.mod h1:5MaNKmkfVAFfhyQtzgwYLynYAHgFA0KSykwF6+NoGMc=
github.com/oasdiff/telemetry v0.1.2 h1:hkmA5YTISVF2/zWa23y29WdPws1Q53pyLOFYMHXoZ1U=
github.com/oasdiff/telemetry v0.1.2/go.mod h1:Y0DaW/CasxZ+vzR54btj430XsL6DGF+rMbJkRld6u3M=
github.com/oasdiff/yaml v0.0.0-20240822113848-2830227c9671 h1:qM2AH1Js3b+0wWCE5SrfSwa/rIXtqMyQZyXx3YaIb5Q=
github.com/oasdiff/yaml v0.0.0-20240822113848-2830227c9671/go.mod h1:/hkd7qQO7Qp3G9ytouXHWapZeeq18qNBkyNAHDpqR1U=
github.com/oasdiff/yaml3 v0.0.0-20240819204501-233901bce7fe h1:sHb5QDQFoFYvM+Ebq0Bo2JC27+U8oHM8Mm50oBwBtnQ=
github.com/oasdiff/yaml3 v0.0.0-20240819204501-233901bce7fe/go.mod h1:lqlOfJRrYpgeWHQj+ky2tf7UJ3PzgHTHRQEpc90nbp0=
github.com/oasdiff/yaml v0.0.0-20240920191703-3e5a9fb5bdf3 h1:nqCxALSUgWobWkFGIrhLRzR/bpImQdGj+3JS4/scTJo=
github.com/oasdiff/yaml v0.0.0-20240920191703-3e5a9fb5bdf3/go.mod h1:AOyUNV9ElKz7EEZeBm/48U54UtjtgCMT9fFbZEsClQc=
github.com/oasdiff/yaml3 v0.0.0-20240920135353-c185dc6ea7c6 h1:+ZsuDTdapTJxfMQk7SOJiNMg0v36pui01L7FEO615r8=
github.com/oasdiff/yaml3 v0.0.0-20240920135353-c185dc6ea7c6/go.mod h1:lqlOfJRrYpgeWHQj+ky2tf7UJ3PzgHTHRQEpc90nbp0=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
Expand Down

0 comments on commit 7058596

Please sign in to comment.