orval: Bug: multiple exports with the same name
I my *.yaml file I have a structure like this:
openapi 3.0.3
info: ...
tags: ...
paths: ...
components:
schemas:
MyAnotherType:
type: object
description: Some text
properties:
details:
type: array
description: Some text
items:
$ref: '#/components/schemas/MyType'
MyType:
type: string
description: Some text
example: Some more text
this causes duplicated export type MyType = string
in generated *.schema.ts
file
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 17 (15 by maintainers)
Yeah. Sorry for the incorrect issue description. I’ve figured out that problem can be reproduced this way:
1.yaml
file with the some structure2.yaml
1.yaml
and add some property reference to the type from2.yaml
($ref: './2.yaml#/components/schemas/MyType'
)As a result all the referenced schemas will be merged and if there are any schemas with the same name the issue will be produced.