Skip to content

Commit 8f3beab

Browse files
authored
docs: correct redocly config example (#1757)
The Redocly config field on OpenAPITSOptions is named `redocly`, not `redoc`. This corrects the code example.
1 parent 69f0628 commit 8f3beab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/node.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import { createConfig, loadConfig } from "@redocly/openapi-core";
6161
import openapiTS from "openapi-typescript";
6262

6363
// option 1: create in-memory config
64-
const redoc = await createConfig(
64+
const redocly = await createConfig(
6565
{
6666
apis: {
6767
"core@v2": { … },
@@ -72,9 +72,9 @@ const redoc = await createConfig(
7272
);
7373

7474
// option 2: load from redocly.yaml file
75-
const redoc = await loadConfig({ configPath: "redocly.yaml" });
75+
const redocly = await loadConfig({ configPath: "redocly.yaml" });
7676

77-
const ast = await openapiTS(mySchema, { redoc });
77+
const ast = await openapiTS(mySchema, { redocly });
7878
```
7979

8080
:::

0 commit comments

Comments
 (0)