We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 598028a + 0edcd68 commit 475066dCopy full SHA for 475066d
packages/openapi-ts/src/openApi/index.ts
@@ -78,15 +78,21 @@ export const parseExperimental = ({
78
switch (context.spec.openapi) {
79
case '3.0.3':
80
parseV3_0_3(context as IRContext<OpenApiV3_0_3>);
81
- return context;
+ break;
82
case '3.1.0':
83
parseV3_1_0(context as IRContext<OpenApiV3_1_0>);
84
85
default:
86
// TODO: parser - uncomment after removing legacy parser.
87
// For now, we fall back to legacy parser if spec version
88
// is not supported
89
// throw new Error('Unsupported OpenAPI specification');
90
- return;
91
}
92
+
93
+ if (!Object.keys(context.ir).length) {
94
+ return;
95
+ }
96
97
+ return context;
98
};
0 commit comments