File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,13 @@ yarn add <UNSET> zod
7878For supported JavaScript runtimes, please consult [ RUNTIMES.md] ( RUNTIMES.md ) .
7979<!-- End Requirements [requirements] -->
8080
81- <!-- Start SDK Example Usage [usage] -->
8281## SDK Example Usage
8382
8483### Example
8584
8685``` typescript
8786import { SDK } from " @speakeasy-api/code-samples" ;
88- import { openAsBlob } from " node: fs" ;
87+ import { promises as fs } from " fs"
8988
9089const sdk = new SDK ({
9190 security: {
@@ -95,20 +94,19 @@ const sdk = new SDK({
9594
9695async function run() {
9796 const result = await sdk .codesamples .preview ({
98- languages: [
99- " <value>" ,
100- ],
101- schemaFile: await openAsBlob (" example.file" ),
97+ languages: [" python" , " typescript" ],
98+ schemaFile: {
99+ fileName: " openapi.json" , // ensure file name is included
100+ content: fileContent ,
101+ },
102102 });
103-
104103 // Handle the result
105104 console .log (result );
106105}
107106
108107run ();
109108
110109```
111- <!-- End SDK Example Usage [usage] -->
112110
113111<!-- Start Available Resources and Operations [operations] -->
114112## Available Resources and Operations
You can’t perform that action at this time.
0 commit comments