Skip to content

Commit 5e8b5dc

Browse files
small fix to document parsing order
1 parent ee41b3f commit 5e8b5dc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/middlewares/parsers/schema.preprocessor.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,17 +673,19 @@ export class SchemaPreprocessor<
673673
): VisitorNode<any>[] {
674674
const children = [];
675675

676-
children.push(...VisitorNode.fromParentDict(parent, 'pathItem', 'paths'));
677-
678676
if (isDocumentV3_1(parent.object)) {
679677
children.push(
680678
VisitorNode.fromParent(parent, 'componentsV3_1', 'components'),
681679
);
682-
children.push(VisitorNode.fromParentDict(parent, 'pathItem', 'webhooks'));
680+
children.push(
681+
...VisitorNode.fromParentDict(parent, 'pathItem', 'webhooks'),
682+
);
683683
} else {
684684
children.push(VisitorNode.fromParent(parent, 'components'));
685685
}
686686

687+
children.push(...VisitorNode.fromParentDict(parent, 'pathItem', 'paths'));
688+
687689
return children;
688690
}
689691

0 commit comments

Comments
 (0)