-
-
Notifications
You must be signed in to change notification settings - Fork 309
Open
Labels
bug 🔥Broken or incorrect behavior.Broken or incorrect behavior.
Description
Description
Package: @hey-api/openapi-ts
Plugin: @hey-api/client-axios
Description
When using runtimeConfigPath with @hey-api/client-axios, the value is copied verbatim into the generated client files.
This causes incorrect imports unless the path is manually written relative to the generated output directory.
openapi-ts.config.ts:
import { defineConfig } from '@hey-api/openapi-ts';
import 'dotenv/config';
export default defineConfig([
{
input: `./schema1.json`,
output: 'src/client/schema1',
plugins: [
'@hey-api/schemas',
'@hey-api/sdk',
'@hey-api/typescript',
{
name: '@hey-api/client-axios',
runtimeConfigPath: './src/client/config/schema1.config.ts',
},
],
},
{
input: `./schema2.json`,
output: 'src/client/schema2',
plugins: [
'@hey-api/schemas',
'@hey-api/sdk',
'@hey-api/typescript',
{
name: '@hey-api/client-axios',
runtimeConfigPath: './src/client/config/schema2.config.ts',
},
],
},
]);Generated Schema 1
import { createClientConfig } from './src/client/config/schema1.config.ts';
Generated Schema 2
import { createClientConfig } from './src/client/config/schema2.config.ts';
Reproducible example or configuration
https://stackblitz.com/edit/stackblitz-starters-z1bxoxgw?file=src%2Fclient%2Fschema1%2Fclient.gen.ts
OpenAPI specification (optional)
No response
System information (optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Labels
bug 🔥Broken or incorrect behavior.Broken or incorrect behavior.