@codewithagents/openapi-server 1.7.0 → 1.9.0
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/dist/cli.cjs +755 -350
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +35 -21
- package/dist/config.js.map +1 -1
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +58 -63
- package/dist/generator.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/router.d.ts.map +1 -1
- package/dist/plugins/router.js +544 -260
- package/dist/plugins/router.js.map +1 -1
- package/dist/plugins/service.d.ts.map +1 -1
- package/dist/plugins/service.js +68 -193
- package/dist/plugins/service.js.map +1 -1
- package/dist/plugins/shared.d.ts +90 -0
- package/dist/plugins/shared.d.ts.map +1 -0
- package/dist/plugins/shared.js +290 -0
- package/dist/plugins/shared.js.map +1 -0
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -11,4 +11,11 @@ export interface ServerConfig {
|
|
|
11
11
|
input_schema?: string;
|
|
12
12
|
}
|
|
13
13
|
export declare function loadConfig(cwd: string, configPath?: string): Promise<ServerConfig>;
|
|
14
|
+
/**
|
|
15
|
+
* Load a config file and return all configs as a normalized array.
|
|
16
|
+
*
|
|
17
|
+
* Single-spec config: returns a one-element array.
|
|
18
|
+
* Multi-spec config with "projects" key: returns N-element array.
|
|
19
|
+
*/
|
|
20
|
+
export declare function loadConfigs(cwd: string, configPath?: string): Promise<ServerConfig[]>;
|
|
14
21
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAA;AAEpE,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAA;IACrB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAA;IACd,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;IACnD,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AA6BD,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAOxF;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAO3F"}
|
package/dist/config.js
CHANGED
|
@@ -1,30 +1,44 @@
|
|
|
1
|
-
import { loadConfigFile, validateConfigPath, validateInputPath, validateOutputPath, } from 'openapi-zod-ts/config-core';
|
|
1
|
+
import { loadConfigFile, loadConfigsFile, validateConfigPath, validateInputPath, validateOutputPath, } from 'openapi-zod-ts/config-core';
|
|
2
2
|
export { validateConfigPath, validateInputPath, validateOutputPath };
|
|
3
|
+
function parseServerConfig(raw, base) {
|
|
4
|
+
const framework = raw['framework'];
|
|
5
|
+
if (framework !== undefined &&
|
|
6
|
+
framework !== 'hono' &&
|
|
7
|
+
framework !== 'express' &&
|
|
8
|
+
framework !== 'fastify' &&
|
|
9
|
+
framework !== 'none') {
|
|
10
|
+
throw new Error('"framework" must be one of: "hono", "express", "fastify", or "none"');
|
|
11
|
+
}
|
|
12
|
+
if (raw['input_schema'] !== undefined &&
|
|
13
|
+
(typeof raw['input_schema'] !== 'string' || !raw['input_schema'])) {
|
|
14
|
+
throw new Error('"input_schema" must be a non-empty string path to your Zod schema file');
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
...base,
|
|
18
|
+
framework: framework,
|
|
19
|
+
input_schema: raw['input_schema'],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
3
22
|
export async function loadConfig(cwd, configPath) {
|
|
4
23
|
return loadConfigFile({
|
|
5
24
|
cwd,
|
|
6
25
|
configPath,
|
|
7
26
|
defaultFileName: 'openapi-server.config.json',
|
|
8
|
-
parse:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
output: raw['output'],
|
|
24
|
-
framework: framework,
|
|
25
|
-
input_schema: raw['input_schema'],
|
|
26
|
-
};
|
|
27
|
-
},
|
|
27
|
+
parse: parseServerConfig,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Load a config file and return all configs as a normalized array.
|
|
32
|
+
*
|
|
33
|
+
* Single-spec config: returns a one-element array.
|
|
34
|
+
* Multi-spec config with "projects" key: returns N-element array.
|
|
35
|
+
*/
|
|
36
|
+
export async function loadConfigs(cwd, configPath) {
|
|
37
|
+
return loadConfigsFile({
|
|
38
|
+
cwd,
|
|
39
|
+
configPath,
|
|
40
|
+
defaultFileName: 'openapi-server.config.json',
|
|
41
|
+
parse: parseServerConfig,
|
|
28
42
|
});
|
|
29
43
|
}
|
|
30
44
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,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,EAAE,UAAmB;IAChE,OAAO,eAAe,CAAe;QACnC,GAAG;QACH,UAAU;QACV,eAAe,EAAE,4BAA4B;QAC7C,KAAK,EAAE,iBAAiB;KACzB,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/generator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAiGA,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9E"}
|
package/dist/generator.js
CHANGED
|
@@ -1,85 +1,80 @@
|
|
|
1
1
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { join, relative, resolve } from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import { parseSpec } from 'openapi-zod-ts';
|
|
4
|
+
import { runProjects } from 'openapi-zod-ts/config-core';
|
|
5
|
+
import { loadConfigs } from './config.js';
|
|
6
|
+
import { generateService } from './plugins/service.js';
|
|
7
|
+
import { generateRouter, generateExpressRouter, generateFastifyRouter } from './plugins/router.js';
|
|
4
8
|
async function formatTs(content, filePath) {
|
|
5
9
|
const { format, resolveConfig } = await import('prettier');
|
|
6
10
|
const config = await resolveConfig(filePath);
|
|
7
11
|
return format(content, { ...config, parser: 'typescript' });
|
|
8
12
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
/** Pick the framework-specific router generator for a first or second pass. */
|
|
14
|
+
function buildRouterFile(spec, framework, options) {
|
|
15
|
+
if (framework === 'hono')
|
|
16
|
+
return generateRouter(spec, options);
|
|
17
|
+
if (framework === 'express')
|
|
18
|
+
return generateExpressRouter(spec, options);
|
|
19
|
+
return generateFastifyRouter(spec, options);
|
|
20
|
+
}
|
|
12
21
|
// fallow-ignore-next-line complexity
|
|
13
|
-
|
|
14
|
-
console.log('Loading config...');
|
|
15
|
-
const config = await loadConfig(cwd, configPath);
|
|
22
|
+
async function generateOne(cwd, config, label) {
|
|
16
23
|
const inputPath = resolve(cwd, config.input_openapi);
|
|
17
24
|
const outputDir = resolve(cwd, config.output);
|
|
18
25
|
const framework = config.framework ?? 'none';
|
|
19
|
-
|
|
26
|
+
const prefix = label !== undefined ? `[${label}] ` : '';
|
|
27
|
+
console.log(`${prefix}Parsing spec: ${inputPath}`);
|
|
20
28
|
const spec = await parseSpec(inputPath);
|
|
21
|
-
const generatedFiles = [];
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// First pass: generate router without schema validation
|
|
25
|
-
generatedFiles.push(generateRouter(spec));
|
|
29
|
+
const generatedFiles = [generateService(spec)];
|
|
30
|
+
if (framework !== 'none') {
|
|
31
|
+
generatedFiles.push(buildRouterFile(spec, framework));
|
|
26
32
|
}
|
|
27
|
-
|
|
28
|
-
// First pass: generate router without schema validation
|
|
29
|
-
generatedFiles.push(generateExpressRouter(spec));
|
|
30
|
-
}
|
|
31
|
-
else if (framework === 'fastify') {
|
|
32
|
-
// First pass: generate router without schema validation
|
|
33
|
-
generatedFiles.push(generateFastifyRouter(spec));
|
|
34
|
-
}
|
|
35
|
-
console.log(`Writing output to: ${outputDir}`);
|
|
33
|
+
console.log(`${prefix}Writing output to: ${outputDir}`);
|
|
36
34
|
await mkdir(outputDir, { recursive: true });
|
|
37
35
|
for (const file of generatedFiles) {
|
|
38
36
|
const filePath = join(outputDir, file.filename);
|
|
39
37
|
await writeFile(filePath, await formatTs(file.content, filePath), 'utf-8');
|
|
40
|
-
console.log(
|
|
38
|
+
console.log(`${prefix} ✓ ${file.filename}`);
|
|
41
39
|
}
|
|
42
40
|
// Second pass: if input_schema is configured and file exists, re-generate router with Zod validation
|
|
43
|
-
if (
|
|
44
|
-
config
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (const match of schemaContent.matchAll(/^export\s+const\s+(\w+Schema)\b/gm)) {
|
|
58
|
-
exportedSchemas.add(match[1]);
|
|
59
|
-
}
|
|
60
|
-
if (exportedSchemas.size > 0) {
|
|
61
|
-
// Compute relative import path from outputDir to schemaPath
|
|
62
|
-
const relPath = relative(outputDir, schemaPath).replace(/\\/g, '/');
|
|
63
|
-
// Ensure it starts with ./ or ../
|
|
64
|
-
const schemaImportPath = relPath.startsWith('.') ? relPath : `./${relPath}`;
|
|
65
|
-
// Strip .ts extension for import (use .js for NodeNext compatibility)
|
|
66
|
-
const schemaImportPathJs = schemaImportPath.replace(/\.ts$/, '.js');
|
|
67
|
-
const routerOptions = { schemaNames: exportedSchemas, schemaImportPath: schemaImportPathJs };
|
|
68
|
-
let routerFile;
|
|
69
|
-
if (framework === 'hono') {
|
|
70
|
-
routerFile = generateRouter(spec, routerOptions);
|
|
71
|
-
}
|
|
72
|
-
else if (framework === 'express') {
|
|
73
|
-
routerFile = generateExpressRouter(spec, routerOptions);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
routerFile = generateFastifyRouter(spec, routerOptions);
|
|
77
|
-
}
|
|
78
|
-
const routerPath = join(outputDir, routerFile.filename);
|
|
79
|
-
await writeFile(routerPath, await formatTs(routerFile.content, routerPath), 'utf-8');
|
|
80
|
-
console.log(` ✓ router.ts (with Zod validation for ${exportedSchemas.size} schema(s))`);
|
|
81
|
-
}
|
|
41
|
+
if (framework !== 'none' && config.input_schema !== undefined) {
|
|
42
|
+
await generateSchemaEnhancedRouter(cwd, config, spec, framework, outputDir, prefix);
|
|
43
|
+
}
|
|
44
|
+
console.log(`${prefix}Done! Generated ${generatedFiles.length} file(s).`);
|
|
45
|
+
}
|
|
46
|
+
async function generateSchemaEnhancedRouter(cwd, config, spec, framework, outputDir, prefix) {
|
|
47
|
+
const schemaPath = resolve(cwd, config.input_schema);
|
|
48
|
+
let schemaContent;
|
|
49
|
+
try {
|
|
50
|
+
schemaContent = await readFile(schemaPath, 'utf-8');
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
console.log(`${prefix} input_schema not found at ${schemaPath}, skipping Zod validation`);
|
|
54
|
+
return;
|
|
82
55
|
}
|
|
83
|
-
|
|
56
|
+
// Extract exported schema names from the schema file
|
|
57
|
+
const exportedSchemas = new Set();
|
|
58
|
+
for (const match of schemaContent.matchAll(/^export\s+const\s+(\w+Schema)\b/gm)) {
|
|
59
|
+
exportedSchemas.add(match[1]);
|
|
60
|
+
}
|
|
61
|
+
if (exportedSchemas.size === 0)
|
|
62
|
+
return;
|
|
63
|
+
// Compute relative import path from outputDir to schemaPath
|
|
64
|
+
const relPath = relative(outputDir, schemaPath).replace(/\\/g, '/');
|
|
65
|
+
const schemaImportPath = relPath.startsWith('.') ? relPath : `./${relPath}`;
|
|
66
|
+
const schemaImportPathJs = schemaImportPath.replace(/\.ts$/, '.js');
|
|
67
|
+
const routerFile = buildRouterFile(spec, framework, {
|
|
68
|
+
schemaNames: exportedSchemas,
|
|
69
|
+
schemaImportPath: schemaImportPathJs,
|
|
70
|
+
});
|
|
71
|
+
const routerPath = join(outputDir, routerFile.filename);
|
|
72
|
+
await writeFile(routerPath, await formatTs(routerFile.content, routerPath), 'utf-8');
|
|
73
|
+
console.log(`${prefix} ✓ router.ts (with Zod validation for ${exportedSchemas.size} schema(s))`);
|
|
74
|
+
}
|
|
75
|
+
export async function generate(cwd, configPath) {
|
|
76
|
+
console.log('Loading config...');
|
|
77
|
+
const configs = await loadConfigs(cwd, configPath);
|
|
78
|
+
await runProjects(configs, (config, label) => generateOne(cwd, config, label));
|
|
84
79
|
}
|
|
85
80
|
//# sourceMappingURL=generator.js.map
|
package/dist/generator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["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E,MAAM,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAA;IAC3E,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IAEnE,MAAM,UAAU,GAAG,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE;QAClD,WAAW,EAAE,eAAe;QAC5B,gBAAgB,EAAE,kBAAkB;KACrC,CAAC,CAAA;IACF,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;IACvD,MAAM,SAAS,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,CAAA;IACpF,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,0CAA0C,eAAe,CAAC,IAAI,aAAa,CAAC,CAAA;AACnG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,GAAW,EAAE,UAAmB;IAC7D,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAChC,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;IAClD,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAChF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { ServerConfig } from './config.js';
|
|
2
|
-
export { loadConfig } from './config.js';
|
|
2
|
+
export { loadConfig, loadConfigs } from './config.js';
|
|
3
3
|
export { generateService } from './plugins/service.js';
|
|
4
4
|
export { generateRouter } from './plugins/router.js';
|
|
5
5
|
export { generate } from './generator.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/plugins/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/plugins/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAskBnD,UAAU,aAAa;IACrB,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAsqBD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,CAAC,QAAQ,EAC1B,OAAO,CAAC,EAAE,aAAa,GACtB,aAAa,CA4Cf;AAKD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,CAAC,QAAQ,EAC1B,OAAO,CAAC,EAAE,aAAa,GACtB,aAAa,CAqCf;AAKD,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,aAAa,CAwCjG"}
|