@paulpugovkin/api-docs-axios-ts-generator 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -96,7 +96,7 @@ async function main() {
|
|
|
96
96
|
} else {
|
|
97
97
|
// Режим обратной совместимости - использование CLI аргументов
|
|
98
98
|
const apiDocsUrl = options.apiDocsUrl;
|
|
99
|
-
const outputDir = options.outputDir || path.resolve(
|
|
99
|
+
const outputDir = options.outputDir || path.resolve(process.cwd(), "../generated");
|
|
100
100
|
|
|
101
101
|
// Проверяем, указан ли URL для API документации
|
|
102
102
|
if (!apiDocsUrl) {
|
|
@@ -125,7 +125,7 @@ async function main() {
|
|
|
125
125
|
console.log(`Output directory: ${config.outputDir || 'Not specified - using default'}`);
|
|
126
126
|
|
|
127
127
|
// Определяем пути
|
|
128
|
-
const outputDir = config.outputDir || path.resolve(
|
|
128
|
+
const outputDir = config.outputDir || path.resolve(process.cwd(), "../generated");
|
|
129
129
|
const interfacesDir = config.interfacesDir || path.join(outputDir, "interfaces");
|
|
130
130
|
const classesDir = config.classesDir || path.join(outputDir, "classes");
|
|
131
131
|
const interfacesOpenApi = path.join(interfacesDir, "index.ts");
|
|
@@ -71,7 +71,7 @@ async function parseAndGenerate(jsonFile, config) {
|
|
|
71
71
|
const spec = JSON.parse(fs.readFileSync(jsonFile, {encoding: "utf-8"}));
|
|
72
72
|
|
|
73
73
|
// Определяем пути из конфигурации
|
|
74
|
-
const outputDir = config.outputDir || path.resolve(
|
|
74
|
+
const outputDir = config.outputDir || path.resolve(process.cwd(), "../../generated");
|
|
75
75
|
const interfacesDir = config.interfacesDir || path.join(outputDir, "interfaces");
|
|
76
76
|
const classesDir = config.classesDir || path.join(outputDir, "classes");
|
|
77
77
|
|