File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
packages/plugins/openapi/src Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ export class RESTfulOpenAPIGenerator extends OpenAPIGeneratorBase {
9191 security,
9292 } ;
9393
94+ // ensure output folder exists
95+ fs . mkdirSync ( path . dirname ( output ) , { recursive : true } ) ;
96+
9497 const ext = path . extname ( output ) ;
9598 if ( ext && ( ext . toLowerCase ( ) === '.yaml' || ext . toLowerCase ( ) === '.yml' ) ) {
9699 fs . writeFileSync ( output , YAML . stringify ( openapi ) ) ;
Original file line number Diff line number Diff line change @@ -94,6 +94,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase {
9494 security,
9595 } ;
9696
97+ // ensure output folder exists
98+ fs . mkdirSync ( path . dirname ( output ) , { recursive : true } ) ;
99+
97100 const ext = path . extname ( output ) ;
98101 if ( ext && ( ext . toLowerCase ( ) === '.yaml' || ext . toLowerCase ( ) === '.yml' ) ) {
99102 fs . writeFileSync ( output , YAML . stringify ( openapi ) ) ;
You can’t perform that action at this time.
0 commit comments