Skip to content

Unused import is being created in generated file #2200

Open
@tidharpeer-cyclops

Description

@tidharpeer-cyclops

Hi..

Using Orval v7.8.0 with the following config:

export default defineConfig({
  'api-file': {
    input: './generated/ConsoleServiceOpenApi.json',
    output: {
      mode: 'tags',
      target: './src/api/generated/consoleServiceOpenApi.ts',
      client: 'react-query',
      mock: true,
      override: {
        mutator: {
          path: './src/api/client/orvalMutator.ts',
          name: 'customInstance',
        },
      },
    },
  },
});

My files are being created successfully, but now, for some reason, one of them is being created with an usued import -
import type from './consoleServiceOpenApi.schemas';

But this line is unused, and therefore won't pass my type check and fails in build.

Reproduced also in 7.10.0

Any reason it is happening? any way I can't prevent it via configs?

Any help would be great.

Other then that all works great.

Thanks...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions