diff --git a/packages/oas-to-snippet/src/index.ts b/packages/oas-to-snippet/src/index.ts index fa0c2ff1..bd2ca9d3 100644 --- a/packages/oas-to-snippet/src/index.ts +++ b/packages/oas-to-snippet/src/index.ts @@ -129,7 +129,7 @@ export default function oasToSnippet( } }); - const install = getClientInstallationInstructions(languages, lang, opts?.openapi?.variableName) || false; + const install = getClientInstallationInstructions(languages, lang, opts?.openapi?.registryIdentifier) || false; try { const code = snippet.convert(language, target, targetOpts); diff --git a/packages/oas-to-snippet/test/__snapshots__/index.test.ts.snap b/packages/oas-to-snippet/test/__snapshots__/index.test.ts.snap index ef70f946..e47f2f24 100644 --- a/packages/oas-to-snippet/test/__snapshots__/index.test.ts.snap +++ b/packages/oas-to-snippet/test/__snapshots__/index.test.ts.snap @@ -499,7 +499,7 @@ developers.loginUser({username: 'woof', password: 'barkbarkbark'}) .then(({ data }) => console.log(data)) .catch(err => console.error(err));", "highlightMode": "javascript", - "install": "npx api install developers", + "install": "npx api install @developers/v2.0#17273l2glm9fq4l5", } `; @@ -511,7 +511,7 @@ sdk.loginUser({username: 'woof', password: 'barkbarkbark'}) .then(({ data }) => console.log(data)) .catch(err => console.error(err));", "highlightMode": "javascript", - "install": "npx api install {packageName}", + "install": "npx api install @developers/v2.0#17273l2glm9fq4l5", } `;