You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the actual output vs expected output?
Duplicate models with _2 suffix generated in go, 2 suffix in java. I have tested this in java and python and found the same issue.
Description
Models generated twice with same content when there are circular references between 2 specs
Issue occurs in Go, Java and Python languages.
Eg: model_complex_node_slice.go and model_complex_node_slice_2.go
ComplexNodeSlice.java and ComplexNodeSlice2.java
Based on #2701 it seems the latest swagger parser should have fixed the issue. However, even with 5.0.0 SNAPSHOT version of openapi-generator which is using a newer swagger parser version (2.0.20) I am still seeing this issue. Any help is appreciated.
The text was updated successfully, but these errors were encountered:
👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
shylasrinivas
changed the title
[BUG] [Go] [Java] [Python] Duplicate models generated with $ref in yamls
[BUG] [Go] [Java] [Python] Duplicate models generated when there are circular references between specs
Jul 29, 2020
Bug Report Checklist
Yes
Yes. Spec is valid.
5.0.0 SNAPSHOT and 4.3.1
Duplicate classes / Models are generated if ( $ref) referenced externally. #2701
Duplicate models with _2 suffix generated in go, 2 suffix in java. I have tested this in java and python and found the same issue.
Description
Models generated twice with same content when there are circular references between 2 specs
Issue occurs in Go, Java and Python languages.
Eg: model_complex_node_slice.go and model_complex_node_slice_2.go
ComplexNodeSlice.java and ComplexNodeSlice2.java
openapi-generator version
4.3.1 and 5.0.0 SNAPSHOT
OpenAPI declaration file content or url
https://gist.github.com/shylasrinivas/af9312c27f6c2a2d99d91c4c2c0323a1
Command line used for generation
openapi-generator generate -g go -i ~/testyamls/linked_list.yaml -o ~/testyamls/test
Related issues/PRs
#2701
Suggest a fix
Based on #2701 it seems the latest swagger parser should have fixed the issue. However, even with 5.0.0 SNAPSHOT version of openapi-generator which is using a newer swagger parser version (2.0.20) I am still seeing this issue. Any help is appreciated.
The text was updated successfully, but these errors were encountered: