BaseURL of zodios client #630
-
I am using Config: import { defineConfig } from "@kubb/core";
import createSwagger from "@kubb/swagger";
import createSwaggerZod from "@kubb/swagger-zod";
import createSwaggerZodios from "@kubb/swagger-zodios";
export default defineConfig({
root: ".",
input: {
path: "./apis/swagger.json",
},
output: {
path: "./src/gen",
clean: true,
},
plugins: [
createSwagger({ output: false }),
createSwaggerZod({
output: "./zod",
}),
createSwaggerZodios({
output: "./zodios",
}),
],
}); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The idea is to use With the |
Beta Was this translation helpful? Give feedback.
The idea is to use
servers[index].url
specified in your Swagger/OpenAPI file(see example).With the
swagger plugin
you can choose which index to use: https://www.kubb.dev/plugins/swagger#serverindex and then theZodios plugin
will use that as your baseURL. For now this was not yet implemented for Zodios but I opened a PR to add this(#631)