Bug: multiple exports with the same name
See original GitHub issueI 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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Multiple exports with the same name "default" #6692 - GitHub
Describe the bug Following code doesn't work with vite, it's a valid js/ts syntax and it works fine in vue cli Workaround 1:...
Read more >React js : how to resolve multiple export? - Stack Overflow
1.Named Exports(Zero or more exports per module): This allows you to export multiple modules from a javascript file which is the case in...
Read more >Resolve the "Export EXPORT_NAME cannot be updated as it ...
You get this error when one or more stacks are importing an exported output value from the stack that you want to update...
Read more >Export data to Excel - Microsoft Support
Using the Export Wizard, you can export data from an Access database to in a file format that can be read by Excel....
Read more >Export Multiple - Audacity Manual
This item is off (unchecked) by default. If unchecked, any files to be exported which have the same name as pre-existing files in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
You are right, comparing absolutely to know whether type is duplicated or not. Otherwise some types will be the same but name.
Yeah it will, but how to deal with case when all the generated schemas must be merged into a single file?