orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
Duplicate operation are generated when Output mode is 'tags' and operation has multiples tags, which is allowed by OpenAPI.
What are the steps to reproduce this issue?
set multiple tags on a operation:
e.g.
paths:
/pets:
get:
summary: List all pets
operationId: listPets
tags:
- pets
- listAll
set output mode to 'tags'
run
What happens?
the operation will be generated on both ./pets and ./listAll
which causes the index.ts file to throw an error:
Module './pets' has already exported a member named 'ListPetsParams'. Consider explicitly re-exporting to resolve the ambiguity.
What were you expecting to happen?
only the first tag should be used in this scenario to export types and functions thus avoiding duplication
Any other comments?
there could be a config to set which tag to use in this scenario.( future enhancement)
What versions are you using?
orval: 7.2.0
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Memory: 137.88 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Duplicate operation are generated when Output mode is 'tags' and operation has multiples tags, which is allowed by OpenAPI.
What are the steps to reproduce this issue?
'tags'
What happens?
the operation will be generated on both
./pets
and./listAll
which causes theindex.ts
file to throw an error:Module './pets' has already exported a member named 'ListPetsParams'. Consider explicitly re-exporting to resolve the ambiguity.
What were you expecting to happen?
only the first tag should be used in this scenario to export types and functions thus avoiding duplication
Any other comments?
there could be a config to set which tag to use in this scenario.( future enhancement)
What versions are you using?
orval: 7.2.0
System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M1 Max Memory: 137.88 MB / 32.00 GB Shell: 5.9 - /bin/zsh