diff --git a/checker/check_api_security_updated_test.go b/checker/check_api_security_updated_test.go index 16a281fc..55aff872 100644 --- a/checker/check_api_security_updated_test.go +++ b/checker/check_api_security_updated_test.go @@ -44,7 +44,7 @@ func TestAPIGlobalSecurityyDeleted(t *testing.T) { Args: []any{"petstore_auth"}, Level: checker.INFO, }, errs[0]) - require.Equal(t, "security scheme 'petstore_auth' was removed", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed security scheme 'petstore_auth'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: removing a security scope from an API global security @@ -64,7 +64,7 @@ func TestAPIGlobalSecurityScopeRemoved(t *testing.T) { Args: []any{"read:pets", "petstore_auth"}, Level: checker.INFO, }, errs[0]) - require.Equal(t, "security scope 'read:pets' was removed from global security scheme 'petstore_auth'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed security scope 'read:pets' from global security scheme 'petstore_auth'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: adding a security scope from an API global security @@ -128,7 +128,7 @@ func TestAPISecurityDeleted(t *testing.T) { Path: "/subscribe", Source: load.NewSource("../data/checker/api_security_added_base.yaml"), }, errs[0]) - require.Equal(t, "endpoint scheme security 'petstore_auth' was removed", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed endpoint scheme security 'petstore_auth'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: removing a security scope from an API endpoint security @@ -150,7 +150,7 @@ func TestAPISecurityScopeRemoved(t *testing.T) { Path: "/subscribe", Source: load.NewSource("../data/checker/api_security_updated_revision.yaml"), }, errs[0]) - require.Equal(t, "security scope 'read:pets' was removed from endpoint security scheme 'petstore_auth'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed security scope 'read:pets' from endpoint security scheme 'petstore_auth'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: adding a security scope to an API endpoint security diff --git a/checker/check_api_tag_updated_test.go b/checker/check_api_tag_updated_test.go index 620b3b95..96fda205 100644 --- a/checker/check_api_tag_updated_test.go +++ b/checker/check_api_tag_updated_test.go @@ -31,7 +31,7 @@ func TestTagAdded(t *testing.T) { Source: load.NewSource("../data/checker/tag_added_base.yaml"), OperationId: "createOneGroup", }, errs[0]) - require.Equal(t, "api tag 'newTag' added", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "added api tag 'newTag'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: removing an existing tag @@ -57,7 +57,7 @@ func TestTagRemoved(t *testing.T) { Source: load.NewSource("../data/checker/tag_removed_base.yaml"), OperationId: "createOneGroup", }, errs[0]) - require.Equal(t, "api tag 'Test' removed", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed api tag 'Test'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } diff --git a/checker/check_breaking_test.go b/checker/check_breaking_test.go index 8f36c863..c453ab17 100644 --- a/checker/check_breaking_test.go +++ b/checker/check_breaking_test.go @@ -245,7 +245,7 @@ func TestBreaking_ResponseHeaderRemoved(t *testing.T) { require.NotEmpty(t, errs) require.Len(t, errs, 1) require.Equal(t, checker.RequiredResponseHeaderRemovedId, errs[0].GetId()) - require.Equal(t, "mandatory header 'X-RateLimit-Limit' was removed for response status 'default'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed mandatory header 'X-RateLimit-Limit' for response status 'default'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // BC: removing an existing response with successful status is breaking @@ -364,7 +364,7 @@ func TestBreaking_TagRemoved(t *testing.T) { require.NotEmpty(t, errs) require.Len(t, errs, 1) require.Equal(t, checker.APITagRemovedId, errs[0].GetId()) - require.Equal(t, "api tag 'security' removed", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed api tag 'security'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // BC: removing/updating a media type enum in response (optional) @@ -436,7 +436,7 @@ func TestBreaking_OptionalResponseHeaderRemoved(t *testing.T) { require.NotEmpty(t, errs) require.Len(t, errs, 1) require.Equal(t, checker.OptionalResponseHeaderRemovedId, errs[0].GetId()) - require.Equal(t, "optional header 'X-RateLimit-Limit' was removed for response status 'default'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed optional header 'X-RateLimit-Limit' for response status 'default'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // BC: deleting a media-type from response is breaking diff --git a/checker/check_components_security_updated_test.go b/checker/check_components_security_updated_test.go index 8b100470..4d5e85ee 100644 --- a/checker/check_components_security_updated_test.go +++ b/checker/check_components_security_updated_test.go @@ -111,7 +111,7 @@ func TestComponentSecurityRemoved(t *testing.T) { Level: checker.INFO, Component: checker.ComponentSecuritySchemes, }, errs[0]) - require.Equal(t, "component security scheme 'BasicAuth' was removed", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed component security scheme 'BasicAuth'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: adding a new oauth security scope @@ -151,12 +151,12 @@ func TestComponentSecurityOauthScopeRemoved(t *testing.T) { errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO) require.Len(t, errs, 1) require.Equal(t, checker.ComponentChange{ - Id: "api-security-component-oauth-scope-removed", + Id: checker.APIComponentSecurityOauthScopeRemovedId, Args: []any{"petstore_auth", "admin:pets"}, Level: checker.INFO, Component: checker.ComponentSecuritySchemes, }, errs[0]) - require.Equal(t, "component security scheme 'petstore_auth' oauth scope 'admin:pets' was removed", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed component security scheme 'petstore_auth' oauth scope 'admin:pets'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: removing a new oauth security scope @@ -173,7 +173,7 @@ func TestComponentSecurityOauthScopeUpdated(t *testing.T) { errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.APIComponentsSecurityUpdatedCheck), d, osm, checker.INFO) require.Len(t, errs, 1) require.Equal(t, checker.ComponentChange{ - Id: "api-security-component-oauth-scope-changed", + Id: checker.APIComponentSecurityOauthScopeUpdatedId, Args: []any{"petstore_auth", "read:pets", "read your pets", "grants access to pets (deprecated)"}, Level: checker.INFO, Component: checker.ComponentSecuritySchemes, diff --git a/checker/check_response_pattern_added_or_changed.go b/checker/check_response_pattern_added_or_changed.go index 00850aae..6741376e 100644 --- a/checker/check_response_pattern_added_or_changed.go +++ b/checker/check_response_pattern_added_or_changed.go @@ -48,13 +48,13 @@ func ResponsePatternAddedOrChangedCheck(diffReport *diff.Diff, operationsSources propName := propertyFullName(propertyPath, propertyName) id := ResponsePropertyPatternChangedId - args := []any{propName, patternDiff.From, patternDiff.To, responseStatus} + args := []any{patternDiff.From, patternDiff.To, propName, responseStatus} if patternDiff.To == "" || patternDiff.To == nil { id = ResponsePropertyPatternRemovedId - args = []any{propName, patternDiff.From, responseStatus} + args = []any{patternDiff.From, propName, responseStatus} } else if patternDiff.From == "" || patternDiff.From == nil { id = ResponsePropertyPatternAddedId - args = []any{propName, patternDiff.To, responseStatus} + args = []any{patternDiff.To, propName, responseStatus} } result = append(result, NewApiChange( diff --git a/checker/check_response_pattern_added_or_changed_test.go b/checker/check_response_pattern_added_or_changed_test.go index 9e8e79ca..1e09949d 100644 --- a/checker/check_response_pattern_added_or_changed_test.go +++ b/checker/check_response_pattern_added_or_changed_test.go @@ -24,14 +24,14 @@ func TestResponsePropertyPatternChanged(t *testing.T) { require.Len(t, errs, 1) require.Equal(t, checker.ApiChange{ Id: checker.ResponsePropertyPatternChangedId, - Args: []any{"data/created", "^[a-z]+$", "^(?:([a-z]+-)*([a-z]+)?)$", "200"}, + Args: []any{"^[a-z]+$", "^(?:([a-z]+-)*([a-z]+)?)$", "data/created", "200"}, Level: checker.INFO, Operation: "POST", Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_pattern_added_or_changed_revision.yaml"), OperationId: "createOneGroup", }, errs[0]) - require.Equal(t, "'data/created' response property pattern was changed from '^[a-z]+$' to '^(?:([a-z]+-)*([a-z]+)?)$' for status '200'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "changed pattern from '^[a-z]+$' to '^(?:([a-z]+-)*([a-z]+)?)$' in property 'data/created' for response status '200'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: adding response property pattern @@ -49,14 +49,14 @@ func TestResponsePropertyPatternAdded(t *testing.T) { require.Len(t, errs, 1) require.Equal(t, checker.ApiChange{ Id: checker.ResponsePropertyPatternAddedId, - Args: []any{"data/created", "^[a-z]+$", "200"}, + Args: []any{"^[a-z]+$", "data/created", "200"}, Level: checker.INFO, Operation: "POST", Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_pattern_added_or_changed_base.yaml"), OperationId: "createOneGroup", }, errs[0]) - require.Equal(t, "'data/created' response property pattern '^[a-z]+$' was added for status '200'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "added pattern '^[a-z]+$' to property 'data/created' for response status '200'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: removing response property pattern @@ -74,12 +74,12 @@ func TestResponsePropertyPatternRemoved(t *testing.T) { require.Len(t, errs, 1) require.Equal(t, checker.ApiChange{ Id: checker.ResponsePropertyPatternRemovedId, - Args: []any{"data/created", "^[a-z]+$", "200"}, + Args: []any{"^[a-z]+$", "data/created", "200"}, Level: checker.INFO, Operation: "POST", Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_pattern_added_or_changed_base.yaml"), OperationId: "createOneGroup", }, errs[0]) - require.Equal(t, "'data/created' response property pattern '^[a-z]+$' was removed for status '200'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + require.Equal(t, "removed pattern '^[a-z]+$' from property 'data/created' for response status '200'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } diff --git a/checker/check_response_property_default_value_changed.go b/checker/check_response_property_default_value_changed.go index 8fe3fba4..fdfbf005 100644 --- a/checker/check_response_property_default_value_changed.go +++ b/checker/check_response_property_default_value_changed.go @@ -68,11 +68,11 @@ func ResponsePropertyDefaultValueChangedCheck(diffReport *diff.Diff, operationsS defaultValueDiff := propertyDiff.DefaultDiff if defaultValueDiff.From == nil { - appendResultItem(ResponsePropertyDefaultValueAddedId, propertyName, defaultValueDiff.To, responseStatus) + appendResultItem(ResponsePropertyDefaultValueAddedId, defaultValueDiff.To, propertyName, responseStatus) } else if defaultValueDiff.To == nil { - appendResultItem(ResponsePropertyDefaultValueRemovedId, propertyName, defaultValueDiff.From, responseStatus) + appendResultItem(ResponsePropertyDefaultValueRemovedId, defaultValueDiff.From, propertyName, responseStatus) } else { - appendResultItem(ResponsePropertyDefaultValueChangedId, propertyName, defaultValueDiff.From, defaultValueDiff.To, responseStatus) + appendResultItem(ResponsePropertyDefaultValueChangedId, defaultValueDiff.From, defaultValueDiff.To, propertyName, responseStatus) } }) } diff --git a/checker/check_response_property_default_value_changed_test.go b/checker/check_response_property_default_value_changed_test.go index c65b859e..cac70185 100644 --- a/checker/check_response_property_default_value_changed_test.go +++ b/checker/check_response_property_default_value_changed_test.go @@ -19,23 +19,28 @@ func TestResponsePropertyDefaultValueUpdatedCheck(t *testing.T) { require.NoError(t, err) errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.ResponsePropertyDefaultValueChangedCheck), d, osm, checker.INFO) require.Len(t, errs, 2) - require.ElementsMatch(t, []checker.ApiChange{{ + + require.Equal(t, checker.ApiChange{ Id: checker.ResponsePropertyDefaultValueChangedId, - Args: []any{"created", "2020-01-01T00:00:00Z", "2020-02-01T00:00:00Z", "200"}, + Args: []any{"2020-01-01T00:00:00Z", "2020-02-01T00:00:00Z", "created", "200"}, Level: checker.INFO, Operation: "POST", Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_property_default_value_changed_revision.yaml"), OperationId: "createOneGroup", - }, { + }, errs[0]) + require.Equal(t, "changed default value from '2020-01-01T00:00:00Z' to '2020-02-01T00:00:00Z' for property 'created' for response status '200'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + + require.Equal(t, checker.ApiChange{ Id: checker.ResponsePropertyDefaultValueChangedId, - Args: []any{"enabled", false, true, "200"}, + Args: []any{false, true, "enabled", "200"}, Level: checker.INFO, Operation: "POST", Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_property_default_value_changed_revision.yaml"), OperationId: "createOneGroup", - }}, errs) + }, errs[1]) + require.Equal(t, "changed default value from 'false' to 'true' for property 'enabled' for response status '200'", errs[1].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: changing response body default value @@ -59,6 +64,7 @@ func TestResponseSchemaDefaultValueUpdatedCheck(t *testing.T) { Source: load.NewSource("../data/checker/response_property_default_value_changed_base.yaml"), OperationId: "createOneGroup", }, errs[0]) + require.Equal(t, "response body 'text/plain' default value changed from 'Error' to 'new default value' for status '404'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: adding response body default value or response body property default value @@ -75,7 +81,8 @@ func TestResponsePropertyDefaultValueAddedCheck(t *testing.T) { require.NoError(t, err) errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.ResponsePropertyDefaultValueChangedCheck), d, osm, checker.INFO) require.Len(t, errs, 2) - require.ElementsMatch(t, []checker.ApiChange{{ + + require.Equal(t, checker.ApiChange{ Id: checker.ResponseBodyDefaultValueAddedId, Args: []any{"text/plain", "Error", "404"}, Level: checker.INFO, @@ -83,15 +90,19 @@ func TestResponsePropertyDefaultValueAddedCheck(t *testing.T) { Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_property_default_value_changed_base.yaml"), OperationId: "createOneGroup", - }, { + }, errs[0]) + require.Equal(t, "response body 'text/plain' default value 'Error' was added for status '404'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + + require.Equal(t, checker.ApiChange{ Id: checker.ResponsePropertyDefaultValueAddedId, - Args: []any{"created", "2020-01-01T00:00:00Z", "200"}, + Args: []any{"2020-01-01T00:00:00Z", "created", "200"}, Level: checker.INFO, Operation: "POST", Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_property_default_value_changed_base.yaml"), OperationId: "createOneGroup", - }}, errs) + }, errs[1]) + require.Equal(t, "added default value '2020-01-01T00:00:00Z' to response property 'created' for response status '200'", errs[1].GetUncolorizedText(checker.NewDefaultLocalizer())) } // CL: removing response body default value or response body property default value @@ -108,7 +119,8 @@ func TestResponsePropertyDefaultValueRemovedCheck(t *testing.T) { require.NoError(t, err) errs := checker.CheckBackwardCompatibilityUntilLevel(singleCheckConfig(checker.ResponsePropertyDefaultValueChangedCheck), d, osm, checker.INFO) require.Len(t, errs, 2) - require.ElementsMatch(t, []checker.ApiChange{{ + + require.Equal(t, checker.ApiChange{ Id: checker.ResponseBodyDefaultValueRemovedId, Args: []any{"text/plain", "Error", "404"}, Level: checker.INFO, @@ -116,13 +128,17 @@ func TestResponsePropertyDefaultValueRemovedCheck(t *testing.T) { Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_property_default_value_changed_base.yaml"), OperationId: "createOneGroup", - }, { + }, errs[0]) + require.Equal(t, "response body 'text/plain' default value 'Error' was removed for status '404'", errs[0].GetUncolorizedText(checker.NewDefaultLocalizer())) + + require.Equal(t, checker.ApiChange{ Id: checker.ResponsePropertyDefaultValueRemovedId, - Args: []any{"created", "2020-01-01T00:00:00Z", "200"}, + Args: []any{"2020-01-01T00:00:00Z", "created", "200"}, Level: checker.INFO, Operation: "POST", Path: "/api/v1.0/groups", Source: load.NewSource("../data/checker/response_property_default_value_changed_base.yaml"), OperationId: "createOneGroup", - }}, errs) + }, errs[1]) + require.Equal(t, "removed default value '2020-01-01T00:00:00Z' of property 'created' for response status '200'", errs[1].GetUncolorizedText(checker.NewDefaultLocalizer())) } diff --git a/checker/localizations/localizations.go b/checker/localizations/localizations.go index 6e401575..aea04227 100644 --- a/checker/localizations/localizations.go +++ b/checker/localizations/localizations.go @@ -1,6 +1,6 @@ // Code generated by go-localize; DO NOT EDIT. // This file was generated by robots at -// 2024-08-28 17:55:50.383577 +0300 IDT m=+0.005206293 +// 2024-08-29 12:10:22.97943 +0300 IDT m=+0.005018251 package localizations @@ -18,11 +18,11 @@ var localizations = map[string]string{ "en.messages.api-deprecated-sunset-parse-description": "endpoint deprecated with invalid sunset date", "en.messages.api-global-security-added": "security scheme %s was added", "en.messages.api-global-security-added-description": "security scheme added in security", - "en.messages.api-global-security-removed": "security scheme %s was removed", + "en.messages.api-global-security-removed": "removed security scheme %s", "en.messages.api-global-security-removed-description": "security scheme deleted in security", "en.messages.api-global-security-scope-added": "security scope %s was added to global security scheme %s", "en.messages.api-global-security-scope-added-description": "scope added to a security scheme in security", - "en.messages.api-global-security-scope-removed": "security scope %s was removed from global security scheme %s", + "en.messages.api-global-security-scope-removed": "removed security scope %s from global security scheme %s", "en.messages.api-global-security-scope-removed-description": "scope deleted from a security scheme in security", "en.messages.api-invalid-stability-level": "failed to parse stability level: %v", "en.messages.api-invalid-stability-level-description": "invalid stability level", @@ -50,21 +50,21 @@ var localizations = map[string]string{ "en.messages.api-security-component-oauth-scope-added-description": "scope added to OAuth flow in components/securitySchemes", "en.messages.api-security-component-oauth-scope-changed": "component security scheme %s oauth scope %s was updated from %s to %s", "en.messages.api-security-component-oauth-scope-changed-description": "scope modified in OAuth flow in components/securitySchemes", - "en.messages.api-security-component-oauth-scope-removed": "component security scheme %s oauth scope %s was removed", + "en.messages.api-security-component-oauth-scope-removed": "removed component security scheme %s oauth scope %s", "en.messages.api-security-component-oauth-scope-removed-description": "scope deleted from OAuth flow in components/securitySchemes", "en.messages.api-security-component-oauth-token-url-changed": "component security scheme %s oauth token url changed from %s to %s", "en.messages.api-security-component-oauth-token-url-changed-description": "token URL modified in OAuth flow in components/securitySchemes", "en.messages.api-security-component-oauth-url-changed": "component security scheme %s oauth url changed from %s to %s", "en.messages.api-security-component-oauth-url-changed-description": "auth URL modified in OAuth flow in components/securitySchemes", - "en.messages.api-security-component-removed": "component security scheme %s was removed", + "en.messages.api-security-component-removed": "removed component security scheme %s", "en.messages.api-security-component-removed-description": "security scheme deleted in components/securitySchemes", "en.messages.api-security-component-type-changed": "component security scheme %s type changed from %s to %s", "en.messages.api-security-component-type-changed-description": "security scheme type modified in components/securitySchemes", - "en.messages.api-security-removed": "endpoint scheme security %s was removed", + "en.messages.api-security-removed": "removed endpoint scheme security %s", "en.messages.api-security-removed-description": "security requirements deleted from endpoint", "en.messages.api-security-scope-added": "security scope %s was added to endpoint security scheme %s", "en.messages.api-security-scope-added-description": "scope added to an endpoint's security scheme", - "en.messages.api-security-scope-removed": "security scope %s was removed from endpoint security scheme %s", + "en.messages.api-security-scope-removed": "removed security scope %s from endpoint security scheme %s", "en.messages.api-security-scope-removed-description": "scope deleted from an endpoint's security scheme", "en.messages.api-security-updated": "endpoint scheme security %s was updated from %s to %s", "en.messages.api-stability-decreased": "endpoint stability level decreased from %s to %s", @@ -73,9 +73,9 @@ var localizations = map[string]string{ "en.messages.api-sunset-date-changed-too-small-description": "modified sunset date doesn't meet min required deprecation days", "en.messages.api-sunset-date-too-small": "sunset date %s is too small, must be at least %s days from now", "en.messages.api-sunset-date-too-small-description": "deprecated endpoint sunset before min required deprecation days", - "en.messages.api-tag-added": "api tag %s added", + "en.messages.api-tag-added": "added api tag %s", "en.messages.api-tag-added-description": "endpoint tag added", - "en.messages.api-tag-removed": "api tag %s removed", + "en.messages.api-tag-removed": "removed api tag %s", "en.messages.api-tag-removed-description": "endpoint tag deleted", "en.messages.at": "at", "en.messages.endpoint-added": "endpoint added", @@ -103,7 +103,7 @@ var localizations = map[string]string{ "en.messages.new-required-request-property-description": "required property added to request", "en.messages.new-required-request-property-with-default": "added required request property %s with a default value to media-type %s", "en.messages.new-required-request-property-with-default-description": "required property with default value added to request", - "en.messages.optional-response-header-removed": "optional header %s was removed for response status %s", + "en.messages.optional-response-header-removed": "removed optional header %s for response status %s", "en.messages.optional-response-header-removed-description": "optional response header deleted", "en.messages.pattern-changed-warn-comment": "This is a warning because it is difficult to automatically analyze if the new pattern is a superset of the previous pattern (e.g. changed from '[0-9]+' to '[0-9]*')", "en.messages.request-body-added-optional": "added optional request body", @@ -387,7 +387,7 @@ var localizations = map[string]string{ "en.messages.request-required-property-became-read-only-description": "request required property became read-only", "en.messages.request-required-property-became-write-only": "request required property %s became write-only", "en.messages.request-required-property-became-write-only-description": "request required property became write-only", - "en.messages.required-response-header-removed": "mandatory header %s was removed for response status %s", + "en.messages.required-response-header-removed": "removed mandatory header %s for response status %s", "en.messages.required-response-header-removed-description": "required response header removed", "en.messages.response-body-all-of-added": "added %s to response body 'allOf' list for response status %s", "en.messages.response-body-all-of-added-description": "sub-schema added to allOf in response body", @@ -479,11 +479,11 @@ var localizations = map[string]string{ "en.messages.response-property-became-optional-description": "response property became optional", "en.messages.response-property-became-required": "property %s became required for response status %s", "en.messages.response-property-became-required-description": "response property became required", - "en.messages.response-property-default-value-added": "%s response property default value %s was added for status %s", + "en.messages.response-property-default-value-added": "added default value %s to response property %s for response status %s", "en.messages.response-property-default-value-added-description": "response property default value set", - "en.messages.response-property-default-value-changed": "%s response property default value changed from %s to %s for status %s", + "en.messages.response-property-default-value-changed": "changed default value from %s to %s for property %s for response status %s", "en.messages.response-property-default-value-changed-description": "response property default value changed", - "en.messages.response-property-default-value-removed": "%s response property default value %s was removed for status %s", + "en.messages.response-property-default-value-removed": "removed default value %s of property %s for response status %s", "en.messages.response-property-default-value-removed-description": "response property default value unset", "en.messages.response-property-discriminator-added": "added discriminator to %s response property for response status %s", "en.messages.response-property-discriminator-added-description": "response property discriminator added", @@ -520,11 +520,11 @@ var localizations = map[string]string{ "en.messages.response-property-one-of-added-description": "sub-schema added to oneOf in response property", "en.messages.response-property-one-of-removed": "removed %s from %s response property 'oneOf' list for response status %s", "en.messages.response-property-one-of-removed-description": "sub-schema removed from oneOf in response property", - "en.messages.response-property-pattern-added": "%s response property pattern %s was added for status %s", + "en.messages.response-property-pattern-added": "added pattern %s to property %s for response status %s", "en.messages.response-property-pattern-added-description": "response property pattern set", - "en.messages.response-property-pattern-changed": "%s response property pattern was changed from %s to %s for status %s", + "en.messages.response-property-pattern-changed": "changed pattern from %s to %s in property %s for response status %s", "en.messages.response-property-pattern-changed-description": "response property pattern changed", - "en.messages.response-property-pattern-removed": "%s response property pattern %s was removed for status %s", + "en.messages.response-property-pattern-removed": "removed pattern %s from property %s for response status %s", "en.messages.response-property-pattern-removed-description": "response property pattern unset", "en.messages.response-property-type-changed": "%s response property type/format changed from %s/%s to %s/%s for status %s", "en.messages.response-property-type-changed-description": "response property type changed", diff --git a/checker/localizations_src/en/messages.yaml b/checker/localizations_src/en/messages.yaml index 7a004085..0ccd4e51 100644 --- a/checker/localizations_src/en/messages.yaml +++ b/checker/localizations_src/en/messages.yaml @@ -9,10 +9,10 @@ request-parameter-pattern-added: added pattern %s to the %s request parameter %s request-parameter-pattern-removed: removed pattern %s from the %s request parameter %s request-parameter-pattern-changed: changed pattern of the %s request parameter %s from %s to %s request-parameter-pattern-generalized: changed pattern of the %s request parameter %s from %s to a more general pattern %s -request-property-pattern-added: added pattern %s to the request property %s of media-type %s -request-property-pattern-removed: removed pattern %s from the request property %s of media-type %s -request-property-pattern-changed: changed pattern of the request property %s of media-type %s from %s to %s -request-property-pattern-generalized: changed pattern of the request property %s of media-type %s from %s to a more general pattern %s +request-property-pattern-added: added pattern %s to the request property %s of media-type %s # done +request-property-pattern-removed: removed pattern %s from the request property %s of media-type %s # done +request-property-pattern-changed: changed pattern of the request property %s of media-type %s from %s to %s # done +request-property-pattern-generalized: changed pattern of the request property %s of media-type %s from %s to a more general pattern %s # done api-deprecated-sunset-parse: "failed to parse sunset date: %v" api-path-sunset-parse: "failed to parse sunset date: %v" api-stability-decreased: endpoint stability level decreased from %s to %s @@ -28,21 +28,21 @@ api-removed-without-deprecation: api removed without deprecation api-removed-before-sunset: api removed before the sunset date %s api-operation-id-removed: api operation id %s removed and replaced with %s api-operation-id-added: api operation id %s was added -api-tag-removed: api tag %s removed -api-tag-added: api tag %s added +api-tag-removed: removed api tag %s +api-tag-added: added api tag %s api-schema-removed: removed schema %s sunset-deleted: api sunset date deleted, but deprecated=true kept api-sunset-date-changed-too-small: api sunset date changed to earlier date from %s to %s, new sunset date must be not earlier than %s at least %s days from now new-required-request-parameter: added required %s request parameter %s new-optional-request-parameter: added optional %s request parameter %s -new-required-request-property: added required request property %s to media-type %s -new-required-request-property-with-default: added required request property %s with a default value to media-type %s -new-optional-request-property: added optional request property %s to media-type %s +new-required-request-property: added required request property %s to media-type %s # done +new-required-request-property-with-default: added required request property %s with a default value to media-type %s # done +new-optional-request-property: added optional request property %s to media-type %s # done new-required-request-header-property: added required %s request header's property %s request-body-became-required: request body became required request-body-became-optional: request body became optional -request-body-became-enum: media-type %s of request body was restricted to a list of enum values -request-body-enum-value-removed: enum value %s removed from media-type %s of request body +request-body-became-enum: media-type %s of request body was restricted to a list of enum values # done +request-body-enum-value-removed: enum value %s removed from media-type %s of request body # done response-mediatype-enum-value-removed: response schema %s enum value removed %s request-header-property-became-required: "%s request header's property %s became required" request-header-property-became-enum: "%s request header's property %s was restricted to a list of enum values" @@ -83,9 +83,9 @@ request-parameter-property-type-changed-warn-comment: This is a warning because request-parameter-property-type-generalized: for %s request parameter %s, type/format of property %s was generalized from %s/%s to %s/%s request-parameter-property-type-specialized: for %s request parameter %s, type/format of property %s was specialized from %s/%s to %s/%s new-request-path-parameter: added path request parameter %s -request-property-became-required: request property %s of media-type %s became required -request-property-became-required-with-default: request property %s with a default value became required in media-type %s -request-property-became-optional: request property %s of media-type %s became optional +request-property-became-required: request property %s of media-type %s became required # done +request-property-became-required-with-default: request property %s with a default value became required in media-type %s # done +request-property-became-optional: request property %s of media-type %s became optional # done request-property-became-not-nullable: request property %s of media-type %s became not nullable request-body-became-not-nullable: media-type %s of request body became not nullable request-property-became-nullable: request property %s of media-type %s became nullable @@ -140,8 +140,8 @@ request-property-type-changed: type/format of request property %s of media-type request-property-type-generalized: type/format of request property %s of media-type %s was generalized from %s/%s to %s/%s request-property-x-extensible-enum-value-removed: removed x-extensible-enum value %s of request property %s of media-type %s response-header-became-optional: header %s became optional for response status %s -required-response-header-removed: mandatory header %s was removed for response status %s -optional-response-header-removed: optional header %s was removed for response status %s +required-response-header-removed: removed mandatory header %s for response status %s +optional-response-header-removed: removed optional header %s for response status %s response-media-type-removed: removed media type %s for response status %s response-media-type-added: added media type %s for response status %s response-optional-property-removed: removed optional property %s from response status %s @@ -176,22 +176,22 @@ response-property-max-increased: max value of %s response property was increased response-body-min-decreased: min value of response body was decreased from %s to %s response-property-min-decreased: min value of %s response property was decreased from %s to %s for response status %s api-security-added: endpoint scheme security %s was added -api-security-removed: endpoint scheme security %s was removed +api-security-removed: removed endpoint scheme security %s # done api-security-updated: endpoint scheme security %s was updated from %s to %s api-global-security-added: security scheme %s was added -api-global-security-removed: security scheme %s was removed -api-global-security-scope-removed: security scope %s was removed from global security scheme %s +api-global-security-removed: removed security scheme %s # done +api-global-security-scope-removed: removed security scope %s from global security scheme %s api-global-security-scope-added: security scope %s was added to global security scheme %s -api-security-scope-removed: security scope %s was removed from endpoint security scheme %s +api-security-scope-removed: removed security scope %s from endpoint security scheme %s # done api-stability-decreased-description: endpoint stability level decreased api-security-scope-added: security scope %s was added to endpoint security scheme %s api-security-component-type-changed: component security scheme %s type changed from %s to %s api-security-component-oauth-url-changed: component security scheme %s oauth url changed from %s to %s api-security-component-oauth-token-url-changed: component security scheme %s oauth token url changed from %s to %s api-security-component-added: component security scheme %s was added -api-security-component-removed: component security scheme %s was removed +api-security-component-removed: removed component security scheme %s # done api-security-component-oauth-scope-added: component security scheme %s oauth scope %s was added -api-security-component-oauth-scope-removed: component security scheme %s oauth scope %s was removed +api-security-component-oauth-scope-removed: removed component security scheme %s oauth scope %s # done api-security-component-oauth-scope-changed: component security scheme %s oauth scope %s was updated from %s to %s response-optional-property-added: added optional property %s to response status %s response-optional-write-only-property-added: added optional write-only property %s to response status %s @@ -211,12 +211,12 @@ response-optional-property-became-write-only: response optional property %s beca response-optional-property-became-read-only: response optional property %s became read-only for status %s response-optional-property-became-not-write-only: response optional property %s became not write-only for status %s response-optional-property-became-not-read-only: response optional property %s became not read-only for status %s -response-property-pattern-changed: "%s response property pattern was changed from %s to %s for status %s" -response-property-pattern-added: "%s response property pattern %s was added for status %s" -response-property-pattern-removed: "%s response property pattern %s was removed for status %s" -response-property-default-value-added: "%s response property default value %s was added for status %s" -response-property-default-value-changed: "%s response property default value changed from %s to %s for status %s" -response-property-default-value-removed: "%s response property default value %s was removed for status %s" +response-property-pattern-changed: changed pattern from %s to %s in property %s for response status %s # done +response-property-pattern-added: added pattern %s to property %s for response status %s # done +response-property-pattern-removed: removed pattern %s from property %s for response status %s # done +response-property-default-value-added: added default value %s to response property %s for response status %s +response-property-default-value-changed: changed default value from %s to %s for property %s for response status %s +response-property-default-value-removed: removed default value %s of property %s for response status %s response-body-default-value-added: response body %s default value %s was added for status %s response-body-default-value-changed: response body %s default value changed from %s to %s for status %s response-body-default-value-removed: response body %s default value %s was removed for status %s diff --git a/docs/BREAKING-CHANGES-EXAMPLES.md b/docs/BREAKING-CHANGES-EXAMPLES.md index 4ab0138a..1c8b48a2 100644 --- a/docs/BREAKING-CHANGES-EXAMPLES.md +++ b/docs/BREAKING-CHANGES-EXAMPLES.md @@ -201,7 +201,7 @@ These examples are automatically generated from unit tests. [adding request parameter default value](../checker/check_request_parameters_default_value_changed_test.go?plain=1#L34) [adding request property enum values](../checker/check_request_property_enum_value_updated_test.go?plain=1#L67) [adding request property pattern](../checker/check_request_property_pattern_added_or_changed_test.go?plain=1#L62) -[adding response body default value or response body property default value](../checker/check_response_property_default_value_changed_test.go?plain=1#L64) +[adding response body default value or response body property default value](../checker/check_response_property_default_value_changed_test.go?plain=1#L70) [adding response property pattern](../checker/check_response_pattern_added_or_changed_test.go?plain=1#L37) [adding two new request properties, one required, one optional](../checker/check_request_property_updated_test.go?plain=1#L35) [changing a response property schema format](../checker/check_response_property_type_changed_test.go?plain=1#L60) @@ -262,7 +262,7 @@ These examples are automatically generated from unit tests. [changing required response property to optional](../checker/check_response_property_became_optional_test.go?plain=1#L12) [changing required response property to read-only](../checker/check_response_required_property_write_only_read_only_test.go?plain=1#L65) [changing required response property to write-only](../checker/check_response_required_property_write_only_read_only_test.go?plain=1#L12) -[changing response body default value](../checker/check_response_property_default_value_changed_test.go?plain=1#L41) +[changing response body default value](../checker/check_response_property_default_value_changed_test.go?plain=1#L46) [changing response body property default value](../checker/check_response_property_default_value_changed_test.go?plain=1#L12) [changing response property pattern](../checker/check_response_pattern_added_or_changed_test.go?plain=1#L12) [changing security component oauth's url](../checker/check_components_security_updated_test.go?plain=1#L11) @@ -340,7 +340,7 @@ These examples are automatically generated from unit tests. [removing request property enum values](../checker/check_request_property_enum_value_updated_test.go?plain=1#L12) [removing request property pattern](../checker/check_request_property_pattern_added_or_changed_test.go?plain=1#L86) [removing request read-only property enum values](../checker/check_request_property_enum_value_updated_test.go?plain=1#L39) -[removing response body default value or response body property default value](../checker/check_response_property_default_value_changed_test.go?plain=1#L97) +[removing response body default value or response body property default value](../checker/check_response_property_default_value_changed_test.go?plain=1#L108) [removing response property pattern](../checker/check_response_pattern_added_or_changed_test.go?plain=1#L62) [setting max of request body](../checker/check_request_property_max_set_test.go?plain=1#L12) [setting max of request propreties](../checker/check_request_property_max_set_test.go?plain=1#L35)