Skip to content

Commit 349a7eb

Browse files
committed
feat: classify specification extension changes as annotation
1 parent caf10b6 commit 349a7eb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/openapi/openapi3.compare.rules.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { allUnclassified } from '../core'
1+
import { allAnnotation } from '../core'
22
import { CompareRules } from '../types'
33

44
export const openApiSpecificationExtensionRules = {
55
'/^': {
66
'x-': {
7-
$: allUnclassified,
7+
$: allAnnotation,
88
'/*': {
9-
$: allUnclassified,
9+
$: allAnnotation,
1010
},
1111
'/**': {
12-
$: allUnclassified,
12+
$: allAnnotation,
1313
},
1414
},
1515
}

test/openapi.specificationExtensions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { TEST_DIFF_FLAG, TEST_ORIGINS_FLAG } from './helper'
22
import { CompareOptions } from '../src/types'
33
import { apiDiff } from '../src/api'
4-
import { DiffAction, unclassified } from '../src/core/constants'
4+
import { DiffAction, annotation } from '../src/core/constants'
55
import { diffsMatcher } from './helper/matchers'
66
import { JsonPath } from '@netcracker/qubership-apihub-json-crawl'
77
import base from './helper/resources/openapi-specification-extensions/base.json'
@@ -291,7 +291,7 @@ describe('OpenAPI specification extensions changes classification', () => {
291291

292292
describe(`Extensions in '${pathDescription}'`, () => {
293293

294-
const expectedType = unclassified
294+
const expectedType = annotation
295295

296296
it(`add specification extension with primitive value`, () => {
297297
const { before, after } = prepareSpecsForComparison(fullExtensionPath, undefined, 'primitive value')

0 commit comments

Comments
 (0)