diff options
| author | Mohamed Bassem <me@mbassem.com> | 2024-10-20 18:13:48 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2024-10-20 18:13:48 +0000 |
| commit | 6ffa51dfcc5d2a0e997841e547f4a50bbd9dbb3b (patch) | |
| tree | dd64f6d15d3ad29acd5d1d2a4e0795797bde2741 /packages/open-api/index.ts | |
| parent | 3c1ec3aa2f7d64932fd26c8cbcb1aee1e57861bd (diff) | |
| download | karakeep-6ffa51dfcc5d2a0e997841e547f4a50bbd9dbb3b.tar.zst | |
docs: Generate OpenAPI docs
Diffstat (limited to 'packages/open-api/index.ts')
| -rw-r--r-- | packages/open-api/index.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/packages/open-api/index.ts b/packages/open-api/index.ts index da5b3729..8682c208 100644 --- a/packages/open-api/index.ts +++ b/packages/open-api/index.ts @@ -3,7 +3,6 @@ import { OpenApiGeneratorV3, OpenAPIRegistry, } from "@asteasolutions/zod-to-openapi"; -import * as yaml from "yaml"; import { registry as bookmarksRegistry } from "./lib/bookmarks"; import { registry as commonRegistry } from "./lib/common"; @@ -32,13 +31,9 @@ function getOpenApiDocumentation() { } function writeDocumentation() { - // OpenAPI JSON const docs = getOpenApiDocumentation(); - - // YAML equivalent - const fileContent = yaml.stringify(docs); - - fs.writeFileSync(`./openapi-spec.yml`, fileContent, { + const fileContent = JSON.stringify(docs, null, 2); + fs.writeFileSync(`./hoarder-openapi-spec.json`, fileContent, { encoding: "utf-8", }); } |
