Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.26.0
require (
github.com/getkin/kin-openapi v0.138.0
github.com/iancoleman/strcase v0.3.0
github.com/oasdiff/oasdiff v1.15.2
github.com/oasdiff/oasdiff v1.15.3
github.com/spf13/afero v1.15.0
github.com/spf13/cobra v1.10.2
github.com/stretchr/testify v1.11.1
Expand Down
4 changes: 2 additions & 2 deletions tools/cli/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M
github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
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/oasdiff v1.15.2 h1:bOdYDXePS2FJqh81/W5Pmi7KlBsw0J6/q0RLWelAp2g=
github.com/oasdiff/oasdiff v1.15.2/go.mod h1:bEVllufwEccRs/UANZYS4x8M9ecverfPiXqwneBNB4o=
github.com/oasdiff/oasdiff v1.15.3 h1:nDH2edtgkAVk++kwiio/Ec1D6pJHyttAWEo20kKGG1Q=
github.com/oasdiff/oasdiff v1.15.3/go.mod h1:bEVllufwEccRs/UANZYS4x8M9ecverfPiXqwneBNB4o=
github.com/oasdiff/yaml v0.0.9 h1:zQOvd2UKoozsSsAknnWoDJlSK4lC0mpmjfDsfqNwX48=
github.com/oasdiff/yaml v0.0.9/go.mod h1:8lvhgJG4xiKPj3HN5lDow4jZHPlx1i7dIwzkdAo6oAM=
github.com/oasdiff/yaml3 v0.0.12 h1:75urAtPeDg2/iDEWwzNrLOWxI9N/dCh81nTTJtokt2M=
Expand Down
4 changes: 3 additions & 1 deletion tools/cli/internal/changelog/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ func newChangelog(baseMetadata, revisionMetadata *Metadata, exceptionFilePath st
}

changelogConfig := checker.NewConfig(
checker.GetAllChecks()).WithSeverityLevels(breakingChangesAdditionalCheckers).WithDeprecation(deprecationDaysBeta, deprecationDaysStable)
checker.GetAllChecks(),
checker.WithSeverityLevels(breakingChangesAdditionalCheckers),
checker.WithDeprecation(deprecationDaysBeta, deprecationDaysStable))

return &Changelog{
BaseChangelog: baseChangelog,
Expand Down
4 changes: 2 additions & 2 deletions tools/cli/internal/openapi/oasdiff.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (o *OasDiff) handlePathConflict(basePath *openapi3.PathItem, basePathName s
}

exclude := []string{"extensions"}
customConfig := diff.NewConfig().WithExcludeElements(exclude)
customConfig := diff.NewConfig(diff.WithExcludeElements(exclude))
d, err := o.GetDiffWithConfig(o.base, o.external, customConfig)
if err != nil {
return err
Expand Down Expand Up @@ -457,7 +457,7 @@ func (o *OasDiff) areSchemaIdentical(name string) bool {
// arePathsIdenticalWithExcludeExtensions checks if the paths are identical excluding extension diffs across operations (e.g. x-xgen-soa-migration).
func (o *OasDiff) arePathsIdenticalWithExcludeExtensions(name string) (bool, error) {
// If the diff only has extensions diff, then we consider the paths to be identical
customConfig := diff.NewConfig().WithExcludeElements([]string{"extensions"})
customConfig := diff.NewConfig(diff.WithExcludeElements([]string{"extensions"}))
result, err := o.GetDiffWithConfig(o.base, o.external, customConfig)
if err != nil {
return false, err
Expand Down
2 changes: 1 addition & 1 deletion tools/cli/internal/openapi/oasdiff_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestGetDiffWithConfig(t *testing.T) {
mockDiffGet := NewMockDiffGetter(ctrl)

exclude := []string{"extensions"}
customConfig := diff.NewConfig().WithExcludeElements(exclude)
customConfig := diff.NewConfig(diff.WithExcludeElements(exclude))

testCases := []struct {
name string
Expand Down
2 changes: 1 addition & 1 deletion tools/cli/test/e2e/cli/split_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func ValidateVersionedSpec(t *testing.T, correctSpecPath, generatedSpecPath stri
correctSpec := newOpenAPISpec(t, correctSpecPath)
generatedSpec := newOpenAPISpec(t, generatedSpecPath)
examples := []string{"examples"}
d, err := diff.Get(diff.NewConfig().WithExcludeElements(examples), correctSpec, generatedSpec)
d, err := diff.Get(diff.NewConfig(diff.WithExcludeElements(examples)), correctSpec, generatedSpec)
require.NoError(t, err)

message := "Generated spec is not equal to the correct spec for path: " + correctSpecPath + "\n\n" +
Expand Down
Loading