You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use the createClient function in a node environment and pass in an OpenAPI spec as an object, createClient attempts to read the current directory instead of using the spec.
Notice that it works ok if we pretend we're in a browser:
// Pretend to be in a web environmentglobal.window={};global.location={href: 'https://some-website/'};awaitcreateClient({input: {openapi: '3.0.3',info: ... },output: 'out',dryRun: true,plugins: ['@hey-api/client-fetch'],});
OpenAPI specification (optional)
No response
System information (optional)
Node v20.18.0
The text was updated successfully, but these errors were encountered:
Description
If you use the
createClient
function in a node environment and pass in an OpenAPI spec as an object,createClient
attempts to read the current directory instead of using the spec.eg:
Results in the error:
Reproducible example or configuration
https://github.com/cogwirrel/heyapi-bug-inline-spec
Notice that it works ok if we pretend we're in a browser:
OpenAPI specification (optional)
No response
System information (optional)
Node v20.18.0
The text was updated successfully, but these errors were encountered: