From 6ffa51dfcc5d2a0e997841e547f4a50bbd9dbb3b Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 20 Oct 2024 18:13:48 +0000 Subject: docs: Generate OpenAPI docs --- packages/open-api/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'packages/open-api/index.ts') 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", }); } -- cgit v1.2.3-70-g09d2