Skip to content

Commit 112a58b

Browse files
authored
feat: export sdk snippets (#15)
1 parent bf83b26 commit 112a58b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

liblab.config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"apiName": "magicbell-api",
55
"languages": ["java"],
66
"auth": ["bearer"],
7+
"docs": ["snippets"],
78
"customizations": {
89
"includeOptionalSnippetParameters": true,
910
"authentication": {
@@ -21,6 +22,11 @@
2122
"enabled": true,
2223
"maxAttempts": 3,
2324
"retryDelay": 150
25+
},
26+
"documentation": {
27+
"snippets": {
28+
"format": "json"
29+
}
2430
}
2531
},
2632
"languageOptions": {

scripts/liblab-docs.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ md.mapLinks(readmeAst, rewriteHref);
2626
md.insertFrontMatter(readmeAst, { title: pkg.docs?.name || pkg.name });
2727

2828
await md.write(readmeAst, path.join(outdir, 'index.mdx'));
29+
30+
// copy snippets
31+
await fs.copyFile(path.join(root, 'documentation/snippets/snippets.json'), path.join(outdir, 'snippets.json'));

0 commit comments

Comments
 (0)