Skip to content

Commit fe6334d

Browse files
committed
fix: change complex value of specification extension test for Path Item
1 parent 548bb02 commit fe6334d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/openapi/openapi3.compare.rules.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ export const openApiSpecificationExtensionRules = {
55
'/^': {
66
'x-': {
77
$: allUnclassified,
8+
'/*': {
9+
$: allUnclassified,
10+
},
811
'/**': {
912
$: allUnclassified,
1013
},

test/openapi.specificationExtensions.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const callbackObjectPaths: JsonPath[] = [
162162
]
163163

164164
const pathItemObjectPaths: JsonPath[] = [
165-
//['paths', '/somePath'], //TODO: fix `change complex value of specification extension` test, annotation for some reason
165+
['paths', '/somePath'],
166166
...callbackObjectPaths.map(path => [...path, 'someExpression']),
167167
// ['components', 'pathItems', 'somePathItem'], // support path items in components for OAS 3.1
168168
]
@@ -189,7 +189,7 @@ const exampleObjectPaths: JsonPath[] = [
189189
...mediaTypeObjectPaths.map(path => [...path, 'examples', 'someExample']),
190190
]
191191

192-
// Paths where OAS specification extensions can be added
192+
// Paths where OpenAPI specification extensions can be added
193193
const specificationExtensionObjectPaths: JsonPath[] = [
194194

195195
// OpenAPI Object
@@ -283,7 +283,8 @@ describe('OpenAPI specification extensions changes classification', () => {
283283
})
284284
})
285285

286-
// ['paths', '/somePath'].forEach(path => { // use for debugging specific case
286+
//const testPaths: JsonPath[] = [['paths']] // use for debugging specific case
287+
//testPaths.forEach(path => {
287288
specificationExtensionObjectPaths.forEach(path => {
288289
const pathDescription = path.length > 0 ? path.join('.') : '[]'
289290
const fullExtensionPath = [...path, extensionName]

0 commit comments

Comments
 (0)