From 32303a86f62d14fe2a8aa9d65cade92aaac900cb Mon Sep 17 00:00:00 2001 From: Matthew Lieder Date: Thu, 11 Jul 2024 11:34:34 -0500 Subject: [PATCH] docs: correct redocly config example The Redocly config field on OpenAPITSOptions is named `redocly`, not `redoc`. This corrects the code example. --- docs/node.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/node.md b/docs/node.md index 7a1137ac1..e3f00b52c 100644 --- a/docs/node.md +++ b/docs/node.md @@ -61,7 +61,7 @@ import { createConfig, loadConfig } from "@redocly/openapi-core"; import openapiTS from "openapi-typescript"; // option 1: create in-memory config -const redoc = await createConfig( +const redocly = await createConfig( { apis: { "core@v2": { … }, @@ -72,9 +72,9 @@ const redoc = await createConfig( ); // option 2: load from redocly.yaml file -const redoc = await loadConfig({ configPath: "redocly.yaml" }); +const redocly = await loadConfig({ configPath: "redocly.yaml" }); -const ast = await openapiTS(mySchema, { redoc }); +const ast = await openapiTS(mySchema, { redocly }); ``` :::