fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #1196 from hey-api/chore/experimental-parser-return

chore: check if ir was generated

authored by

Lubos and committed by
GitHub
475066d6 598028a9

+9 -3
+9 -3
packages/openapi-ts/src/openApi/index.ts
··· 78 78 switch (context.spec.openapi) { 79 79 case '3.0.3': 80 80 parseV3_0_3(context as IRContext<OpenApiV3_0_3>); 81 - return context; 81 + break; 82 82 case '3.1.0': 83 83 parseV3_1_0(context as IRContext<OpenApiV3_1_0>); 84 - return context; 84 + break; 85 85 default: 86 86 // TODO: parser - uncomment after removing legacy parser. 87 87 // For now, we fall back to legacy parser if spec version 88 88 // is not supported 89 89 // throw new Error('Unsupported OpenAPI specification'); 90 - return; 90 + break; 91 91 } 92 + 93 + if (!Object.keys(context.ir).length) { 94 + return; 95 + } 96 + 97 + return context; 92 98 };