From f36a937353789da0495acce145956e2a7ce92b72 Mon Sep 17 00:00:00 2001 From: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:26:46 +1200 Subject: [PATCH] feat: use yaml --- src/docs/{openapi.v2.yml => openapi.v2.yaml} | 0 src/routers/docs/v2.ts | 2 +- src/utils/openapi-docs.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/docs/{openapi.v2.yml => openapi.v2.yaml} (100%) diff --git a/src/docs/openapi.v2.yml b/src/docs/openapi.v2.yaml similarity index 100% rename from src/docs/openapi.v2.yml rename to src/docs/openapi.v2.yaml diff --git a/src/routers/docs/v2.ts b/src/routers/docs/v2.ts index ea0b6f5..5cc08c6 100644 --- a/src/routers/docs/v2.ts +++ b/src/routers/docs/v2.ts @@ -11,7 +11,7 @@ app.get( pageTitle: "Simple Logging Server API Reference", theme: "purple", spec: { - url: "/static/openapi.v2.yml", + url: "/static/openapi.v2.yaml", }, }), ); diff --git a/src/utils/openapi-docs.ts b/src/utils/openapi-docs.ts index 5ba1d01..1cfcdaa 100644 --- a/src/utils/openapi-docs.ts +++ b/src/utils/openapi-docs.ts @@ -7,7 +7,7 @@ type OpenApiDocTransformer = (dirVersion: string, doc: string) => string; * Modify the OpenAPI doc with the provided transformers and write the file to the static directory. */ export function transformOpenapiYmlDoc(dir_version: string, transformers: OpenApiDocTransformer[] = []): void { - const openapiFilename = `openapi.${dir_version}.yml`; + const openapiFilename = `openapi.${dir_version}.yaml`; const openapiYmlSourcePath = join(__dirname, "..", "docs", openapiFilename); const openapiYmlOutPath = join(__dirname, "..", "..", "public", "static", openapiFilename);