Generate OpenAPI from App Router handlers with inferred contracts and source analysis
This commit is contained in:
1 parent
5ce5664b29
commit
cc5d71d39f
11 files changed
+21892
-34
No files matched your search
@@ -6,7 +6,7 @@ import { serializeOpenApiDocument } from '@/openapi/serialize';
|
||||
|
||||
const projectRoot = process.cwd();
|
||||
const outputFile = path.join(projectRoot, 'public', 'openapi.json');
|
||||
const { document, coverage } = await buildOpenApiDocument('public', projectRoot);
|
||||
const { document, coverage } = await buildOpenApiDocument('all', projectRoot);
|
||||
|
||||
await mkdir(path.dirname(outputFile), { recursive: true });
|
||||
await writeFile(outputFile, serializeOpenApiDocument(document), 'utf8');
|
||||
|
||||
Reference in new issue
Block a user