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
For some authentication reason , the spec file can only be downloaded from somewhere to local,
and I need to use Swagger-Client to read the spec file and send the request to a remote host.
Looks like I must use url : http.... to get the client
file:// URLs are not really useful, since they're very difficult to use in browsers due to Same-Origin Policy and very few Node request libraries support them.
As for loading in a definition that you already have in memory, @c4milo is correct: you can pass your definition as a JS object under the spec key.
There's a workaround, though: #1410 (comment). Essentially, if you're using a local file, it's your responsibility to provide your data to Swagger Client as a JavaScript object.
Q&A
How can we help?
For some authentication reason , the spec file can only be downloaded from somewhere to local,
and I need to use Swagger-Client to read the spec file and send the request to a remote host.
Looks like I must use url : http.... to get the client
so the question is there a solution to read the spec from local ?
The text was updated successfully, but these errors were encountered: