Skip to content

Commit 0613b46

Browse files
committed
fix(openapi-client): update output path generation to use project root for generated files
1 parent a3f5d25 commit 0613b46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/nx-plugin/src/generators/openapi-client/openapiClient.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ export async function generateNxProject({
538538
throw new Error(`Spec file ${specFile} is not a file or valid URI.`);
539539
}
540540

541-
const generateOutputs: Output[] = ['{options.outputPath}'];
541+
const generateOutputs: Output[] = [
542+
`{projectRoot}/src/${CONSTANTS.GENERATED_DIR_NAME}`,
543+
];
542544
const generateOutputPath = `./src/${CONSTANTS.GENERATED_DIR_NAME}`;
543545

544546
// if the spec file is remote then we don't need to depend on a project
@@ -618,7 +620,6 @@ export async function generateNxProject({
618620
specFile: `./${CONSTANTS.SPEC_DIR_NAME}/${CONSTANTS.SPEC_FILE_NAME}`,
619621
}),
620622
cwd: `{projectRoot}`,
621-
outputPath: generateOutputPath,
622623
},
623624
outputs: generateOutputs,
624625
},

0 commit comments

Comments
 (0)