-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
baseURL not seems to be parsed from definition #61
Comments
I have the same issue. I hop that will be added automatically into the client. const api = new OpenAPIClientAxios({definition: 'https://ll.thespacedevs.com/2.0.0/swagger?format=openapi'});
await api.init()
const client = await api.getClient()
client.defaults.baseURL = 'https://ll.thespacedevs.com/2.0.0/'
const launch = await client.launch_list().catch(reason => {console.error(reason)})
console.log(launch) I expected that getClient() automatically add baseURL |
I'm confused here. What is the expected behaviour? |
According OA spec https://swagger.io/docs/specification/api-host-and-base-path/ Not always schema placed on the base_path of API, sometimes it could be another domain, or more deeply path, so there hard to found a universal rule for all. @patarapolw |
Currently, I need this code. (Backend is fastify-swagger.)
I did take a look at source as well; and
operation.servers[0]
ortargetServer
seems to be required, regardless of definition...The text was updated successfully, but these errors were encountered: