Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/plugins/openapi/src/rest-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export class RESTfulOpenAPIGenerator extends OpenAPIGeneratorBase {
security,
};

// ensure output folder exists
fs.mkdirSync(path.dirname(output), { recursive: true });

const ext = path.extname(output);
if (ext && (ext.toLowerCase() === '.yaml' || ext.toLowerCase() === '.yml')) {
fs.writeFileSync(output, YAML.stringify(openapi));
Expand Down
3 changes: 3 additions & 0 deletions packages/plugins/openapi/src/rpc-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ export class RPCOpenAPIGenerator extends OpenAPIGeneratorBase {
security,
};

// ensure output folder exists
fs.mkdirSync(path.dirname(output), { recursive: true });

const ext = path.extname(output);
if (ext && (ext.toLowerCase() === '.yaml' || ext.toLowerCase() === '.yml')) {
fs.writeFileSync(output, YAML.stringify(openapi));
Expand Down
Loading