Skip to content

Commit c350f93

Browse files
committed
Split openAPI in files with references
1 parent 718ae00 commit c350f93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/split.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function writePaths(paths, options) {
4242
const filePath = path.join(pathsDir, `${sanitizedPath}.${ext}`);
4343

4444
// Update any component references to the proper file location in paths
45-
const updatedPath = convertComponentsToRef(paths[pathKey], ext, pathsDir);
45+
const updatedPath = convertComponentsToRef(paths[pathKey], ext, outputDir);
4646

4747
// Write each path to its own file
4848
await writeFile(filePath, updatedPath, options);
@@ -61,7 +61,7 @@ async function writeComponents(components, options) {
6161
const filePath = path.join(fileDir, `${componentName}.${ext}`);
6262

6363
// Update any component references within components
64-
const updatedComponent = convertComponentsToRef(components[componentType][componentName], ext, fileDir);
64+
const updatedComponent = convertComponentsToRef(components[componentType][componentName], ext, componentsDir);
6565

6666
// Write each component (schema, parameter, etc.) to its own YAML file
6767
await writeFile(filePath, updatedComponent, options);

0 commit comments

Comments
 (0)