Skip to content

shouldExportHttpClient does not affect the export of the default axios function #2013

@kasahara-t

Description

@kasahara-t

I am using Orval to generate custom hooks for TanStack Query from an OpenAPI specification.

When generating custom hooks, I believe that the internal axios functions used by the hooks should not be exported. This is because in environments where hooks are automatically generated, I want to prevent axios functions from being used directly in order to maintain a consistent implementation.

While checking the type definitions in orval.config.ts, I found the option output.override.query.shouldExportHttpClient. I thought setting this to false would achieve my goal.

However, I found that the default axios function is still exported, and it is only not exported when output.override.mutator is specified. Is this the intended behavior?

There is no mention of shouldExportHttpClient on the Configuration page of the documentation, so I'm not sure.

If this was not intentional, I’d be happy to submit a PR.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions