Skip to content

Commit b4cf1b0

Browse files
committed
Rename Semi-breaking to risky
1 parent a945fb6 commit b4cf1b0

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/jsonSchema/jsonSchema.classify.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
breakingIfAfterTrue,
55
nonBreaking,
66
PARENT_JUMP,
7-
semiBreaking,
7+
risky,
88
strictResolveValueFromContext,
99
unclassified,
1010
} from '../core'
@@ -101,8 +101,8 @@ export const enumClassifyRule: ClassifyRule = [
101101
({ before }) => (isNotEmptyArray(before.parent) ? nonBreaking : breaking),
102102
({ after }) => (isNotEmptyArray(after.parent) ? breaking : nonBreaking),
103103
breaking,
104-
({ before }) => (isNotEmptyArray(before.parent) ? semiBreaking : nonBreaking),
105-
({ after }) => (isNotEmptyArray(after.parent) ? nonBreaking: semiBreaking ),
104+
({ before }) => (isNotEmptyArray(before.parent) ? risky : nonBreaking),
105+
({ after }) => (isNotEmptyArray(after.parent) ? nonBreaking: risky ),
106106
nonBreaking
107107
]
108108

src/jsonSchema/jsonSchema.rules.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ import {
77
booleanClassifier,
88
breaking,
99
breakingIf,
10+
deepEqualsUniqueItemsArrayMappingResolver,
1011
diffDescription,
1112
nonBreaking,
1213
onlyAddBreaking,
1314
reverseClassifyRuleTransformer,
15+
risky,
1416
TEMPLATE_PARAM_ACTION,
1517
TEMPLATE_PARAM_PLACE,
1618
TEMPLATE_PARAM_PREPOSITION,
@@ -19,8 +21,6 @@ import {
1921
TEMPLATE_PARAM_SCOPE,
2022
transformCompareRules,
2123
unclassified,
22-
deepEqualsUniqueItemsArrayMappingResolver,
23-
semiBreaking,
2424
} from '../core'
2525
import {
2626
enumClassifyRule,
@@ -123,7 +123,7 @@ export const jsonSchemaRules = ({
123123
'/default': simpleRule([nonBreaking, breaking, breaking], resolveSchemaDescriptionTemplates('default value')),
124124

125125
'/enum': {
126-
$: [breaking, nonBreaking, breaking, nonBreaking, semiBreaking, nonBreaking],
126+
$: [breaking, nonBreaking, breaking, nonBreaking, risky, nonBreaking],
127127
mapping: deepEqualsUniqueItemsArrayMappingResolver,
128128
'/*': ({ key, value }) => {
129129
if (!isNumber(key)) {

test/compatibility-suites/openapi/response-body-schema.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { compareFiles, compareFilesWithMerge, TEST_DEFAULTS_DECLARATION_PATHS } from '../utils'
22
import { diffsMatcher } from '../../helper/matchers'
3-
import { annotation, breaking, DiffAction, nonBreaking, semiBreaking } from '../../../src'
3+
import { annotation, breaking, DiffAction, nonBreaking, risky } from '../../../src'
44
import { JSON_SCHEMA_NODE_SYNTHETIC_TYPE_ANY } from '@netcracker/qubership-apihub-api-unifier'
55

66
const SUITE_ID = 'response-body-schema'
@@ -160,7 +160,7 @@ describe('Openapi3 ResponseBody.Schema ', () => {
160160
expect.objectContaining({
161161
action: DiffAction.remove,
162162
beforeDeclarationPaths: [[...RESPONSE_SCHEMA_PATH, 'enum']],
163-
type: semiBreaking,
163+
type: risky,
164164
}),
165165
]))
166166
})
@@ -172,7 +172,7 @@ describe('Openapi3 ResponseBody.Schema ', () => {
172172
expect.objectContaining({
173173
action: DiffAction.add,
174174
afterDeclarationPaths: [[...RESPONSE_SCHEMA_PATH, 'enum', 2]],
175-
type: semiBreaking,
175+
type: risky,
176176
}),
177177
]))
178178
})
@@ -189,7 +189,7 @@ describe('Openapi3 ResponseBody.Schema ', () => {
189189
expect.objectContaining({
190190
action: DiffAction.add,
191191
afterDeclarationPaths: [[...RESPONSE_SCHEMA_PATH, 'enum', 1]],
192-
type: semiBreaking,
192+
type: risky,
193193
}),
194194
],
195195
))

0 commit comments

Comments
 (0)