Jean-Sebastien Carle
Jean-Sebastien Carle
https://stackblitz.com/edit/hey-api-client-fetch-example-tnzcbbvi?file=src%2Fclient%2Fclient.gen.ts This setup is what the end result should be. As soon as you run, `npx openapi-ts`, the `import.meta.env.VITE_API_BASE_URL` reference will be overwritten with the Server URL found in the...
In a perfect world, the ask would indeed be to allow explicitly setting baseUrl to a variable reference to support such scenarios as build variables like `import.meta.env.VITE_API_BASE_URL`, but I could...
> > flag to either ignore server URLs found in processed Open API definitions > > I showed you how to do that in my example! The API URL still...
Ah wait, hadn't seen that
Ok, so setting baseUrl to false: ```typescript export default defineConfig({ input: 'https://api.dev.domain.com/openapi.json', output: 'src/api', plugins: [ { baseUrl: false, name: '@hey-api/client-fetch', }, ], }); ``` Does stop including the server...
That's correct, it's not a regression.
The code gen is run locally, the final value is detemined by the CI/CD pipeline.
I honestly do not see any way that code gen could be done in a CI/CD pipeline without the whole thing turning into an continuously exploding fireball. Most projects that...
Yea, I could see the value of having codegen in a test pipeline as it'll prevent you from shipping a broken front end. I'll add that as a pre-build step...
As a workaround, I've started using this: ```javascript // devops/patch-client-gen.mjs import { readFile, writeFile } from 'fs/promises'; import { fileURLToPath } from 'url'; import { dirname, resolve } from 'path';...