Skip to content
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

Import Core path #2202

Open
focus-at opened this issue Jun 24, 2024 · 1 comment
Open

Import Core path #2202

focus-at opened this issue Jun 24, 2024 · 1 comment

Comments

@focus-at
Copy link

focus-at commented Jun 24, 2024

I use multiple opeapi schemes from different urls
To avoid duplicate ./src/api-generated/${scheme}/core directory for each api provider, I generate core separately

1. --output ./src/api-generated/core --exportServices false --exportModels false
2. --output ./src/api-generated/audio --exportCore false
3. --output ./src/api-generated/web --exportCore false

but In all generated services i get

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

I would like to be able to specify the directory from which it will be imported, maybe with flag --importCorePath,
although we might also need to change the OpenAPI settings for a specific provider separately

@mrlubos
Copy link
Collaborator

mrlubos commented Jun 24, 2024

@focus-at this is solved in https://github.com/hey-api/openapi-ts + this package is no longer maintained, so I'd encourage you to migrate if possible 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants