Skip to content

Commit

Permalink
Add Diff for OpenAPI Extensions (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
reuvenharrison authored Apr 8, 2024
1 parent 05b7335 commit 494462e
Show file tree
Hide file tree
Showing 114 changed files with 995 additions and 663 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: true
matrix:
go: ['1.22.1']
go: ['1.22.2']
os:
- ubuntu-latest
- windows-latest
Expand Down Expand Up @@ -88,10 +88,11 @@ jobs:
run: |
! git grep -InE 'json:"' | grep -v _test.go | grep -v yaml:
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }} # required
2 changes: 1 addition & 1 deletion .github/workflows/vuln.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
- id: govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: 1.22.1
go-version-input: 1.22.2
74 changes: 37 additions & 37 deletions BREAKING-CHANGES-EXAMPLES.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Go get dependecies and build ###
FROM golang:1.22.1 as builder
FROM golang:1.22.2 as builder
ENV PLATFORM docker
WORKDIR /go/src/app
COPY go.mod go.sum ./
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ oasdiff diff data/header-case/base.yaml data/header-case/revision.yaml --case-in
## Excluding Specific Kinds of Changes
You can use the `--exclude-elements` flag to exclude certain kinds of changes:
- Use `--exclude-elements examples` to exclude [Examples](https://swagger.io/specification/#example-object)
- Use `--exclude-elements extensions` to exclude [Extensions](https://swagger.io/specification/#specification-extensions)
- Use `--exclude-elements description` to exclude description fields
- Use `--exclude-elements title` to exclude title fields
- Use `--exclude-elements summary` to exclude summary fields
- Use `--exclude-elements endpoints` to exclude the [endpoints diff](#paths-vs-endpoints)
You can ignore multiple elements with a comma-separated list of excluded elements as in [this example](#ignore-changes-to-description-and-examples).
Note that [Extensions](https://swagger.io/specification/#specification-extensions) are always excluded from the diff.
## Excluding Specific Endpoints
You can filter endpoints in two ways:
Expand Down
4 changes: 2 additions & 2 deletions checker/check-api-added_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestApiAdded_DetectsNewPathsAndNewOperations(t *testing.T) {
s2, err := open("../data/new_endpoints/revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)

errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIAddedCheck), d, osm, checker.INFO)
Expand Down Expand Up @@ -44,7 +44,7 @@ func TestApiAdded_DetectsModifiedPathsWithPathParam(t *testing.T) {
s2, err := open("../data/new_endpoints/revision_with_path_param.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)

errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIAddedCheck), d, osm, checker.INFO)
Expand Down
6 changes: 3 additions & 3 deletions checker/check-api-operation-id-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestOperationIdRemoved(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.OperationID = ""

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIOperationIdUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -42,7 +42,7 @@ func TestOperationIdUpdated(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.OperationID = "newOperationId"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIOperationIdUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -68,7 +68,7 @@ func TestOperationIdAdded(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.OperationID = "NewOperationId"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig().WithCheckBreaking(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIOperationIdUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand Down
16 changes: 8 additions & 8 deletions checker/check-api-security-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestAPIGlobalSecurityyAdded(t *testing.T) {
s2, err := open("../data/checker/api_security_global_added_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -35,7 +35,7 @@ func TestAPIGlobalSecurityyDeleted(t *testing.T) {
s2, err := open("../data/checker/api_security_global_added_base.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -55,7 +55,7 @@ func TestAPIGlobalSecurityScopeRemoved(t *testing.T) {
require.NoError(t, err)

s2.Spec.Security[0]["petstore_auth"] = s2.Spec.Security[0]["petstore_auth"][:1]
d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -75,7 +75,7 @@ func TestAPIGlobalSecurityScopeAdded(t *testing.T) {
require.NoError(t, err)

s1.Spec.Security[0]["petstore_auth"] = s2.Spec.Security[0]["petstore_auth"][:1]
d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -94,7 +94,7 @@ func TestAPISecurityAdded(t *testing.T) {
s2, err := open("../data/checker/api_security_added_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -116,7 +116,7 @@ func TestAPISecurityDeleted(t *testing.T) {
s2, err := open("../data/checker/api_security_added_base.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -138,7 +138,7 @@ func TestAPISecurityScopeRemoved(t *testing.T) {
s2, err := open("../data/checker/api_security_updated_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -160,7 +160,7 @@ func TestAPISecurityScopeAdded(t *testing.T) {
s2, err := open("../data/checker/api_security_updated_base.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APISecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand Down
6 changes: 3 additions & 3 deletions checker/check-api-tag-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestTagAdded(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.Tags = []string{"newTag"}

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APITagUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -43,7 +43,7 @@ func TestTagRemoved(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.Tags = []string{}

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APITagUpdatedCheck), d, osm, checker.INFO)
require.NotEmpty(t, errs)
Expand All @@ -70,7 +70,7 @@ func TestTagUpdated(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.Tags = []string{"newTag"}

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APITagUpdatedCheck), d, osm, checker.INFO)
require.NotEmpty(t, errs)
Expand Down
16 changes: 8 additions & 8 deletions checker/check-components-security-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestComponentSecurityOauthURLUpdated(t *testing.T) {

s2.Spec.Components.SecuritySchemes["petstore_auth"].Value.Flows.Implicit.AuthorizationURL = "http://example.new.org/api/oauth/dialog"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -39,7 +39,7 @@ func TestComponentSecurityOauthTokenUpdated(t *testing.T) {

s2.Spec.Components.SecuritySchemes["petstore_auth"].Value.Flows.Implicit.TokenURL = "http://example.new.org/api/oauth/dialog"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -61,7 +61,7 @@ func TestComponentSecurityTypeUpdated(t *testing.T) {

s2.Spec.Components.SecuritySchemes["petstore_auth"].Value.Type = "http"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -81,7 +81,7 @@ func TestComponentSecurityAdded(t *testing.T) {
s2, err := open("../data/checker/component_security_updated_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -101,7 +101,7 @@ func TestComponentSecurityRemoved(t *testing.T) {
s2, err := open("../data/checker/component_security_updated_base.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -123,7 +123,7 @@ func TestComponentSecurityOauthScopeAdded(t *testing.T) {

s2.Spec.Components.SecuritySchemes["petstore_auth"].Value.Flows.Implicit.Scopes["admin:pets"] = "grants access to admin operations"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -146,7 +146,7 @@ func TestComponentSecurityOauthScopeRemoved(t *testing.T) {
// Add to s1 so that it's deletion is identified
s1.Spec.Components.SecuritySchemes["petstore_auth"].Value.Flows.Implicit.Scopes["admin:pets"] = "grants access to admin operations"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -168,7 +168,7 @@ func TestComponentSecurityOauthScopeUpdated(t *testing.T) {

s2.Spec.Components.SecuritySchemes["petstore_auth"].Value.Flows.Implicit.Scopes["read:pets"] = "grants access to pets (deprecated)"

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand Down
4 changes: 2 additions & 2 deletions checker/check-request-body-mediatype-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestRequestBodyMediaTypeAdded(t *testing.T) {
s2, err := open("../data/checker/request_body_media_type_updated_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestBodyMediaTypeChangedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand All @@ -38,7 +38,7 @@ func TestRequestBodyMediaTypeRemoved(t *testing.T) {
s2, err := open("../data/checker/request_body_media_type_updated_base.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestBodyMediaTypeChangedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand Down
4 changes: 2 additions & 2 deletions checker/check-request-body-required-value-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestRequestBodyBecameRequired(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.RequestBody.Value.Required = true

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibility(singleCheckConfig(checker.RequestBodyRequiredUpdatedCheck), d, osm)
require.Len(t, errs, 1)
Expand All @@ -41,7 +41,7 @@ func TestRequestBodyBecameOptional(t *testing.T) {

s2.Spec.Paths.Value("/api/v1.0/groups").Post.RequestBody.Value.Required = false

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig().WithCheckBreaking(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestBodyRequiredUpdatedCheck), d, osm, checker.INFO)
require.Len(t, errs, 1)
Expand Down
8 changes: 4 additions & 4 deletions checker/check-request-discriminator-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestRequestDiscriminatorUpdatedCheckAdded(t *testing.T) {
s2, err := open("../data/checker/request_property_discriminator_added_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestDiscriminatorUpdatedCheck), d, osm, checker.INFO)

Expand Down Expand Up @@ -50,7 +50,7 @@ func TestRequestDiscriminatorUpdatedCheckRemoved(t *testing.T) {
s2, err := open("../data/checker/request_property_discriminator_added_base.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestDiscriminatorUpdatedCheck), d, osm, checker.INFO)

Expand Down Expand Up @@ -83,7 +83,7 @@ func TestRequestDiscriminatorUpdatedCheckPropertyNameChanging(t *testing.T) {
s2, err := open("../data/checker/request_property_discriminator_added_property_name_changed.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestDiscriminatorUpdatedCheck), d, osm, checker.INFO)

Expand Down Expand Up @@ -117,7 +117,7 @@ func TestRequestDiscriminatorUpdatedCheckMappingChanging(t *testing.T) {
s2, err := open("../data/checker/request_property_discriminator_mapping_changed.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestDiscriminatorUpdatedCheck), d, osm, checker.INFO)

Expand Down
2 changes: 1 addition & 1 deletion checker/check-request-parameter-became-enum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestRequestParameterBecameEnum(t *testing.T) {
s2, err := open("../data/checker/request_parameter_became_enum_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)
errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestParameterBecameEnumCheck), d, osm, checker.ERR)
require.Len(t, errs, 1)
Expand Down
4 changes: 2 additions & 2 deletions checker/check-request-parameter-enum-value-updated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestRequestParameterEnumValueRemovedCheck(t *testing.T) {
s2, err := open("../data/checker/request_parameter_enum_value_updated_revision.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)

errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestParameterEnumValueUpdatedCheck), d, osm, checker.ERR)
Expand All @@ -39,7 +39,7 @@ func TestRequestParameterEnumValueAddedCheck(t *testing.T) {
s2, err := open("../data/checker/request_parameter_enum_value_updated_base.yaml")
require.NoError(t, err)

d, osm, err := diff.GetWithOperationsSourcesMap(getConfig(), s1, s2)
d, osm, err := diff.GetWithOperationsSourcesMap(diff.NewConfig(), s1, s2)
require.NoError(t, err)

errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.RequestParameterEnumValueUpdatedCheck), d, osm, checker.INFO)
Expand Down
Loading

0 comments on commit 494462e

Please sign in to comment.